From da11926c1039ae4c880915db508d69614ec7c79e Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Fri, 5 May 2000 02:37:31 +0000 Subject: [PATCH] r39: renamed phmelm to pelm --- include/ir.h | 53 +++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/include/ir.h b/include/ir.h index cae88b6..5a0b729 100644 --- a/include/ir.h +++ b/include/ir.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ir.h,v 1.10 2000/05/04 18:16:34 kevin Exp $ +** $Id: ir.h,v 1.11 2000/05/05 02:37:31 kevin Exp $ ** $Log: ir.h,v $ +** Revision 1.11 2000/05/05 02:37:31 kevin +** renamed phmelm to pelm +** ** Revision 1.10 2000/05/04 18:16:34 kevin ** renamed filter definitions ** @@ -105,38 +108,38 @@ struct image_st { float calctime; /* time to calculate voxels in seconds */ }; -struct phmelm_st { - int type; /* phmelm type (box, ellipse, etc) */ +struct pelm_st { + int type; /* pelm 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 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; /* phmelm limits */ + double xmin, xmax, ymin, ymax; /* pelm 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 */ + 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 phmelm_st *next; /* pointer to next phmelm in phantom */ + struct pelm_st *next; /* pointer to next pelm in phantom */ }; -typedef struct phmelm_st PHMELM; +typedef struct pelm_st PELM; struct phm_st { /* Phantom structure */ - PHMELM *phmelm_list; /* phmelm linked-list */ + PELM *pelm_list; /* pelm linked-list */ int type; - int n_pelm; /* number of phmelms in phantom */ - double xmin, xmax, ymin, ymax; /* extent of phmelms in phmelm coordinates */ + 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_PHMELMS 0 /* Phantom made of phmelms */ -#define P_UNIT_PULSE 1 /* Special PHANTOM, not made of phmelms */ +#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 */ /*----------------------------------------------------------------------*/ @@ -206,7 +209,7 @@ typedef struct raysum_st RAYSUM; /* USER SYMBOLS */ /*----------------------------------------------------------------------*/ -/* codes for phmelm types, passed to add_obj() */ +/* codes for pelm types, passed to phm_add_pelm() */ #define O_RECTANGLE 1 #define O_TRIANGLE 2 @@ -217,7 +220,7 @@ typedef struct raysum_st RAYSUM; /* Codes for Coordinate Types */ /* Defines coords for pelm_is_point_inside() */ -#define PELM_COORD -1 /* Normalized Phmelm Coordinates */ +#define PELM_COORD -1 /* Normalized Pelm Coordinates */ #define PHM_COORD -2 /* User's PHANTOM Coordinates */ /* Codes for Filter types */ @@ -259,7 +262,7 @@ typedef struct raysum_st RAYSUM; /* Constants for sizing PHANTOM */ #define PERCENT_PHM_SIZE_INCR 0.0 /* Fractional increase in PHANTOM */ - /* limits compared to phmelm size */ + /* limits compared to pelm size */ #define N_EXTRA_DETECTORS 4 /* Number of extra detectors */ /* widths when calculating detlen */ @@ -444,9 +447,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(PHMELM *obj); -void pelm_make_xform (PHMELM *obj); -PHMELM *pelm_alloc(void); +int pelm_make_points(PELM *obj); +void pelm_make_xform (PELM *obj); +PELM *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); @@ -460,7 +463,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 PHMELM *obj, double x, double y, const int coord_type); +int pelm_is_point_inside(const PELM *obj, double x, double y, const int coord_type); /* phmstd.c */ void phm_std_herman (PHANTOM *phm); @@ -471,8 +474,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 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); +double pelm_ray_attenuation (const PELM *obj, const double x1, const double y1, const double x2, const double y2); +int pelm_clip_line (const PELM *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 */ -- 2.34.1