From e99ef5538ce4756a0b3e77d347076ef5c041c629 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Mon, 16 Oct 2006 17:05:49 +0000 Subject: [PATCH] r11223: Oct 15, 2006 Version 4.5.0 * libctsim/backprojectors.cpp: Fix for iteration bug in backprojection and simply computing rotScale -- thanks to Dan Martin. --- ChangeLog | 4 ++++ configure.ac | 2 +- debian/changelog | 6 ++++++ libctsim/backprojectors.cpp | 13 +++++++++---- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 10e2397..a376cb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Oct 15, 2006 Version 4.5.0 + * libctsim/backprojectors.cpp: Fix for iteration bug in backprojection + and simply computing rotScale -- thanks to Dan Martin. + Mar 16, 2006 Version 4.4.4 * Changes for g++ 4.1 support diff --git a/configure.ac b/configure.ac index bf2fba6..4de3646 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl CDPATH= AC_INIT AC_CONFIG_SRCDIR([src/ctsim.cpp]) AM_MAINTAINER_MODE -AM_INIT_AUTOMAKE(ctsim,4.3.4) +AM_INIT_AUTOMAKE(ctsim,4.5.0x) AM_CONFIG_HEADER(config.h) dnl Checks for programs. diff --git a/debian/changelog b/debian/changelog index 314c416..a345842 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ctsim (4.5.0-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Mon, 16 Oct 2006 10:57:24 -0600 + ctsim (4.4.5-1) unstable; urgency=low * Update automake files from upstream diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index ef1ef12..2d0d60c 100644 --- a/libctsim/backprojectors.cpp +++ b/libctsim/backprojectors.cpp @@ -270,12 +270,11 @@ Backproject::Backproject (const Projections& proj, ImageFile& im, int interpType detInc = proj.detInc(); nDet = proj.nDet(); iDetCenter = (nDet - 1) / 2; // index refering to L=0 projection - rotScale = proj.rotInc(); if (proj.geometry() == Scanner::GEOMETRY_PARALLEL) - rotScale /= (proj.nView() * proj.rotInc() / PI); // scale by number of PI rotations + rotScale = PI / proj.nView(); // scale by number of PI rotations else if (proj.geometry() == Scanner::GEOMETRY_EQUIANGULAR || proj.geometry() == Scanner::GEOMETRY_EQUILINEAR) - rotScale /= (proj.nView() * proj.rotInc() / (2 * PI)); // scale by number of 2PI rotations + rotScale = (2 * PI) / proj.nView(); // scale by number of 2PI rotations else sys_error (ERR_SEVERE, "Invalid geometry type %d [Backproject::Backproject]", proj.geometry()); @@ -621,12 +620,17 @@ BackprojectIntDiff::BackprojectView (const double* const filteredProj, const dou const int iDetPos = (curDetPos + halfScale) >> scaleShift; if (iDetPos >= 0 && iDetPos <= iLastDet) *pImCol++ += filteredProj[iDetPos]; + else + pImCol++; + } // end for iy } else if (interpType == Backprojector::INTERP_FREQ_PREINTERPOLATION) { for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) { const int iDetPos = ((curDetPos + halfScale) >> scaleShift) * m_interpFactor; if (iDetPos >= 0 && iDetPos <= iLastDet) *pImCol++ += filteredProj[iDetPos]; + else + pImCol++; } // end for iy } else if (interpType == Backprojector::INTERP_LINEAR) { for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) { @@ -634,7 +638,8 @@ BackprojectIntDiff::BackprojectView (const double* const filteredProj, const dou if (iDetPos >= 0 && iDetPos <= iLastDet) { const long detRemainder = curDetPos & scaleBitmask; *pImCol++ += filteredProj[iDetPos] + (detRemainder * deltaFilteredProj[iDetPos]); - } + } else + pImCol++; } // end for iy } else if (interpType == Backprojector::INTERP_CUBIC) { for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) { -- 2.34.1