Go to the source code of this file.
Defines | |
| #define | ELLIPSE_STATUS_UNINITIALIZED 0 |
| Status uninitialized, value 0. | |
| #define | ELLIPSE_STATUS_INITIALIZED 1 |
| Status initialized, value 1. | |
| #define | ELLIPSE_STATUS_OCCUPIED 2 |
| Status occupied, value 2. | |
| #define | ELLIPSE_STATUS_ERROR 3 |
| Status error, value 3. | |
Functions | |
| void | ellipseInit (ELLIPSE *ell) |
| void | ellipseEmpty (ELLIPSE *ell) |
| void | ellipseInfo (ELLIPSE *ell) |
| int | ellipseAllocate (ELLIPSE *ell, int imgDim) |
| int | ellipseSetFromParams (ELLIPSE *ell, int imgDim, float *semis, float *cent, float incli, float val) |
| int | ellipseReadEllipse (FILE *fp, ELLIPSE *ell) |
| int | ellipseSaveEllipse (ELLIPSE *ell, FILE *fp) |
| float | ellipseGetMajor (ELLIPSE *ell) |
| float | ellipseGetMinor (ELLIPSE *ell) |
| float | ellipseGetCenterX (ELLIPSE *ell) |
| float | ellipseGetCenterY (ELLIPSE *ell) |
| float | ellipseGetInclination (ELLIPSE *ell) |
| int | ellipseGetImgSize (ELLIPSE *ell) |
| int | ellipseGetValue (ELLIPSE *ell) |
| int ** | ellipseGetArray (ELLIPSE *ell) |
| int | ellipseIsInside (ELLIPSE *ell, int row, int col) |
Variables | |
| int | ELLIPSE_TEST |
| Drive in test mode if not 0. | |
| int | ELLIPSE_VERBOSE |
| Drive in verbose mode if not 0. | |
|
|
Status error, value 3.
|
|
|
Status initialized, value 1.
|
|
|
Status occupied, value 2.
|
|
|
Status uninitialized, value 0.
|
|
||||||||||||
|
Allocates memory for ELLIPSE data. Normally used only in SET-functions. *ell is initialized && imgDim is positive memory is allocated for ELLIPSE structure.
|
|
|
Frees the memory allocated for ellipse. All data is cleared. . ellipse is emptied.
|
|
|
Returns the ellipse array of the given ellipse. Ellipse array contains n x n items, single item is one if it is inside the ellipse and zero otherwise. Coordinates on a two dimensional plane are numbered from upper left corner. ell is initialized. .
|
|
|
Returns the center x-coordinate of the ellipse. ell is initialized. .
|
|
|
Returns the center y-coordinate of the ellipse. ell is initialized. .
|
|
|
Returns the size of the image plane on which the ellipse is drawn. ell is initialized. .
|
|
|
Returns the inclination of the ellipse. ell is initialized. .
|
|
|
Returns the major semiaxe of the ellipse. ell is initialized. .
|
|
|
Returns the minor semiaxe of the ellipse. ell is initialized. .
|
|
|
Returns the value of the pixels inside the ellipse.
|
|
|
Prints the information of the ellipse to the screen.
|
|
|
Initializes ELLIPSE datatype for use. To be used before any use of ELLIPSE type variables. . ellipse is initialized.
|
|
||||||||||||||||
|
Tests whether the given pixel is inside the given ellipse or not. ell is initialized && 0<=row<=imgDim-1 && 0<=col<=imgDim-1 .
|
|
||||||||||||
|
Reads one ellipse from the given file to the given ELLIPSE structure. A coordinate file contains the parameters of the ellipses in one line in the following order: Coordinate 1: v the additive intensity value of the ellipse Coordinate 2: a the length of the horizontal semi-axis of the ellipse Coordinate 3: b the length of the vertical semi-axis of the ellipse Coordinate 4: x the x-coordinate of the center of the ellipse Coordinate 5: y the y-coordinate of the center of the ellipse Coordinate 6: p the angle (in degrees) between the horizontal semi-axis of the ellipse and the x-axis of the image Coordinate 7: d the image dimension *fp is a pointer to open file containing ellipse(s) in correct format. *ell is initialized an ellipse is read from the file fname.
|
|
||||||||||||
|
Adds the given ellipse to the file. *ell is initialized. ellipse is saved in the file called fname.
|
|
||||||||||||||||||||||||||||
|
Sets the ellipse according to given coordinates and image dimension. Notice that the origin is in the middle. *ell is initialized. imgDim is positive. semis[i] are positive. -imgDim/2<=cent[i]<=imgDim/2. ellipse is set.
|
|
|
Drive in test mode if not 0.
|
|
|
Drive in verbose mode if not 0.
|
1.4.1