-#define POINTS_PER_CIRCLE 36
-
-#define MAXREMARK 99
-#define LENREMARK (MAXREMARK+1)
-#define IMAGE_VAL FMTX_2D /* use 2d floating point matrix */
-#define IMAGE_ELEM_TYPE DT_FLOAT /* use floats for images */
-typedef float IMAGE_ELEM_VAL; /* use floats for image storing */
-
-struct image_st {
- IMAGE_VAL v; /* values of voxels in matrix form */
- SDF_2D *dfp_2d; /* Pointer to disk image file */
- int nx, ny; /* size of voxel matrix */
- double xmin, xmax, ymin, ymax; /* extent of voxel matrix in phm coord */
- char remark[LENREMARK]; /* description of voxel data */
- float calctime; /* time to calculate voxels in seconds */
-};
-
-struct pelm_st {
- int type; /* pelm type (box, ellipse, etc) */
- double atten; /* X-ray attenuation coefficient */
- double cx,cy; /* center of pelm */
- double u,v; /* size of pelm */
- double rot; /* pelm rotation angle (in radians) */
- double *x, *y; /* ptr to array of points in obj world coord */
- int pts; /* number of points in outline arrays */
- double xmin, xmax, ymin, ymax; /* pelm limits */
- double radius; /* " */
- struct { /* transform matrices */
- GRFMTX_2D p_to_o; /* map from phantom to standard pelm coords */
- GRFMTX_2D o_to_p; /* map from std pelm coords to phantom coords */
- } xform;
- struct pelm_st *next; /* pointer to next pelm in phantom */
-};
-
-typedef struct pelm_st PELM;
-
-struct phm_st { /* Phantom structure */
- PELM *pelm_list; /* pelm linked-list */
- int type;
- int n_pelm; /* number of pelms in phantom */
- double xmin, xmax, ymin, ymax; /* extent of pelms in pelm coordinates */
- double radius; /* " " */
-};
-
-typedef struct image_st IMAGE;
-typedef struct phm_st PHANTOM;
-
-#define P_PELMS 0 /* Phantom made of pelms */
-#define P_UNIT_PULSE 1 /* Special PHANTOM, not made of pelms */
-#define P_FILTER 9 /* defined only by a type */
-
-/*----------------------------------------------------------------------*/
-/* RAYSUM SYMBOLS */
-/*----------------------------------------------------------------------*/
-
-/* Ray sums are collected along an array of ndet detectors. The data
- * for these detectors is stored in the structure DETECTARRAY
- */
-
-#define DETECT_TYPE float
-
-struct detarray_st {
- DETECT_TYPE *detval; /* Pointer to array of values recorded by detector */
- int ndet; /* Number of detectors in array */
- double view_angle; /* View angle in radians */
-};
-
-#define DETECTOR_PARALLEL 1
-#define DETECTOR_EQUIANGLE 2
-#define DETECTOR_EQUILINEAR 3
-
-struct detector_st {
- int geometry; /* Geometry of detectory */
- int ndet; /* Number of detectors in array */
- int nview; /* Number of rotated views */
- int nsample; /* Number of rays per detector */
- double detlen; /* Total length of detector array */
- double rotlen; /* Rotation angle length in radians (norm 2PI) */
- double det_inc; /* Increment between centers of detectors */
- double rot_inc; /* Increment in rotation angle between views */
- double radius; /* Radius of rotation. Distance from */
- /* center of phm to center of det */
- double phmlen; /* Maximum Length of PHANTOM or area of interest */
- struct {
- double xd1,yd1,xd2,yd2; /* Coordinates of detector endpoints */
- double xs1,ys1,xs2,ys2; /* Coordinates of source endpoints */
- double angle; /* Starting angle */
- } init;
-};
-
-struct raysum_st {
- int fd;
- int file_mode;
- int header_size;
- int geometry;
- struct detarray_st **view; /* Pointer to array of detarray_st pointers */
-
- char remark[LENREMARK]; /* description of raysum data */
- double calctime; /* time required to calculate raysums */
-
- int ndet; /* number of detectors in array */
- int nview; /* number of rotated views */
- double rot_start; /* starting view rotation */
- double rot_inc; /* angle between rotations */
- double det_start; /* distance of beginning detector to center */
- /* of PHANTOM */
- double det_inc; /* increment between detectors */
- double phmlen; /* Length of PHANTOM edge (phm is square) */
-};
-
-typedef struct detarray_st DETARRAY;
-typedef struct detector_st DETECTOR;
-typedef struct raysum_st RAYSUM;