Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

prmat.h

Go to the documentation of this file.
00001 
00018 
00019 #ifndef _PRMAT_H
00020 #define _PRMAT_H
00021 /**********************************************************/
00022 #include "ellipse.h"
00023 /**********************************************************/
00024 /*Definitions for prmat status*/
00026 #define PRMAT_STATUS_UNINITIALIZED 0
00027 
00028 #define PRMAT_STATUS_INITIALIZED 1
00029 
00030 #define PRMAT_STATUS_BS_OCCUPIED 2
00031 
00032 #define PRMAT_STATUS_LU_OCCUPIED 3
00033 
00034 #define PRMAT_STATUS_PR_OCCUPIED 4
00035 
00036 #define PRMAT_STATUS_ERROR 5
00037 /*Definitions for prmat type*/
00039 #define PRMAT_TYPE_ECAT931 0 
00040 
00041 #define PRMAT_TYPE_GE 1 
00042 
00043 #define PRMAT_TYPE_NA 2 
00044 /*Definitions for discretization model*/
00046 #define PRMAT_DMODE_01 0
00047 
00048 #define PRMAT_DMODE_LOI 1
00049 
00050 #define PRMAT_DMODE_EA 2 
00051 
00052 #define PRMAT_DMODE_LI 3 
00053 
00054 #define PRMAT_DMODE_NN 4 
00055 /**********************************************************/ 
00057 int PRMAT_TEST;
00059 int PRMAT_VERBOSE;
00060 /**********************************************************/
00061 typedef struct{
00062 
00064   char status;
00065 
00067   char type;
00068 
00070   int viewNr;
00071 
00073   int binNr;
00074 
00076   int imgDim;
00077 
00079   int mode; 
00080 
00084   int *prmatfov; 
00085   
00087   float min;
00088 
00090   float max;
00091   
00093   float factor_sum;
00094 
00096   float scaling_factor;
00097 
00098   /*PRMAT LOOK-UP TABLE: for restoring lines of response intersecting a pixel.*/
00099 
00101   int nrp;
00102 
00107   unsigned int **lines;
00108 
00110   unsigned int **_linesdata;
00111 
00112   /*PRMAT DATA: for restoring lines of response in the projection matrix. */
00113   
00115   int dimr;
00116 
00118   float *factor_sqr_sum;
00119 
00121   int *dime;
00122 
00126   unsigned short int ***fact; 
00127   
00129   unsigned short int ***_factdata;
00130 
00131   
00132 }PRMAT;
00133 
00134 /*********************************************************
00135  *
00136  * Function definitions.
00137  *
00138  *********************************************************/
00139 
00140 /* Initialization and memory handling for prmat data      */
00141 
00147 void prmatInit(PRMAT *mat);
00148 
00154 void prmatEmpty(PRMAT *mat);
00155 
00170 int prmatAllocate(PRMAT *mat, int set,int rows, int *coords);
00171 
00172 /* GET procedures for PRMAT datatype. USE ONLY THESE FOR GETTING. */
00173 
00174 /* GET FUNCTIONS FOR THE PARAMETERS */
00175 
00183 int prmatGetNV(PRMAT *mat);
00184 
00192 int prmatGetNB(PRMAT *mat);
00193 
00201 int prmatGetID(PRMAT *mat);
00202 
00203 /* GET FUNCTIONS FOR ACCESSING LOOK-UP TABLE */
00204 
00212 int prmatGetPIX(PRMAT *mat);
00213 
00223 int prmatGetPixCoord(PRMAT *mat,int row);
00224 
00234 int prmatGetRays(PRMAT *mat,int row);
00235 
00247 int prmatGetBinView(PRMAT *mat, int row, int ind);
00248 
00249 /* GET FUNCTIONS FOR ACCESSING PROJECTION MATRIX BY A LINE OF RESPONSE.*/
00250 
00258 int prmatGetRows(PRMAT *mat);
00259 
00269 int prmatGetPixels(PRMAT *mat, int row);
00270 
00282 int prmatGetCoord(PRMAT *mat, int row, int pix);
00283 
00295 int prmatGetXCoord(PRMAT *mat, int row, int pix);
00296 
00308 int prmatGetYCoord(PRMAT *mat, int row, int pix);
00309 
00321 float prmatGetFactor(PRMAT *mat, int row, int pix);
00322 
00330 float prmatGetMajor(PRMAT *mat);
00331 
00339 float prmatGetMinor(PRMAT *mat);
00340 
00348 float prmatGetMin(PRMAT *mat);
00349 
00357 float prmatGetMax(PRMAT *mat);
00358 
00367 float prmatGetFactorSum(PRMAT *mat);
00368 
00378 float prmatGetFactorSqrSum(PRMAT *mat, int row);
00379 
00380 /*ARCHIVING METHODS*/
00381 
00390 int prmatReadMatrix(char *fname, PRMAT *mat);
00391 
00404 int prmatSaveMatrix(PRMAT *mat);
00405 
00406 #endif
00407 

Generated on Tue Nov 29 15:16:09 2005 by  doxygen 1.4.1