r637: Fixed bug in somatom import
[ctsim.git] / libctsim / projections.cpp
index 3eab99c4fe9a8a8725bc2108492eb86302e50a64..43e511f1b469bd09e3d2e42cfe7424e8e73750d0 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.63 2001/03/13 08:24:41 kevin Exp $
+**  $Id: projections.cpp,v 1.64 2001/03/13 09:25:18 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
@@ -895,10 +895,10 @@ Projections::initFromSomatomAR_STAR (int iNViews, int iNDets, unsigned char* pDa
   m_dFocalLength = 510;
   m_dSourceDetectorLength = 890;
   m_detInc = convertDegreesToRadians (3.06976 / 60);
-  m_dFanBeamAngle = (iNDets + 1) * m_detInc;
+  m_dFanBeamAngle = iNDets * m_detInc;
   m_detStart = -(m_dFanBeamAngle / 2);
   m_rotInc = TWOPI / static_cast<double>(iNViews);
-  m_rotStart = HALFPI;
+  m_rotStart = 0;
   m_dViewDiameter = sin (m_dFanBeamAngle / 2) * m_dFocalLength * 2;
 
   if (! ((iNViews == 750 && lDataLength == 1560000L) || (iNViews == 950 && lDataLength == 1976000L) 
@@ -944,6 +944,11 @@ Projections::initFromSomatomAR_STAR (int iNViews, int iNDets, unsigned char* pDa
       detval[id] = iV * dViewScale * pdCosScale[id];
       lDataPos += 2;
     }
+#if 1
+    for (int k = iNDets - 2; k >= 0; k--)
+      detval[k+1] = detval[k];
+    detval[0] = 0;
+#endif
   }
 
   delete pdCosScale;