r640: no message
[ctsim.git] / libctsim / projections.cpp
index 95cbc89a34c211c50e4abacf2f0a8bfafa0e56cb..1aee958e6fdcd42c4addfee161471ccb38780a74 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: projections.cpp,v 1.66 2001/03/13 14:53:44 kevin Exp $
+**  $Id: projections.cpp,v 1.67 2001/03/18 18:08:25 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
@@ -810,7 +810,7 @@ Projections::calcArrayPolarCoordinates (unsigned int nx, unsigned int ny, double
 
   // +1 is correct for frequency data, ndet-1 is correct for projections
   int iDetCenter = (iNumDetWithZeros - 1) / 2; // index refering to L=0 projection 
-  if (iNumDetWithZeros % 2 == 0)
+  if (isEven (iNumDetWithZeros))
     iDetCenter = (iNumDetWithZeros + 1) / 2;   
 
   // Calculates polar coordinates (view#, det#) for each point on phantom grid
@@ -1002,7 +1002,7 @@ Projections::interpolateToParallel () const
 #endif
   pProjNew->m_detStart = -m_dViewDiameter / 2;
   pProjNew->m_detInc = m_dViewDiameter / nDet;
-  if (nDet % 2 == 0) // even
+  if (isEven (nDet)) // even
     pProjNew->m_detInc = m_dViewDiameter / (nDet - 1);
 
   ParallelRaysums parallel (this, ParallelRaysums::THETA_RANGE_NORMALIZE_TO_TWOPI);