r631: no message
[ctsim.git] / libctsim / projections.cpp
index c55aa37a5fcc94b6292ac9b912f93e858bbb5b7f..dc7248e62b9f3e42c86561612e99233c1bd6c245 100644 (file)
@@ -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.59 2001/03/11 15:27:30 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
@@ -885,15 +885,14 @@ Projections::interpolatePolar (ImageFileArray& v, ImageFileArray& vImag,
   }
 }
 
-
 bool
 Projections::initFromSomatomAR_STAR (int iNViews, int iNDets, unsigned char* pData, unsigned long lDataLength)
 {
   init (iNViews, iNDets);
   m_geometry = Scanner::GEOMETRY_EQUIANGULAR;
   m_dFanBeamAngle = iNDets * convertDegreesToRadians (3.06976 / 60);
-  m_dFocalLength = 51;
-  m_dSourceDetectorLength = 89;
+  m_dFocalLength = 510;
+  m_dSourceDetectorLength = 890;
   m_detInc = convertDegreesToRadians (3.06976 / 60);
   m_detStart = -m_dFanBeamAngle / 2;
   m_rotInc = TWOPI / static_cast<double>(iNViews);
@@ -991,7 +990,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 +1089,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;
     }