r37: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 4 May 2000 04:29:18 +0000 (04:29 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 4 May 2000 04:29:18 +0000 (04:29 +0000)
include/ir.h

index b7c6496e3518516e59c09983685278a27f810745..cd801f3f8ff921472a5fa64398eadbb42bd16699 100644 (file)
@@ -2,8 +2,11 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ir.h,v 1.8 2000/05/04 04:25:55 kevin Exp $
+**  $Id: ir.h,v 1.9 2000/05/04 04:29:18 kevin Exp $
 **  $Log: ir.h,v $
+**  Revision 1.9  2000/05/04 04:29:18  kevin
+**  *** empty log message ***
+**
 **  Revision 1.8  2000/05/04 04:25:55  kevin
 **  Renamed phantom and phantom-element functions/variables
 **
@@ -99,38 +102,38 @@ struct image_st {
     float calctime;                    /* time to calculate voxels in seconds */
 };
 
-struct phmelem_st {
-    int type;                     /* phmelem type (box, ellipse, etc) */
+struct phmelm_st {
+    int type;                     /* phmelm type (box, ellipse, etc) */
     double atten;                 /* X-ray attenuation coefficient */
-    double cx,cy;                 /* center of phmelem */
-    double u,v;                           /* size of phmelem */
-    double rot;                           /* phmelem rotation angle (in radians) */
+    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; /* phmelem limits */
+    double xmin, xmax, ymin, ymax; /* phmelm limits */
     double radius;                /*   "   */
     struct {                      /* transform matrices        */
-       GRFMTX_2D p_to_o;          /* map from phantom to standard phmelem coords */
-       GRFMTX_2D o_to_p;          /* map from std phmelem coords to phantom coords */
+       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 phmelem_st *next;     /* pointer to next phmelem in phantom */
+    struct phmelm_st *next;      /* pointer to next phmelm in phantom */
 };
 
-typedef struct phmelem_st PHMELEM;
+typedef struct phmelm_st PHMELM;
 
 struct phm_st {                           /* Phantom structure */
-    PHMELEM *phmelem_list;        /* phmelem linked-list */
+    PHMELM *phmelm_list;          /* phmelm linked-list */
     int type;
-    int n_pelm;                           /* number of phmelems in phantom */
-    double xmin, xmax, ymin, ymax; /* extent of phmelems in phmelem coordinates */
+    int n_pelm;                           /* number of phmelms in phantom */
+    double xmin, xmax, ymin, ymax; /* extent of phmelms in phmelm coordinates */
     double radius;                /*     " "    */
 };
 
 typedef struct image_st  IMAGE;
 typedef struct phm_st    PHANTOM;
 
-#define P_PHMELEMS     0       /* PHANTOM made of phmelems */
-#define P_UNIT_PULSE   1       /* Special PHANTOM, not made of phmelems */
+#define P_PHMELMS      0       /* Phantom made of phmelms */
+#define P_UNIT_PULSE   1       /* Special PHANTOM, not made of phmelms */
 #define P_FILTER       9       /* defined only by a type */
 
 /*----------------------------------------------------------------------*/
@@ -199,7 +202,7 @@ typedef struct raysum_st   RAYSUM;
 /*                             USER SYMBOLS                            */
 /*----------------------------------------------------------------------*/
 
-/* codes for phmelem types, passed to add_obj() */
+/* codes for phmelm types, passed to add_obj() */
 
 #define O_RECTANGLE  1
 #define O_TRIANGLE   2
@@ -210,7 +213,7 @@ typedef struct raysum_st   RAYSUM;
 /* Codes for Coordinate Types      */
 /* Defines coords for pelm_is_point_inside() */
 
-#define PELM_COORD -1          /* Normalized Phmelem Coordinates */
+#define PELM_COORD -1          /* Normalized Phmelm Coordinates */
 #define PHM_COORD -2           /* User's PHANTOM Coordinates */
 
 /* Codes for Filter types */
@@ -254,7 +257,7 @@ typedef struct raysum_st   RAYSUM;
 /* Constants for sizing PHANTOM */
 
 #define PERCENT_PHM_SIZE_INCR   0.0    /* Fractional increase in PHANTOM */
-                                       /* limits compared to phmelem size */
+                                       /* limits compared to phmelm size */
 #define N_EXTRA_DETECTORS         4    /* Number of extra detectors */
                                        /* widths when calculating detlen */
 
@@ -443,9 +446,9 @@ PHANTOM *phm_init(void);
 int phm_add_pelm_file(PHANTOM *phm, const char *fname);
 void phm_add_pelm (PHANTOM *phm, const int type, const double cx, const double cy, 
               const double u, const double v, const double rot, const double atten);
-int pelm_make_points(PHMELEM *obj);
-void pelm_make_xform (PHMELEM *obj);
-PHMELEM *pelm_alloc(void);
+int pelm_make_points(PHMELM *obj);
+void pelm_make_xform (PHMELM *obj);
+PHMELM *pelm_alloc(void);
 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);
@@ -458,7 +461,7 @@ void phm_draw(const PHANTOM *phm);
 /* phm2image.c */
 void phm_to_image(const PHANTOM *phm, IMAGE *im, const int col_start, const int col_count,
                  const int nsample, const int trace);
-int pelm_is_point_inside(const PHMELEM *obj, double x, double y, const int coord_type);
+int pelm_is_point_inside(const PHMELM *obj, double x, double y, const int coord_type);
 
 /* phmstd.c */
 void phm_std_herman (PHANTOM *phm);
@@ -469,8 +472,8 @@ void phm_std_rowland_bordered (PHANTOM *phm);
 int raysum_collect(RAYSUM *rs, const DETECTOR *det, const PHANTOM *phm, const int start_view, const int trace, const int unit_pulse);
 void rayview(const PHANTOM *phm, DETARRAY *darray, const DETECTOR *det, const double xd1, const double yd1, const double xd2, const double yd2, const double xs1, const double ys1, const double xs2, const double ys2, const int unit_pulse);
 double phm_ray_attenuation (const PHANTOM *phm, const double x1, const double y1, const double x2, const double y2);
-double pelm_ray_attenuation (const PHMELEM *obj, const double x1, const double y1, const double x2, const double y2);
-int pelm_clip_line (const PHMELEM *obj, double *x1, double *y1, double *x2, double *y2);
+double pelm_ray_attenuation (const PHMELM *obj, const double x1, const double y1, const double x2, const double y2);
+int pelm_clip_line (const PHMELM *obj, double *x1, double *y1, double *x2, double *y2);
 void raysum_trace_show_param (const char *label, const char *fmt, int row, int color, ...);
 
 /* scanner.c */