X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Fprojections.cpp;h=85933de143d64d86e7f820d2415305bc9c7ee323;hp=c55aa37a5fcc94b6292ac9b912f93e858bbb5b7f;hb=758774f7a87d488faa7412a04d07e4cce140b66c;hpb=d252c3c5784b719fc37f9aad6f657ee3b8ae4900 diff --git a/libctsim/projections.cpp b/libctsim/projections.cpp index c55aa37..85933de 100644 --- a/libctsim/projections.cpp +++ b/libctsim/projections.cpp @@ -8,7 +8,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: projections.cpp,v 1.57 2001/03/11 06:34:37 kevin Exp $ +** $Id: projections.cpp,v 1.58 2001/03/11 12:37:34 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 @@ -991,7 +991,11 @@ Projections::interpolateToParallel () pProjNew->m_label.setDateTime (pProjNew->m_year, pProjNew->m_month, pProjNew->m_day, pProjNew->m_hour, pProjNew->m_minute, pProjNew->m_second); pProjNew->m_rotStart = 0; +#ifdef CONVERT_PARALLEL_PI pProjNew->m_rotInc = PI / nView;; +#else + pProjNew->m_rotInc = TWOPI / nView; +#endif pProjNew->m_detStart = -m_dViewDiameter / 2; pProjNew->m_detInc = m_dViewDiameter / nDet; if (nDet % 2 == 0) // even @@ -1086,10 +1090,12 @@ ParallelRaysums::ParallelRaysums (Projections* pProjections) pC->m_dTheta = normalizeAngle (dViewAngle + dDetPos); pC->m_dT = dFocalLength * sin (dDetPos); } +#ifdef CONVERT_PARALLEL_PI if (pC->m_dTheta >= PI) { // convert T/Theta to 0-PI interval pC->m_dTheta -= PI; - pC->m_dT = -pC->m_dT - pProjections->detInc(); + pC->m_dT = -pC->m_dT; } +#endif pC->m_dRaysum = detValues[iD]; dDetPos += dDetInc; }