X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=include%2Fir.h;h=c7f63a04b87053081ddb20a2fc547506fb7f337c;hb=d46f5229565d6fdd6c3d164ee0790433ff9118a2;hp=e510c75b8ddc332da4a47b2fe7cc6331bfe38965;hpb=9c40ac1eddbc3ed2b68c88e20b332bd727ca2dde;p=ctsim.git diff --git a/include/ir.h b/include/ir.h index e510c75..c7f63a0 100644 --- a/include/ir.h +++ b/include/ir.h @@ -2,8 +2,14 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ir.h,v 1.3 2000/04/29 23:24:29 kevin Exp $ +** $Id: ir.h,v 1.5 2000/05/02 20:00:25 kevin Exp $ ** $Log: ir.h,v $ +** Revision 1.5 2000/05/02 20:00:25 kevin +** *** empty log message *** +** +** Revision 1.4 2000/05/02 15:31:39 kevin +** code cleaning +** ** Revision 1.3 2000/04/29 23:24:29 kevin ** *** empty log message *** ** @@ -376,27 +382,14 @@ int main(const int argc, char * const argv[]); /* bspline.c */ int bspline(int samples, int zoom_factor, int spline_order, double input[], double output[]); -/* clip.c */ -int inside_obj(const OBJECT *obj, double x, double y, const int coord_type); -int clipsegment(double *x1, double *y1, double *x2, double *y2, const double u, const double v); -int clipsector(double *x1, double *y1, double *x2, double *y2, const double u, const double v); -int clipcircle(double *x1, double *y1, double *x2, double *y2, const double cx, const double cy, const double radius, double t1, double t2); -int cliptriangle(double *x1, double *y1, double *x2, double *y2, const double u, const double v, const int clip_xaxis); /* 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); -/* ctsub.c */ -OBJECT *alloc_obj(int n); -void dminmax(const double array[], const int pts, double *xmin, double *xmax); 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); /* filt.c */ -const char *interp_name_of(int interp_type); -const char *filter_name_of(int filt_type); -int interp_select(void); -int filter_select(double *filt_param); double d_filtfunc(int filt_type, double x, double bw, double param, int n); double filter_freq(int filt_type, double u, double bw, double param); double a_filtfunc(int filt_type, double x, double bw, double param); @@ -425,13 +418,14 @@ int opt_set_trace(const char *optarg, const char *program); const char *name_of_picture(const int picnum); int opt_set_picture(const char *optarg, const char *program); int opt_set_interpolation(const char *optarg, const char *program); +const char *name_of_interpolation(int interp_type); int opt_set_filter(const char *optarg, const char *program); const char *name_of_filter(const int filter); int opt_set_filter_domain(const char *optarg, const char *program); const char *name_of_filter_domain(const int domain); int opt_set_backproj(const char *optarg, const char *program); const char *name_of_backproj(const int backproj); -/* pic.c */ +/* phm.c */ PICTURE *select_pic(void); PICTURE *create_pic_from_file(const char *fname); PICTURE *create_pic(const int picnum); @@ -445,24 +439,27 @@ void makeobjxform(OBJECT *obj); 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); +OBJECT *alloc_obj(void); void prt_pic(PICTURE *pic); void show_pic(const PICTURE *pic); void draw_pic(const PICTURE *pic); -/* pic2image.c */ +/* phm2image.c */ void pic_to_image(const PICTURE *pic, IMAGE *im, const int col_start, const int col_count, const int nsample, const int trace); +int inside_obj(const OBJECT *obj, double x, double y, const int coord_type); /* ray.c */ -void rs_trace_showprm (const char *label, const char *fmt, int row, int color, ...); DETECTOR *detect_create(const PICTURE *pic, int ndet, int nview, int nsample, const double rot_anglen); void detect_free(DETECTOR *det); +double calc_rsum(const PICTURE *pic, const double x1, const double y1, const double x2, const double y2); +double calc_objsum(const OBJECT *obj, const double x1, const double y1, const double x2, const double y2); +int clipobj(const OBJECT *obj, double *x1, double *y1, double *x2, double *y2); +/* raycollect.c */ int raysum_collect(RAYSUM *rs, const DETECTOR *det, const PICTURE *pic, const int start_view, const int trace, const int unit_pulse); void rayview(const PICTURE *pic, 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 calc_rsum(const PICTURE *pic, const double x1, const double y1, const double x2, const double y2); -double calc_objsum(const OBJECT *obj, const double x1, const double y1, const double x2, const double y2); -int clipobj(const OBJECT *obj, double *x1, double *y1, double *x2, double *y2); +void rs_trace_showprm (const char *label, const char *fmt, int row, int color, ...); /* rayio.c */ RAYSUM *raysum_create(const char *fname, const int nview, const int ndet); RAYSUM *raysum_create_from_det(const char *fname, const DETECTOR *det); @@ -480,16 +477,9 @@ void detarray_free(DETARRAY *darray); int detarray_read(RAYSUM *rs, DETARRAY *darray, const int view_num); int detarray_write(RAYSUM *rs, const DETARRAY *darray, const int view_num); int raysum_print(const RAYSUM *rs); -/* phantom.c */ +/* phmstd.c */ void herm_head(PICTURE *pic); void row_head(PICTURE *pic); void row_bord_head(PICTURE *pic); -/* xform.c */ -void indent_mtx2(GRFMTX_2D m); -void xlat_mtx2(GRFMTX_2D m, const double x, const double y); -void scale_mtx2(GRFMTX_2D m, const double sx, const double sy); -void rot_mtx2(GRFMTX_2D m, const double theta); -void mult_mtx2(GRFMTX_2D m1, GRFMTX_2D m2, GRFMTX_2D result); -void xform_mtx2(GRFMTX_2D m, double *x, double *y); #endif