00001
00016
00017 #ifndef _ELLIPSE_H
00018 #define _ELLIPSE_H
00019
00020
00022 #define ELLIPSE_STATUS_UNINITIALIZED 0
00023
00024 #define ELLIPSE_STATUS_INITIALIZED 1
00025
00026 #define ELLIPSE_STATUS_OCCUPIED 2
00027
00028 #define ELLIPSE_STATUS_ERROR 3
00029
00031 int ELLIPSE_TEST;
00033 int ELLIPSE_VERBOSE;
00034
00035
00041 typedef struct{
00042
00044 char status;
00045
00046
00047
00051 float semiaxis[2];
00052
00056 float center[2];
00057
00059 float inclination;
00060
00062 int imageDim;
00063
00069 int **ellipseptr;
00070
00072 float value;
00073
00074 } ELLIPSE;
00075
00076
00077
00078
00079
00080
00081
00082
00083
00090 void ellipseInit(ELLIPSE *ell);
00091
00098 void ellipseEmpty(ELLIPSE *ell);
00099
00104 void ellipseInfo(ELLIPSE *ell);
00105
00114 int ellipseAllocate(ELLIPSE *ell, int imgDim);
00115
00116
00117
00134 int ellipseSetFromParams(ELLIPSE *ell, int imgDim, float *semis, float *cent, float incli, float val);
00135
00155 int ellipseReadEllipse(FILE *fp, ELLIPSE *ell);
00156
00165 int ellipseSaveEllipse(ELLIPSE *ell, FILE *fp);
00166
00172 float ellipseGetMajor(ELLIPSE *ell);
00173
00179 float ellipseGetMinor(ELLIPSE *ell);
00180
00186 float ellipseGetCenterX(ELLIPSE *ell);
00187
00193 float ellipseGetCenterY(ELLIPSE *ell);
00194
00200 float ellipseGetInclination(ELLIPSE *ell);
00201
00207 int ellipseGetImgSize(ELLIPSE *ell);
00208
00214 int ellipseGetValue(ELLIPSE *ell);
00215
00223 int** ellipseGetArray(ELLIPSE *ell);
00224
00225
00226
00227
00236 int ellipseIsInside(ELLIPSE *ell, int row, int col);
00237
00238 #endif