X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fprojections.cpp;h=b54186447141fafa9f21b672dd120820c32bb20d;hp=6e21b3568285ded1049dccf2d2ca9f7052e26a8f;hb=53c732778ed19ac5231bb17c7e5bd4d2201d9456;hpb=e4ffe82feebf1df2ac1dd14633818eb9a739863f diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index 6e21b35..b541864 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.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);