diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-10-12 15:17:10 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2017-10-12 15:17:10 +0200 |
commit | 08df6c4167118e0a3b5f128078f9c13f206a171a (patch) | |
tree | 0883b5967008e83fb1ae3f0a00bd675bba7116b4 /include/astra/FanFlatBeamLineKernelProjector2D.inl | |
parent | 5ad3d86b6e2c39de7465186ec8702053a82b6152 (diff) | |
download | astra-08df6c4167118e0a3b5f128078f9c13f206a171a.tar.gz astra-08df6c4167118e0a3b5f128078f9c13f206a171a.tar.bz2 astra-08df6c4167118e0a3b5f128078f9c13f206a171a.tar.xz astra-08df6c4167118e0a3b5f128078f9c13f206a171a.zip |
Fix some warnings
Diffstat (limited to 'include/astra/FanFlatBeamLineKernelProjector2D.inl')
-rw-r--r-- | include/astra/FanFlatBeamLineKernelProjector2D.inl | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/include/astra/FanFlatBeamLineKernelProjector2D.inl b/include/astra/FanFlatBeamLineKernelProjector2D.inl index c1e1e94..927aa09 100644 --- a/include/astra/FanFlatBeamLineKernelProjector2D.inl +++ b/include/astra/FanFlatBeamLineKernelProjector2D.inl @@ -99,6 +99,9 @@ void CFanFlatBeamLineKernelProjector2D::projectBlock_internal(int _iProjFrom, in Ry = proj->fSrcY - Dy; bool vertical = fabs(Rx) < fabs(Ry); + bool isin = false; + + // vertically if (vertical) { RxOverRy = Rx/Ry; lengthPerRow = detSize * pixelLengthX * sqrt(Rx*Rx + Ry*Ry) / abs(Ry); @@ -106,19 +109,6 @@ void CFanFlatBeamLineKernelProjector2D::projectBlock_internal(int _iProjFrom, in S = 0.5f - 0.5f*fabs(RxOverRy); T = 0.5f + 0.5f*fabs(RxOverRy); invTminSTimesLengthPerRow = lengthPerRow / (T - S); - } else { - RyOverRx = Ry/Rx; - lengthPerCol = detSize * pixelLengthY * sqrt(Rx*Rx + Ry*Ry) / abs(Rx); - deltar = -pixelLengthX * RyOverRx * inv_pixelLengthY; - S = 0.5f - 0.5f*fabs(RyOverRx); - T = 0.5f + 0.5f*fabs(RyOverRx); - invTminSTimesLengthPerCol = lengthPerCol / (T - S); - } - - bool isin = false; - - // vertically - if (vertical) { // calculate c for row 0 c = (Dx + (Ey - Dy)*RxOverRy - Ex) * inv_pixelLengthX; @@ -163,6 +153,12 @@ void CFanFlatBeamLineKernelProjector2D::projectBlock_internal(int _iProjFrom, in // horizontally else { + RyOverRx = Ry/Rx; + lengthPerCol = detSize * pixelLengthY * sqrt(Rx*Rx + Ry*Ry) / abs(Rx); + deltar = -pixelLengthX * RyOverRx * inv_pixelLengthY; + S = 0.5f - 0.5f*fabs(RyOverRx); + T = 0.5f + 0.5f*fabs(RyOverRx); + invTminSTimesLengthPerCol = lengthPerCol / (T - S); // calculate r for col 0 r = -(Dy + (Ex - Dx)*RyOverRx - Ey) * inv_pixelLengthY; |