From: Kevin M. Rosenberg Date: Thu, 29 Jun 2000 12:39:46 +0000 (+0000) Subject: r124: *** empty log message *** X-Git-Tag: debian-4.5.3-3~893 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=931ea35fdc3a7e463602644e6938730556bf92a7 r124: *** empty log message *** --- diff --git a/include/filter.h b/include/filter.h index 9bbf554..5512bf8 100644 --- a/include/filter.h +++ b/include/filter.h @@ -18,7 +18,17 @@ class SignalFilter { FILTER_ABS_COSINE, FILTER_SHEPP } FilterID; - + + typedef enum { + FILTER_METHOD_INVALID, + FILTER_METHOD_CONVOLUTION, + FILTER_METHOD_FOURIER, + FILTER_METHOD_FFT, + FILTER_METHOD_FFT_ZEROPAD_2, + FILTER_METHOD_FFT_ZEROPAD_4, + FILTER_METHOD_FFT_ZEROPAD_6 + } FilterMethodID; + typedef enum { DOMAIN_INVALID, DOMAIN_FREQ, @@ -36,6 +46,13 @@ class SignalFilter { static const char FILTER_HAMMING_STR[]= "hamming"; static const char FILTER_TRIANGLE_STR[]= "triangle"; + static const char FILTER_METHOD_CONVOLUTION_STR[]= "convolution"; + static const char FILTER_METHOD_FOURIER_STR[]= "fourier"; + static const char FILTER_METHOD_FFT_STR[]= "fft"; + static const char FILTER_METHOD_FFT_ZEROPAD_2_STR[]="fft_zeropad2"; + static const char FILTER_METHOD_FFT_ZEROPAD_4_STR[]="fft_zeropad4"; + static const char FILTER_METHOD_FFT_ZEROPAD_6_STR[]="fft_zeropad6"; + static const char DOMAIN_FREQ_STR[]= "freq"; static const char DOMAIN_SPATIAL_STR[]= "spatial"; @@ -82,8 +99,10 @@ class SignalFilter { bool m_fail; string m_failMessage; string m_nameFilter; + string m_nameFilterMethod; string m_nameDomain; FilterID m_idFilter; + FilterMethodID m_idFilterMethod; DomainID m_idDomain; double m_filterParam; int m_numIntegral; diff --git a/include/projections.h b/include/projections.h index 8d5acac..1bbeafc 100644 --- a/include/projections.h +++ b/include/projections.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.h,v 1.6 2000/06/27 10:48:11 kevin Exp $ +** $Id: projections.h,v 1.7 2000/06/29 12:39:45 kevin Exp $ ** ** ** This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ class Projections bool detarrayRead (fnetorderstream& fs, DetectorArray& darray, const int view_num); bool detarrayWrite (fnetorderstream& fs, const DetectorArray& darray, const int view_num); - bool reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const interpName, int interp_param, const char* const backprojName, const int trace); + bool reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const char* const interpName, int interp_param, const char* const backprojName, const int trace); void setNView (int nView); // used in MPI to restrict # of views void setRotInc (double rotInc) { m_rotInc = rotInc;} diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index d260320..03a5f1a 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.3 2000/06/28 15:25:34 kevin Exp $ +** $Id: array2dfile.cpp,v 1.4 2000/06/29 12:39:46 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 @@ -540,9 +540,7 @@ Array2dFile::labelsCopy (Array2dFile& copyFile, const char* const idStr) { string id = idStr; for (int i = 0; i < copyFile.getNumLabels(); i++) { - Array2dFileLabel l = copyFile.labelGet (i); - copyFile.labelGet(i).print(cout); - l.print(cout); + Array2dFileLabel l (copyFile.labelGet (i)); string lstr = l.getLabelString(); lstr = idStr + lstr; l.setLabelString (lstr); diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index 7b13546..3a071b4 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.6 2000/06/27 10:48:11 kevin Exp $ +** $Id: projections.cpp,v 1.7 2000/06/29 12:39:46 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 @@ -487,7 +487,7 @@ Projections::printScanInfo (void) const */ bool -Projections::reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const interpName, int interp_param, const char* const backprojectName, const int trace) +Projections::reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const char* const interpName, int interp_param, const char* const backprojectName, const int trace) { int nview = m_nView; double det_inc = m_detInc; diff --git a/src/pjrec.cpp b/src/pjrec.cpp index 1901952..6f9fb7a 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.2 2000/06/27 10:48:11 kevin Exp $ +** $Id: pjrec.cpp,v 1.3 2000/06/29 12:39:46 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 @@ -114,6 +114,7 @@ pjrec_main (int argc, char * argv[]) int optTrace = TRACE_NONE; double optFilterParam = -1; string optFilterName = SignalFilter::FILTER_ABS_BANDLIMIT_STR; + string optFilterMethodName = SignalFilter::FILTER_METHOD_CONVOLUTION_STR; string optInterpName = Backprojector::INTERP_LINEAR_STR; string optBackprojName = Backprojector::BPROJ_IDIFF2_STR; // string optFilterMethodName = SignalFilter::FILTER_METHOD_CONVOLUTION_STR; @@ -271,7 +272,7 @@ pjrec_main (int argc, char * argv[]) #ifdef HAVE_MPI TimerCollectiveMPI timerReconstruct (mpiWorld.getComm()); - projLocal.reconstruct (*imLocal, optFilterName.c_str(), optFilterParam, optInterpName.c_str(), optInterpParam, optBackprojName.c_str(), optTrace); + projLocal.reconstruct (*imLocal, optFilterName.c_str(), optFilterParam, optFilterMethodName.c_str(), optInterpName.c_str(), optInterpParam, optBackprojName.c_str(), optTrace); if (optVerbose) timerReconstruct.timerEndAndReport ("Time to reconstruct");