|
TPCCLIB
|
2D plane model of an ellipse. More...
#include "libtpcrec.h"Go to the source code of this file.
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. | |
| int ellipseAllocate | ( | ELLIPSE * | ell, |
| int | imgDim ) |
Allocates memory for ELLIPSE data. Normally used only in SET-functions.
| ell | pointer to ellipse for which the allocation is done. |
| imgDim | size of the image plane on which the ellipse is to be done. |
Definition at line 94 of file ellipse.c.
Referenced by ellipseSetFromParams().
| void ellipseEmpty | ( | ELLIPSE * | ell | ) |
Frees the memory allocated for ellipse. All data is cleared.
| ell | pointer to ellipse to be emptied. |
Definition at line 47 of file ellipse.c.
Referenced by ellipseReadEllipse().
| int ** ellipseGetArray | ( | ELLIPSE * | ell | ) |
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 | pointer to ellipse. |
Definition at line 339 of file ellipse.c.
| float ellipseGetCenterX | ( | ELLIPSE * | ell | ) |
| float ellipseGetCenterY | ( | ELLIPSE * | ell | ) |
| int ellipseGetImgSize | ( | ELLIPSE * | ell | ) |
| float ellipseGetInclination | ( | ELLIPSE * | ell | ) |
| float ellipseGetMajor | ( | ELLIPSE * | ell | ) |
Returns the major semiaxe of the ellipse.
| ell | pointer to ellipse. |
Definition at line 254 of file ellipse.c.
Referenced by radonSetBases(), and radonSetBasesEA().
| float ellipseGetMinor | ( | ELLIPSE * | ell | ) |
Returns the minor semiaxe of the ellipse.
| ell | pointer to ellipse. |
Definition at line 265 of file ellipse.c.
Referenced by radonSetBases(), and radonSetBasesEA().
| int ellipseGetValue | ( | ELLIPSE * | ell | ) |
| void ellipseInfo | ( | ELLIPSE * | ell | ) |
| void ellipseInit | ( | ELLIPSE * | ell | ) |
Initializes ELLIPSE datatype for use. To be used before any use of ELLIPSE type variables.
| ell | pointer to ellipse to be initialized. |
Definition at line 23 of file ellipse.c.
| int ellipseIsInside | ( | ELLIPSE * | ell, |
| int | row, | ||
| int | col ) |
Tests whether the given pixel is inside the given ellipse or not.
| ell | ellipse on which the testing is to be done. |
| row | row coordinate of a pixel. |
| col | column coordinate of a pixel. |
Definition at line 352 of file ellipse.c.
Referenced by radonSetBases(), radonSetBasesEA(), and radonSetLUT().
| int ellipseReadEllipse | ( | FILE * | fp, |
| ELLIPSE * | ell ) |
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 | A pointer to open file containing ellipse(s) in correct format. |
| ell | pointer to ELLIPSE structure where the read ellipse is to be set. |
Definition at line 198 of file ellipse.c.
| int ellipseSaveEllipse | ( | ELLIPSE * | ell, |
| FILE * | fp ) |
| int ellipseSetFromParams | ( | ELLIPSE * | ell, |
| int | imgDim, | ||
| float * | semis, | ||
| float * | cent, | ||
| float | incli, | ||
| float | val ) |
Sets the ellipse according to given coordinates and image dimension.
| ell | pointer to ellipse for which the setting is to be done. |
| imgDim | size of the image plane. |
| semis | major and minor semiaxis of the ellipse. |
| cent | center of the ellipse. |
| incli | inclination of the ellipse. |
| val | value inside the ellipse. |
Definition at line 119 of file ellipse.c.
Referenced by ellipseReadEllipse().
| int ELLIPSE_VERBOSE |
Drive in verbose mode if not 0.
Definition at line 9 of file ellipse.c.
Referenced by ellipseAllocate(), ellipseEmpty(), ellipseGetArray(), ellipseGetCenterX(), ellipseGetCenterY(), ellipseGetImgSize(), ellipseGetInclination(), ellipseGetMajor(), ellipseGetMinor(), ellipseGetValue(), ellipseInit(), ellipseReadEllipse(), and ellipseSaveEllipse().