** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ctrec.c,v 1.8 2000/05/04 18:16:34 kevin Exp $
+** $Id: ctrec.c,v 1.9 2000/05/08 20:02:32 kevin Exp $
** $Log: ctrec.c,v $
+** Revision 1.9 2000/05/08 20:02:32 kevin
+** ANSI C changes
+**
** Revision 1.8 2000/05/04 18:16:34 kevin
** renamed filter definitions
**
#include "ct.h"
-#define O_INTERP 1
-#define O_FILTER 2
-#define O_FILTER_PARAM 3
-#define O_BACKPROJ 4
-#define O_VERBOSE 5
-#define O_TRACE 6
-#define O_HELP 7
-#define O_DEBUG 8
-#define O_VERSION 9
+enum {O_INTERP, O_FILTER, O_FILTER_PARAM, O_BACKPROJ, O_VERBOSE, O_TRACE, O_HELP, O_DEBUG, O_VERSION};
static struct option my_options[] =
{
int opt_filter = FILTER_ABS_BANDLIMIT;
int opt_interp = I_LINEAR;
int opt_interp_param = 1;
- int opt_backproj = O_BPROJ_DIFF2;
+ BackprojType opt_backproj = O_BPROJ_DIFF2;
#ifdef MPI_CT
IMAGE *im_local;
RAYSUM *rs_local;
else
sprintf (filt_name, "%s", name_of_filter (opt_filter));
- sprintf (remark,
- "Reconstruct: %dx%d, %s, %s, %s",
+ sprintf (remark, "Reconstruct: %dx%d, %s, %s, %s",
nx, ny, filt_name, name_of_interpolation (opt_interp), name_of_backproj(opt_backproj));
if (opt_verbose)
printf("Time to reduce image = %f secs, max time = %f\n", mpi_t, mpi_t_g);
}
if (mpi_ct.my_rank == 0) {
- strncpy (im_global->remark, remark, MAXREMARK);
+ strncpy (im_global->remark, remark, sizeof(im_global->remark));
time_end = MPI_Wtime();
im_global->calctime = time_end - time_start;
image_save (im_global);
}
#else
raysum_close (rs_global);
- strncpy (im_global->remark, remark, MAXREMARK);
+ strncpy (im_global->remark, remark, sizeof(im_global->remark));
time_end = td_current_sec();
im_global->calctime = time_end - time_start;
image_save (im_global);