r110: *** empty log message ***
[ctsim.git] / libctsim / backprojectors.cpp
index d05bccae2cbcaeb2fac8322d3452a03fc04de44b..ef0de98cfaec261d8aa6aae9a5fcadd644c67c40 100644 (file)
@@ -8,7 +8,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: backprojectors.cpp,v 1.1 2000/06/19 02:59:34 kevin Exp $
+**  $Id: backprojectors.cpp,v 1.2 2000/06/19 19:07:33 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
@@ -337,22 +337,18 @@ BackprojectIntDiff2::BackprojectView (const double* const filteredProj, const do
 {
   double theta = - view_angle;  // add half PI to view angle to get perpendicular theta angle
 
-#if SIZEOF_LONG == 8
-  long int scale = 1 << 32;
-#else
-  long int scale = 1 << 16;
-#endif
+  kint32 scale = 1 << 16;
   double dScale = scale;
-  long int halfScale = scale / 2;
+  kint32 halfScale = scale / 2;
 
-  long int det_dx = nearest<long int> (xInc * sin (theta) / detInc * scale);
-  long int det_dy = nearest<long int> (yInc * cos (theta) / detInc * scale);
+  kint32 det_dx = nearest<kint32> (xInc * sin (theta) / detInc * scale);
+  kint32 det_dy = nearest<kint32> (yInc * cos (theta) / detInc * scale);
 
   // calculate L for first point in image (0, 0) 
-  long int detPosColStart = nearest<long int> (start_r * cos (theta - start_phi) / detInc * scale);
+  kint32 detPosColStart = nearest<kint32> (start_r * cos (theta - start_phi) / detInc * scale);
        
   for (int ix = 0; ix < nx; ix++, detPosColStart += det_dx) {
-    long int curDetPos = detPosColStart;
+    kint32 curDetPos = detPosColStart;
     ImageFileColumn pImCol = v[ix];
 
     for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) {
@@ -365,8 +361,8 @@ BackprojectIntDiff2::BackprojectView (const double* const filteredProj, const do
        else
          *pImCol++ += filteredProj[iDetPos];
       } else if (interpType == I_LINEAR) {
-       long int detPosFloor = curDetPos / scale;
-       long int detPosRemainder = curDetPos % scale;
+       kint32 detPosFloor = curDetPos / scale;
+       kint32 detPosRemainder = curDetPos % scale;
        if (detPosRemainder < 0) {
          detPosFloor--;
          detPosRemainder += scale;