X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fpjrec.cpp;h=782563cb1dd76d40a48bf0003b6427ae9fc1e4b9;hb=03c4bc505de131323cbc70a70bdceda9229269bf;hp=6f9fb7a3fbc3349a9aa7fa210ee7242ebd2f7951;hpb=931ea35fdc3a7e463602644e6938730556bf92a7;p=ctsim.git diff --git a/src/pjrec.cpp b/src/pjrec.cpp index 6f9fb7a..782563c 100644 --- a/src/pjrec.cpp +++ b/src/pjrec.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: pjrec.cpp,v 1.3 2000/06/29 12:39:46 kevin Exp $ +** $Id: pjrec.cpp,v 1.6 2000/07/04 22:21:01 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -29,12 +29,13 @@ #include "timer.h" -enum {O_INTERP, O_FILTER, O_FILTER_PARAM, O_BACKPROJ, O_VERBOSE, O_TRACE, O_HELP, O_DEBUG, O_VERSION}; +enum {O_INTERP, O_FILTER, O_FILTER_METHOD, O_FILTER_PARAM, O_BACKPROJ, O_VERBOSE, O_TRACE, O_HELP, O_DEBUG, O_VERSION}; static struct option my_options[] = { {"interp", 1, 0, O_INTERP}, {"filter", 1, 0, O_FILTER}, + {"filter-method", 1, 0, O_FILTER_METHOD}, {"filter-param", 1, 0, O_FILTER_PARAM}, {"backproj", 1, 0, O_BACKPROJ}, {"trace", 1, 0, O_TRACE}, @@ -73,6 +74,9 @@ pjrec_usage (const char *program) cout << " cos Cosine" << endl; cout << " triangle Triangle" << endl; cout << " hamming Hamming" << endl; + cout << " --filter-method Filter method before backprojections\n";; + cout << " convolution Spatial filtering (default)\n"; + cout << " fourier Frequency filtering with discete fourier\n"; cout << " --backproj Backprojection Method" << endl; cout << " trig Trigometric functions at every point" << endl; cout << " table Trigometric functions with precalculated table" << endl; @@ -147,6 +151,9 @@ pjrec_main (int argc, char * argv[]) case O_FILTER: optFilterName = optarg; break; + case O_FILTER_METHOD: + optFilterMethodName = optarg; + break; case O_BACKPROJ: optBackprojName = optarg; break; @@ -163,7 +170,7 @@ pjrec_main (int argc, char * argv[]) optDebug = 1; break; case O_TRACE: - if ((optTrace = opt_set_trace(optarg)) < 0) { + if ((optTrace = convertTraceNameToID(optarg)) == TRACE_INVALID) { pjrec_usage(argv[0]); return (1); } @@ -281,7 +288,7 @@ pjrec_main (int argc, char * argv[]) if (optVerbose) timerReduce.timerEndAndReport ("Time to reduce image"); #else - projGlobal.reconstruct (*imGlobal, optFilterName.c_str(), optFilterParam, optInterpName.c_str(), optInterpParam, optBackprojName.c_str(), optTrace); + projGlobal.reconstruct (*imGlobal, optFilterName.c_str(), optFilterParam, optFilterMethodName.c_str(), optInterpName.c_str(), optInterpParam, optBackprojName.c_str(), optTrace); #endif #ifdef HAVE_MPI