X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fbackprojectors.cpp;h=bab1dc7b18fc75e349cc961c43165f884545ed87;hp=fc3c95882dd768458613be752749c10e759978a9;hb=c953cbb6ffc2fd50e736230f4e6976a025983cff;hpb=a4b718a2681d65cb56e62400cec28bc09f9509e1 diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index fc3c958..bab1dc7 100644 --- a/libctsim/backprojectors.cpp +++ b/libctsim/backprojectors.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: backprojectors.cpp,v 1.28 2001/02/23 02:06:01 kevin Exp $ +** $Id: backprojectors.cpp,v 1.29 2001/03/01 07:30:49 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 @@ -289,6 +289,7 @@ Backproject::Backproject (const Projections& proj, ImageFile& im, int interpType yInc = (yMax - yMin) / ny; m_dFocalLength = proj.focalLength(); + m_dSourceDetectorLength = proj.sourceDetectorLength(); } Backproject::~Backproject () @@ -664,10 +665,8 @@ BackprojectEquilinear::BackprojectView (const double* const filteredProj, const double dU = (m_dFocalLength + rsin_t) / m_dFocalLength; double dDetPos = rcos_t / dU; - // double to scale for imaginary detector that passes through origin - // of phantom, see Kak-Slaney Figure 3.22. This assumes that the detector is also - // located focal-length away from the origin. - dDetPos *= 2; + // Scale for imaginary detector that passes through origin of phantom, see Kak-Slaney Figure 3.22. + dDetPos *= m_dSourceDetectorLength / m_dFocalLength; double dPos = dDetPos / detInc; // position along detector array if (interpType == Backprojector::INTERP_NEAREST) {