r128: *** empty log message ***
[ctsim.git] / libctsim / projections.cpp
index 6e21b3568285ded1049dccf2d2ca9f7052e26a8f..b54186447141fafa9f21b672dd120820c32bb20d 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.8 2000/07/02 18:21:39 kevin Exp $
+**  $Id: projections.cpp,v 1.9 2000/07/03 11:02:06 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
@@ -491,7 +491,6 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
 {
   int nview = m_nView;
   double detInc = m_detInc;
-  double detlen = (m_nDet - 1) * detInc;
   int n_filteredProj = m_nDet;
   double filteredProj [n_filteredProj];   // filtered projections
 
@@ -506,8 +505,7 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
 #endif
 
   double filterBW = 1. / detInc;
-
-  SignalFilter filter (filterName, filterMethodName, filterBW, detlen, m_nDet, filt_param, "spatial", 0);
+  SignalFilter filter (filterName, filterMethodName, filterBW, m_detInc, m_nDet, filt_param, "spatial", 0);
   if (filter.fail()) {
       sys_error (ERR_SEVERE, "%s [Projections::reconstruct]", filter.failMessage().c_str());
       return false;
@@ -524,8 +522,8 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
   if (trace > TRACE_TEXT)  {
     int i;
     double f;
-    double filterInc = (detlen * 2) / (n_vec_filter - 1);
-    for (i = 0, f = -detlen; i < n_vec_filter; i++, f += filterInc)
+    double filterInc = filter.getFilterIncrement();
+    for (i = 0, f = filter.getFilterMin(); i < n_vec_filter; i++, f += filterInc)
       plot_xaxis[i] = f;
       
     gid = ezplot (plot_xaxis, filter.getFilter(), n_vec_filter);
@@ -551,7 +549,7 @@ Projections::reconstruct (ImageFile& im, const char* const filterName, double fi
     DetectorArray& darray = getDetectorArray (iview);
     DetectorValue* detval = darray.detValues();
 
-    filter.filterSignal (detval, filteredProj, detInc, m_nDet);
+    filter.filterSignal (detval, filteredProj);
 
     //    for (int j = 0; j < m_nDet; j++)
     //      filteredProj[j] = filter.convolve (detval, detInc, j, m_nDet);