summaryrefslogtreecommitdiffstats
path: root/cuda/2d/fan_bp.cu
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2019-03-30 21:21:16 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2019-09-25 14:10:09 +0200
commit12f86554bafb66e6afc6193f181527ba0749de92 (patch)
tree7d89d128c3011251d19be98333eefca450e99c5b /cuda/2d/fan_bp.cu
parent11114e33fb504b0b74f3d239e77fe248a027cc23 (diff)
downloadastra-12f86554bafb66e6afc6193f181527ba0749de92.tar.gz
astra-12f86554bafb66e6afc6193f181527ba0749de92.tar.bz2
astra-12f86554bafb66e6afc6193f181527ba0749de92.tar.xz
astra-12f86554bafb66e6afc6193f181527ba0749de92.zip
Adjust SART to line integral scaling
Diffstat (limited to 'cuda/2d/fan_bp.cu')
-rw-r--r--cuda/2d/fan_bp.cu9
1 files changed, 4 insertions, 5 deletions
diff --git a/cuda/2d/fan_bp.cu b/cuda/2d/fan_bp.cu
index 2072cd4..0d21897 100644
--- a/cuda/2d/fan_bp.cu
+++ b/cuda/2d/fan_bp.cu
@@ -217,17 +217,16 @@ __global__ void devFanBP_SART(float* D_volData, unsigned int volPitch, const SDi
const float fDetSY = gC_DetSY[0];
const float fDetUX = gC_DetUX[0];
const float fDetUY = gC_DetUY[0];
- const float fScale = gC_Scale[0];
+
+ // NB: The 'scale' constant in devBP is cancelled out by the SART weighting
const float fXD = fSrcX - fX;
const float fYD = fSrcY - fY;
const float fNum = fDetSY * fXD - fDetSX * fYD + fX*fSrcY - fY*fSrcX;
const float fDen = fDetUX * fYD - fDetUY * fXD;
- const float fr = __fdividef(1.0f, fDen);
-
- const float fT = fNum * fr;
- const float fVal = tex2D(gT_FanProjTexture, fT, 0.5f) * fScale * fr;
+ const float fT = fNum / fDen;
+ const float fVal = tex2D(gT_FanProjTexture, fT, 0.5f);
volData[Y*volPitch+X] += fVal * fOutputScale;
}