X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=tools%2Fpjrec.cpp;h=ea230489c36429778cb9f133499624885a7d49d8;hp=d87a76d521653d4998d8f3851312a6f4614945aa;hb=8a7697ce57b56cdc43698cd1241ad98d49f9b5ac;hpb=dc034c9d0b7d9c3874a324a4c2c189a02945adc8 diff --git a/tools/pjrec.cpp b/tools/pjrec.cpp index d87a76d..ea23048 100644 --- a/tools/pjrec.cpp +++ b/tools/pjrec.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: pjrec.cpp,v 1.19 2000/12/16 06:12:47 kevin Exp $ +** $Id$ ** ** 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 @@ -27,7 +27,6 @@ #include "ct.h" #include "timer.h" - enum {O_INTERP, O_FILTER, O_FILTER_METHOD, O_ZEROPAD, O_FILTER_PARAM, O_FILTER_GENERATION, O_BACKPROJ, O_PREINTERPOLATION_FACTOR, O_VERBOSE, O_TRACE, O_HELP, O_DEBUG, O_VERSION}; @@ -49,8 +48,8 @@ static struct option my_options[] = {0, 0, 0, 0} }; -static const char* g_szIdStr = "$Id: pjrec.cpp,v 1.19 2000/12/16 06:12:47 kevin Exp $"; - +static const char* g_szIdStr = "$Id$"; + void pjrec_usage (const char *program) { @@ -62,24 +61,27 @@ pjrec_usage (const char *program) std::cout << " nx-image Number of columns in output image" << std::endl; std::cout << " ny-image Number of rows in output image" << std::endl; std::cout << " --interp Interpolation method during backprojection" << std::endl; - std::cout << " nearest Nearest neighbor interpolation" << std::endl; - std::cout << " linear Linear interpolation" << std::endl; + std::cout << " nearest Nearest neighbor interpolation" << std::endl; + std::cout << " linear Linear interpolation (default)" << std::endl; + std::cout << " cubic Cubic interpolation\n"; #if HAVE_BSPLINE_INTERP - std::cout << " bspline B-spline interpolation" << std::endl; + std::cout << " bspline B-spline interpolation" << std::endl; #endif std::cout << " --preinterpolate Preinterpolation factor (default = 1)\n"; std::cout << " Used only with frequency-based filtering\n"; std::cout << " --filter Filter name" << std::endl; - std::cout << " abs_bandlimit Abs * Bandlimiting (default)" << std::endl; - std::cout << " abs_sinc Abs * Sinc" << std::endl; - std::cout << " abs_cosine Abs * Cosine" << std::endl; - std::cout << " abs_hamming Abs * Hamming" << std::endl; - std::cout << " shepp Shepp-Logan" << std::endl; - std::cout << " bandlimit Bandlimiting" << std::endl; - std::cout << " sinc Sinc" << std::endl; - std::cout << " cosine Cosine" << std::endl; - std::cout << " triangle Triangle" << std::endl; - std::cout << " hamming Hamming" << std::endl; + std::cout << " abs_bandlimit Abs * Bandlimiting (default)" << std::endl; + std::cout << " abs_sinc Abs * Sinc" << std::endl; + std::cout << " abs_cosine Abs * Cosine" << std::endl; + std::cout << " abs_hamming Abs * Hamming" << std::endl; + std::cout << " abs_hanning Abs * Hanning" << std::endl; + std::cout << " shepp Shepp-Logan" << std::endl; + std::cout << " bandlimit Bandlimiting" << std::endl; + std::cout << " sinc Sinc" << std::endl; + std::cout << " cosine Cosine" << std::endl; + std::cout << " triangle Triangle" << std::endl; + std::cout << " hamming Hamming" << std::endl; + std::cout << " hanning Hanning" << std::endl; std::cout << " --filter-method Filter method before backprojections\n";; std::cout << " convolution Spatial filtering (default)\n"; std::cout << " fourier Frequency filtering with discete fourier\n"; @@ -105,10 +107,6 @@ pjrec_usage (const char *program) std::cout << " --trace Set tracing to level" << std::endl; std::cout << " none No tracing (default)" << std::endl; std::cout << " console Text level tracing" << std::endl; - std::cout << " phantom Trace phantom" << std::endl; - std::cout << " proj Trace allrays" << std::endl; - std::cout << " plot Trace plotting" << std::endl; - std::cout << " clipping Trace clipping" << std::endl; std::cout << " --verbose Turn on verbose mode" << std::endl; std::cout << " --debug Turn on debug mode" << std::endl; std::cout << " --version Print version" << std::endl; @@ -123,7 +121,7 @@ static void ReduceImageMPI (MPIWorld& mpiWorld, ImageFile* imLocal, ImageFile* i int -pjrec_main (int argc, char * argv[]) +pjrec_main (int argc, char * const argv[]) { Projections projGlobal; ImageFile* imGlobal = NULL; @@ -139,7 +137,7 @@ pjrec_main (int argc, char * argv[]) std::string sOptFilterMethodName (ProcessSignal::convertFilterMethodIDToName (ProcessSignal::FILTER_METHOD_CONVOLUTION)); std::string sOptFilterGenerationName (ProcessSignal::convertFilterGenerationIDToName (ProcessSignal::FILTER_GENERATION_DIRECT)); std::string sOptInterpName (Backprojector::convertInterpIDToName (Backprojector::INTERP_LINEAR)); - std::string sOptBackprojectName (Backprojector::convertBackprojectIDToName (Backprojector::BPROJ_IDIFF3)); + std::string sOptBackprojectName (Backprojector::convertBackprojectIDToName (Backprojector::BPROJ_IDIFF)); int iOptPreinterpolationFactor = 1; int nx, ny; char *endptr; @@ -331,7 +329,7 @@ pjrec_main (int argc, char * argv[]) return (1); } reconstruct.reconstructAllViews(); - + if (bOptVerbose) timerReconstruct.timerEndAndReport ("Time to reconstruct");