X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=libctsim%2Fbackprojectors.cpp;h=1f8a1d21b0a04a7ae0390541be950e8c603239e8;hb=c00c639073653fac7463a88f2b000f263236550d;hp=7926b0d27301b9946ea575369bd41fca88a80f6f;hpb=ebb615bb35cf344a765aa65414982904e59f961b;p=ctsim.git diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index 7926b0d..1f8a1d2 100644 --- a/libctsim/backprojectors.cpp +++ b/libctsim/backprojectors.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: backprojectors.cpp,v 1.20 2000/12/18 09:31:26 kevin Exp $ +** $Id: backprojectors.cpp,v 1.22 2001/01/02 16:02:13 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 @@ -84,7 +84,7 @@ const char* Backprojector::s_aszInterpTitle[] = { {"Nearest"}, {"Linear"}, - {"Frequency Preinterpolationj"}, + {"Frequency Preinterpolation"}, #if HAVE_BSPLINE_INTERP {"B-Spline"}, {"B-Spline 1st Order"}, @@ -264,12 +264,12 @@ Backproject::Backproject (const Projections& proj, ImageFile& im, int interpType 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 - 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 - else - sys_error (ERR_SEVERE, "Invalid geometry type %d [Backproject::Backproject]", proj.geometry()); + if (proj.geometry() == Scanner::GEOMETRY_PARALLEL) + rotScale /= (proj.nView() * proj.rotInc() / PI); // 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 + else + sys_error (ERR_SEVERE, "Invalid geometry type %d [Backproject::Backproject]", proj.geometry()); v = im.getArray(); nx = im.nx(); @@ -305,7 +305,7 @@ void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, doubl } void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, double L, int iDetPos) -{ +{ #if 1 std::ostringstream os; os << "ix=" << ix << ", iy=" << iy << ", theta=" << theta << ", L=" << L << ", detinc=" << detInc << "\n"; @@ -314,7 +314,7 @@ void Backproject::errorIndexOutsideDetector (int ix, int iy, double theta, doubl os << "yMin=" << yMin << ", yMax=" << yMax << ", yInc=" << yInc << "\n"; os << "iDetPos index outside bounds: " << iDetPos << " [backprojector]";; - sys_error (ERR_WARNING, os.str().c_str()); + sys_error (ERR_WARNING, os.str().c_str()); #endif } @@ -639,8 +639,8 @@ BackprojectIntDiff3::BackprojectView (const double* const filteredProj, const do *pImCol++ += filteredProj[iDetPos] + (detRemainder * deltaFilteredProj[iDetPos]); } // end for iy } //end linear - } // end for ix - + } // end for ix + delete deltaFilteredProj; }