r124: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 29 Jun 2000 12:39:46 +0000 (12:39 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Thu, 29 Jun 2000 12:39:46 +0000 (12:39 +0000)
include/filter.h
include/projections.h
libctsim/array2dfile.cpp
libctsim/projections.cpp
src/pjrec.cpp

index 9bbf554873cb6cad0d37eb3994075dcba5c2e4e4..5512bf890fb4596abfffcee223a795de58ef9048 100644 (file)
@@ -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;
index 8d5acacc9c3d0adc0a46a4fd5b1cca175fdcbb73..1bbeafc0c8adebf234c223e587da96e2275d5354 100644 (file)
@@ -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;}
index d260320412f5c44bf1e280aa1b7d5e9c73d8e4f8..03a5f1afdf0424fb3b66584ba1d808e3f5aad6f0 100644 (file)
@@ -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);
index 7b13546bf19ab8c711e8ae1baa81f05fd8ab5b5c..3a071b478bceb2f25761068260791512d3f32ca7 100644 (file)
@@ -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;
index 1901952e5b9b03bdb30b10bcb3c4e2b0c0f228cc..6f9fb7a3fbc3349a9aa7fa210ee7242ebd2f7951 100644 (file)
@@ -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");