** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ir.h,v 1.9 2000/05/04 04:29:18 kevin Exp $
+** $Id: ir.h,v 1.10 2000/05/04 18:16:34 kevin Exp $
** $Log: ir.h,v $
+** Revision 1.10 2000/05/04 18:16:34 kevin
+** renamed filter definitions
+**
** Revision 1.9 2000/05/04 04:29:18 kevin
** *** empty log message ***
**
};
struct phmelm_st {
- int type; /* phmelm type (box, ellipse, etc) */
- double atten; /* X-ray attenuation coefficient */
- double cx,cy; /* center of phmelm */
- double u,v; /* size of phmelm */
- double rot; /* phmelm rotation angle (in radians) */
- double *x, *y; /* ptr to array of points in obj world coord */
- int pts; /* number of points in outline arrays */
+ int type; /* phmelm type (box, ellipse, etc) */
+ double atten; /* X-ray attenuation coefficient */
+ double cx,cy; /* center of phmelm */
+ double u,v; /* size of phmelm */
+ double rot; /* phmelm 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; /* phmelm limits */
- double radius; /* " */
- struct { /* transform matrices */
- GRFMTX_2D p_to_o; /* map from phantom to standard phmelm coords */
- GRFMTX_2D o_to_p; /* map from std phmelm coords to phantom coords */
+ double radius; /* " */
+ struct { /* transform matrices */
+ GRFMTX_2D p_to_o; /* map from phantom to standard phmelm coords */
+ GRFMTX_2D o_to_p; /* map from std phmelm coords to phantom coords */
} xform;
- struct phmelm_st *next; /* pointer to next phmelm in phantom */
+ struct phmelm_st *next; /* pointer to next phmelm in phantom */
};
typedef struct phmelm_st PHMELM;
-struct phm_st { /* Phantom structure */
- PHMELM *phmelm_list; /* phmelm linked-list */
+struct phm_st { /* Phantom structure */
+ PHMELM *phmelm_list; /* phmelm linked-list */
int type;
- int n_pelm; /* number of phmelms in phantom */
+ int n_pelm; /* number of phmelms in phantom */
double xmin, xmax, ymin, ymax; /* extent of phmelms in phmelm coordinates */
- double radius; /* " " */
+ double radius; /* " " */
};
typedef struct image_st IMAGE;
#define DETECTOR_EQUIANGLE 2
#define DETECTOR_EQUILINEAR 3
-struct detect_st {
+struct detector_st {
int geometry; /* Geometry of detectory */
int ndet; /* Number of detectors in array */
int nview; /* Number of rotated views */
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 */
};
typedef struct detarray_st DETARRAY;
-typedef struct detect_st DETECTOR;
+typedef struct detector_st DETECTOR;
typedef struct raysum_st RAYSUM;
/*----------------------------------------------------------------------*/
/* Codes for Filter types */
-#define W_BANDLIMIT 1 /* filter types for genfilter() */
-#define W_SINC 2
-#define W_G_HAMMING 3
-#define W_COSINE 4
-#define W_TRIANGLE 5
-
-#define W_A_BANDLIMIT 11 /* filters times abs() of function */
-#define W_A_SINC 12
-#define W_AG_HAMMING 13
-#define W_A_COSINE 14
-
-#define W_SHEPP 21
+#define FILTER_BANDLIMIT 1 /* filter types for genfilter() */
+#define FILTER_SINC 2
+#define FILTER_G_HAMMING 3
+#define FILTER_COSINE 4
+#define FILTER_TRIANGLE 5
+#define FILTER_ABS_BANDLIMIT 11 /* filters times abs() of function */
+#define FILTER_ABS_SINC 12
+#define FILTER_ABS_G_HAMMING 13
+#define FILTER_ABS_COSINE 14
+#define FILTER_SHEPP 21
/* function domains */
/* convolve.c */
double convolve(const double f1[], const double f2[], const double dx, const int n, const int np, const int func_type);
double convolve_both(const double f1[], const double f2[], const double dx, const int n, const int np);
-void rotate2d(double x[], double y[], int pts, double angle);
-void xlat2d(double x[], double y[], int pts, double xoffset, double yoffset);
-void scale2d(double x[], double y[], int pts, double xfact, double yfact);
-int circle_pts(double theta);
/* dialogs.c */
int phm_add_pelm_kb(PHANTOM *phm);
void calc_arc(double x[], double y[], const int pts, const double xcent, const double ycent,
const double r, const double start, const double stop);
void calc_ellipse(double x[], double y[], const int pts, const double u, const double v);
+int circle_pts(double theta);
void phm_print(PHANTOM *phm);
#if HAVE_INTERACTIVE_GRAPHICS
void phm_show(const PHANTOM *phm);
void raysum_trace_show_param (const char *label, const char *fmt, int row, int color, ...);
/* scanner.c */
-DETECTOR *detect_create(const PHANTOM *phm, int ndet, int nview, int nsample, const double rot_anglen);
-void detect_free(DETECTOR *det);
+DETECTOR *detector_create(const PHANTOM *phm, int geometry, int ndet, int nview, int nsample, const double rot_anglen);
+void detector_free(DETECTOR *det);
/* rayio.c */
RAYSUM *raysum_create(const char *fname, const int nview, const int ndet);
int detarray_write(RAYSUM *rs, const DETARRAY *darray, const int view_num);
int raysum_print(const RAYSUM *rs);
-
#endif