r142: *** empty log message ***
[ctsim.git] / libctsim / projections.cpp
index db6431411cff6a435d78a2dfb31a9407a7a1f95b..8f1edf7b4e7f8ed32757b0c522cae49264784751 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.12 2000/07/06 08:30:30 kevin Exp $
+**  $Id: projections.cpp,v 1.13 2000/07/11 10:32:44 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,17 +487,17 @@ Projections::printScanInfo (void) const
  */
 
 bool
-Projections::reconstruct (ImageFile& im, const char* const filterName, double filt_param, const char* const filterMethodName, const int zeropad, 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 int zeropad, const char* const interpName, int interpFactor, const char* const backprojectName, const int trace)
 {
   int nview = m_nView;
   double detInc = m_detInc;
-  int n_filteredProj = m_nDet;
+  int n_filteredProj = m_nDet * interpFactor;
   double filteredProj [n_filteredProj];   // filtered projections
 
 #ifdef HAVE_BSPLINE_INTERP
   int spline_order = 0, zoom_factor = 0;
   if (interp_type == I_BSPLINE) {
-    zoom_factor = interp_param;
+    zoom_factor = interpFactor;
     spline_order = 3;
     zoom_factor = 3;
     n_filteredProj = (m_nDet - 1) * (zoom_factor + 1) + 1;
@@ -505,7 +505,7 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
 #endif
 
   double filterBW = 1. / detInc;
-  SignalFilter filter (filterName, filterMethodName, filterBW, m_detInc, m_nDet, filt_param, "spatial", zeropad);
+  SignalFilter filter (filterName, filterMethodName, filterBW, m_detInc, m_nDet, filt_param, "spatial", zeropad, interpFactor);
   filter.setTraceLevel(trace);
 
   if (filter.fail()) {
@@ -540,7 +540,7 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
   }
 #endif  //HAVE_SGP
 
-  Backprojector bj (*this, im, backprojectName, interpName);
+  Backprojector bj (*this, im, backprojectName, interpName, interpFactor);
   if (bj.fail()) {
     sys_error (ERR_SEVERE, "%s [Projections::reconstruct]", bj.failMessage().c_str());
     return false;
@@ -574,8 +574,9 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
       ezset  ("xporigin .5.");
       ezset  ("xlength .5.");
       ezset ("box");
+
       ezset ("grid");
-      gid = ezplot (filteredProj, plot_xaxis, m_nDet);
+      gid = ezplot (filteredProj, plot_xaxis, n_filteredProj);
     }
 #endif  //HAVE_SGP