From a7bc93cf526e313d69b068f0cb866b5ef108eaf0 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 2 May 2000 15:31:47 +0000 Subject: [PATCH] r27: code cleaning --- include/ir.h | 14 +++++++------- include/kmath.h | 16 ++++++---------- src/ctrec.c | 11 +++++++---- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/include/ir.h b/include/ir.h index e510c75..081e0bc 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.3 2000/04/29 23:24:29 kevin Exp $ +** $Id: ir.h,v 1.4 2000/05/02 15:31:39 kevin Exp $ ** $Log: ir.h,v $ +** 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 *** ** @@ -386,17 +389,12 @@ int cliptriangle(double *x1, double *y1, double *x2, double *y2, const double u, 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,6 +423,7 @@ 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); @@ -445,6 +444,7 @@ 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); @@ -490,6 +490,6 @@ 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); +void xform_mtx2(const GRFMTX_2D m, double *x, double *y); #endif diff --git a/include/kmath.h b/include/kmath.h index b3a8771..f19e2d8 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.4 2000/04/30 19:17:35 kevin Exp $ +** $Id: kmath.h,v 1.5 2000/05/02 15:31:39 kevin Exp $ ** $Log: kmath.h,v $ +** Revision 1.5 2000/05/02 15:31:39 kevin +** code cleaning +** ** Revision 1.4 2000/04/30 19:17:35 kevin ** Set up include files for conditional INTERACTIVE_GRAPHICS ** @@ -26,17 +29,10 @@ ******************************************************************************/ /****************************************************************************** * - * FILE IDENTIFICATION - * - * File Name: NUMR.H - * Author: Kevin Rosenberg - * Purpose: Header file containing definitions for numerical app's + * PURPOSE + * Header file containing definitions for numerical app's * Date Started: Nov 84 * - * DESCRIPTION - * - * MODIFICATION LOG - * *****************************************************************************/ #ifndef _H_kmath diff --git a/src/ctrec.c b/src/ctrec.c index d270675..2e53770 100644 --- a/src/ctrec.c +++ b/src/ctrec.c @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctrec.c,v 1.5 2000/04/30 11:41:06 kevin Exp $ +** $Id: ctrec.c,v 1.6 2000/05/02 15:31:47 kevin Exp $ ** $Log: ctrec.c,v $ +** Revision 1.6 2000/05/02 15:31:47 kevin +** code cleaning +** ** Revision 1.5 2000/04/30 11:41:06 kevin ** Cleaned up debugging code ** @@ -238,13 +241,13 @@ main (const int argc, char *const argv[]) if (opt_filter == W_G_HAMMING || opt_filter == W_AG_HAMMING) sprintf (filt_name, "%s: alpha = %.2f", - filter_name_of (opt_filter), opt_filter_param); + name_of_filter (opt_filter), opt_filter_param); else - sprintf (filt_name, "%s", filter_name_of (opt_filter)); + sprintf (filt_name, "%s", name_of_filter (opt_filter)); sprintf (remark, "Reconstruct: %dx%d, %s, %s, %s", - nx, ny, filt_name, interp_name_of (opt_interp), name_of_backproj(opt_backproj)); + nx, ny, filt_name, name_of_interpolation (opt_interp), name_of_backproj(opt_backproj)); if (opt_verbose) fprintf (stdout, "%s\n", remark); -- 2.34.1