-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifdef MPI_CT
-#define MPI_MAX_PROCESS 128
-struct mpi_ct_st
-{
- int my_rank;
- int nproc;
- int base_local_work_units;
- int remainder_work_units;
- int local_work_units[MPI_MAX_PROCESS];
- int start_work_unit[MPI_MAX_PROCESS];
- MPI_Comm comm;
-};
-
-extern struct mpi_ct_st mpi_ct;
-void mpi_ct_calc_work_units(const unsigned int global_work_units);
-#endif
-
-
-struct histo_st {
- int *b; /* Histogram array (# of elements in each bin) */
- int nbin; /* Number of histogram bins */
- double xmin, xmax, xinc; /* Limits of histogram boundaries */
-};
-
-typedef struct histo_st HISTOGRAM;
-
-/*---------------------------------------------------------------------------*/
-
-static const int POINTS_PER_CIRCLE=90;
-#define MAXREMARK 99
-
-typedef FMTX_2D IMAGE_ARRAY; /* use 2d floating point matrix */
-typedef float IMAGE_ELEM_VAL; /* use floats for image storing */
-
-struct image_st {
- IMAGE_ARRAY 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[MAXREMARK+1]; /* description of voxel data */
- float calctime; /* time to calculate voxels in seconds */
-};
-typedef struct image_st IMAGE;
-
-typedef enum {
- RECTANGLE,
- TRIANGLE,
- ELLIPSE,
- SECTOR,
- SEGMENT
-} PElmType;
-
-struct pelm_st {
- PElmType 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; /* " */
- 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 */
- struct pelm_st *next; /* pointer to next pelm in phantom */
-};
-typedef struct pelm_st PELM;
-
-typedef enum {
- P_PELMS, /* Phantom made of Pelms */
- P_UNIT_PULSE, /* Special phantom, not made of pelms */
- P_FILTER /* defined only by this type */
-} PhmType;
-
-struct phm_st { /* Phantom structure */
- PELM *pelm_list; /* pelm linked-list */
- PhmType type;
- int n_pelm; /* number of pelms in phantom */
- double xmin, xmax, ymin, ymax; /* extent of pelms in pelm coordinates */
- double radius; /* " " */
-};
-typedef struct phm_st PHANTOM;
-
-
-/*----------------------------------------------------------------------*/
-/* RAYSUM SYMBOLS */
-/*----------------------------------------------------------------------*/
-
-/* Ray sums are collected along an array of ndet detectors. The data
- * for these detectors is stored in the structure DETECTARRAY
- */
-
-typedef float DETECT_TYPE;
-
-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 */
-};
-typedef struct detarray_st DETARRAY;