projects
/
ctsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d6553a8
)
r7950: minor efficiency change
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 5 Oct 2003 17:23:18 +0000
(17:23 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 5 Oct 2003 17:23:18 +0000
(17:23 +0000)
libctsim/backprojectors.cpp
patch
|
blob
|
history
diff --git
a/libctsim/backprojectors.cpp
b/libctsim/backprojectors.cpp
index 581b7ff0fccae2c4762723da08331f0f2d6d8b9a..ef1ef12e655738f3b1e1b06bd13fbba148f38b28 100644
(file)
--- a/
libctsim/backprojectors.cpp
+++ b/
libctsim/backprojectors.cpp
@@
-631,10
+631,10
@@
BackprojectIntDiff::BackprojectView (const double* const filteredProj, const dou
} else if (interpType == Backprojector::INTERP_LINEAR) {
for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) {
const long iDetPos = curDetPos >> scaleShift;
} else if (interpType == Backprojector::INTERP_LINEAR) {
for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) {
const long iDetPos = curDetPos >> scaleShift;
- const long detRemainder = curDetPos & scaleBitmask;
- if (iDetPos >= 0 && iDetPos <= iLastDet)
-
*pImCol++ += filteredProj[iDetPos] + (detRemainder * deltaFilteredProj[iDetPos]);
-
+ if (iDetPos >= 0 && iDetPos <= iLastDet) {
+ const long detRemainder = curDetPos & scaleBitmask;
+ *pImCol++ += filteredProj[iDetPos] + (detRemainder * deltaFilteredProj[iDetPos]);
+ }
} // end for iy
} else if (interpType == Backprojector::INTERP_CUBIC) {
for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) {
} // end for iy
} else if (interpType == Backprojector::INTERP_CUBIC) {
for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) {