X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fir.h;h=0a04c795d74bb149107c832af9b31cbf329711a5;hp=08cdd1d9b2014381b8ecb8eb710ab8ece91ca943;hb=07b93dbf2b66fa23c5378ab0fa42f9a7f0083380;hpb=1e8e203f6b646a69235589d3b8f931da12e77b91;ds=sidebyside diff --git a/include/ir.h b/include/ir.h index 08cdd1d..0a04c79 100644 --- a/include/ir.h +++ b/include/ir.h @@ -2,8 +2,20 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ir.h,v 1.15 2000/05/16 04:33:17 kevin Exp $ +** $Id: ir.h,v 1.19 2000/06/07 00:59:38 kevin Exp $ ** $Log: ir.h,v $ +** Revision 1.19 2000/06/07 00:59:38 kevin +** added imagefiles +** +** Revision 1.18 2000/06/05 01:32:45 kevin +** Added C++ compatibility +** +** Revision 1.17 2000/06/03 06:29:08 kevin +** *** empty log message *** +** +** Revision 1.16 2000/05/24 22:48:17 kevin +** First functional version of SDF library for X-window +** ** Revision 1.15 2000/05/16 04:33:17 kevin ** Updated documentation ** @@ -73,10 +85,6 @@ #ifndef IR_H #define IR_H -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - #ifdef MPI_CT #define MPI_MAX_PROCESS 128 struct mpi_ct_st @@ -259,24 +267,27 @@ static const char D_FREQ_STR[]= "freq"; static const char D_SPATIAL_STR[]= "spatial"; typedef enum { - D_FREQ, + D_FREQ = 1, D_SPATIAL } DomainType; typedef enum { - FUNC_EVEN, /* function types, f[-n] = f[n] */ + FUNC_EVEN = 1, /* function types, f[-n] = f[n] */ FUNC_ODD, /* f[-n] = -f[n] */ FUNC_BOTH /* function has both odd & even components */ } FunctionSymmetry; /* interpolation methods */ +#undef HAVE_BSPLINE_INTERP typedef enum { /* Interpolation methods */ - I_NEAREST, /* Nearest neighbor */ - I_LINEAR, /* Linear interpolation */ + I_NEAREST = 1, /* Nearest neighbor */ +#if HAVE_BSPLINE_INTERP I_BSPLINE, I_1BSPLINE, /* 1st order B-Spline */ I_2BSPLINE, - I_3BSPLINE + I_3BSPLINE, +#endif + I_LINEAR /* Linear interpolation */ } InterpolationType; /* Constants for sizing PHANTOM */ @@ -357,11 +368,15 @@ const static int RAYSUM_TRACE_ROW_ATTEN=18; /************************************************************************* * FUNCTION DECLARATIONS ************************************************************************/ - + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + void usage (const char *program); /* From reconstr.c */ -IMAGE *image_reconst (IMAGE *im, RAYSUM *rs, int filt_type, double filt_param, const InterpolationType interp_type, int interp_param, const BackprojType backproj_type, int const ir_trace); +IMAGE *image_reconst (IMAGE *im, RAYSUM *rs, const FilterType filt_type, double filt_param, InterpolationType interp_type, int interp_param, const BackprojType backproj_type, int const ir_trace); /* From bproj.c */ void backproj_init (const RAYSUM *rs, IMAGE *im, const BackprojType bproj_method); @@ -420,7 +435,9 @@ IMAGE *image_create(const char *fname, const int nx, const int ny); int image_clear(IMAGE *im); int image_save(IMAGE *im); IMAGE *image_load(const char *fname); -void image_filter_response(IMAGE *im, int domain, double bw, int filt_type, double filt_param, int opt_trace); +void image_filter_response(IMAGE *im, const DomainType domain, double bw, const FilterType filt_type, double filt_param, const int opt_trace); +int image_display (const IMAGE *im); +int image_display_scale (const IMAGE *im, const int scale, const double pmin, const double pmax); /* options.c */ int opt_set_trace(const char *optarg); @@ -451,7 +468,7 @@ void calc_arc(double x[], double y[], const int pts, const double xcent, const d void calc_ellipse(double x[], double y[], const int pts, const double u, const double v); int circle_pts(double theta); void phm_print(PHANTOM *phm); -#if HAVE_INTERACTIVE_GRAPHICS +#if HAVE_SGP void phm_show(const PHANTOM *phm); void phm_draw(const PHANTOM *phm); #endif