X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctsim%2Fbackprojectors.cpp;h=7926b0d27301b9946ea575369bd41fca88a80f6f;hb=fd1d136a94a6d20013f38d6a997bdfefad0f5e98;hp=0d3cd804892ec01ed3b8e5299122fbfd9781b6de;hpb=55426f4170ed9dc777c3cec3741e4a59e6eebd38;p=ctsim.git diff --git a/libctsim/backprojectors.cpp b/libctsim/backprojectors.cpp index 0d3cd80..7926b0d 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.18 2000/12/06 15:17:51 kevin Exp $ +** $Id: backprojectors.cpp,v 1.20 2000/12/18 09:31:26 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 @@ -263,7 +263,13 @@ Backproject::Backproject (const Projections& proj, ImageFile& im, int interpType nDet = proj.nDet(); iDetCenter = (nDet - 1) / 2; // index refering to L=0 projection rotScale = proj.rotInc(); - rotScale /= (proj.nView() * proj.rotInc() / PI); // scale by number of PI rotations + + 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(); @@ -301,7 +307,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 - ostringstream os; + std::ostringstream os; os << "ix=" << ix << ", iy=" << iy << ", theta=" << theta << ", L=" << L << ", detinc=" << detInc << "\n"; os << "ndet=" << nDet << ", detInc=" << detInc << ", iDetCenter=" << iDetCenter << "\n"; os << "xMin=" << xMin << ", xMax=" << xMax << ", xInc=" << xInc << "\n";