From d46f5229565d6fdd6c3d164ee0790433ff9118a2 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 2 May 2000 20:00:25 +0000 Subject: [PATCH] r28: *** empty log message *** --- ChangeLog | 3 +++ configure.in | 2 +- include/ir.h | 36 +++++++++++++----------------------- include/kmath.h | 21 +++++++++++++++++++-- include/kstddef.h | 17 +++++++---------- 5 files changed, 43 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e3a60d..58e346a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +0.5.2-b2 - 4/30/200 + Continued code cleanup + 0.5.2-b1 - 4/29/2000 Fixed a few MPI bugs Better documented, coded raysum in-memory on on-disk options diff --git a/configure.in b/configure.in index e40568a..45a3342 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Must reset CDPATH so that bash's cd does not print to stdout dnl CDPATH= AC_INIT(src/ctrec.c) -AM_INIT_AUTOMAKE(ctsim,0.5.2-b2) +AM_INIT_AUTOMAKE(ctsim,0.5.2-b3) AM_CONFIG_HEADER(config.h) dnl Checks for programs. diff --git a/include/ir.h b/include/ir.h index 081e0bc..c7f63a0 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.4 2000/05/02 15:31:39 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 ** @@ -379,17 +382,9 @@ 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 */ -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); @@ -430,7 +425,7 @@ 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); @@ -448,21 +443,23 @@ 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(const GRFMTX_2D m, double *x, double *y); #endif diff --git a/include/kmath.h b/include/kmath.h index f19e2d8..b8b359e 100644 --- a/include/kmath.h +++ b/include/kmath.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: kmath.h,v 1.5 2000/05/02 15:31:39 kevin Exp $ +** $Id: kmath.h,v 1.6 2000/05/02 20:00:25 kevin Exp $ ** $Log: kmath.h,v $ +** Revision 1.6 2000/05/02 20:00:25 kevin +** *** empty log message *** +** ** Revision 1.5 2000/05/02 15:31:39 kevin ** code cleaning ** @@ -163,7 +166,9 @@ typedef struct matrix_st *MTXP; ))))) */ - +/* minmax.c */ +double fmax(const double a, const double b); +void minmax_dvector(const double array[], const int pts, double *xmin, double *xmax); /* cliprect.c */ int cliprect(double *x1, double *y1, double *x2, double *y2, const double rect[4]); /* lnearest.c */ @@ -187,5 +192,17 @@ int mtx_check(const MTX *mtx, const char *func_name); double norm_ang(double theta); /* simpson.c */ double simpson(const double xmin, const double xmax, const double *y, const int np); +/* clip.c */ +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); +/* 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 const m, double *x, double *y); #endif diff --git a/include/kstddef.h b/include/kstddef.h index 04dc900..3ad537a 100644 --- a/include/kstddef.h +++ b/include/kstddef.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: kstddef.h,v 1.4 2000/04/28 18:00:55 kevin Exp $ +** $Id: kstddef.h,v 1.5 2000/05/02 20:00:25 kevin Exp $ ** $Log: kstddef.h,v $ +** Revision 1.5 2000/05/02 20:00:25 kevin +** *** empty log message *** +** ** Revision 1.4 2000/04/28 18:00:55 kevin ** remove unused files ** @@ -180,13 +183,6 @@ double *alloc_double(int n); int *alloc_int(int n); /* fexist.c */ int file_exists(const char *fname); -/* fmax.c */ -double fmax(double a, double b); -/* get_yn.c */ -int get_yn(const char *prompt); -/* getch.c */ -int getch(void); -void ungetch(int c); /* kbasename.c */ char *kbasename(const char *filename); /* iclip.c */ @@ -195,12 +191,13 @@ int iclip(int n, int lb, int ub); char *str_skip_head(const char *str, const char *charlist); /* s_lower.c */ char *str_lower(char *s); +/* s_rmtail.c */ +char *str_wrm_tail(char *str); +char *str_rm_tail(char *str, const char *charlist); /* s_save.c */ char *str_save(const char *s); /* s_upper.c */ char *str_upper(char *str); -/* s_wtail.c */ -char *str_wrm_tail(char *str); /* sysalloc.c */ void *sys_alloc(const int nbytes, const char *name); /* syserror.c */ -- 2.34.1