summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-05-24 11:52:05 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-12-20 17:24:54 +0100
commit52ebf0670ae39abea04344c32a1dc054c6816a03 (patch)
tree9a8368b1ecdd9db85e6e0f721ef298733ecc0296
parent324611ce98a82944def875e61cb93dd98ced9c79 (diff)
downloadastra-52ebf0670ae39abea04344c32a1dc054c6816a03.tar.gz
astra-52ebf0670ae39abea04344c32a1dc054c6816a03.tar.bz2
astra-52ebf0670ae39abea04344c32a1dc054c6816a03.tar.xz
astra-52ebf0670ae39abea04344c32a1dc054c6816a03.zip
Document FDK weighting slightly better
-rw-r--r--cuda/3d/cone_bp.cu15
1 files changed, 13 insertions, 2 deletions
diff --git a/cuda/3d/cone_bp.cu b/cuda/3d/cone_bp.cu
index c3405b8..02242b0 100644
--- a/cuda/3d/cone_bp.cu
+++ b/cuda/3d/cone_bp.cu
@@ -126,6 +126,9 @@ __global__ void dev_cone_BP(void* D_volData, unsigned int volPitch, int startAng
float fVNum = fCv.w + fX * fCv.x + fY * fCv.y + fZ * fCv.z;
float fDen = fCd.w + fX * fCd.x + fY * fCd.y + fZ * fCd.z;
+ // fCd.w = -|| u v s || (determinant of 3x3 matrix with cols u,v,s)
+ // fDen = || u v (x-s) ||
+
float fU,fV, fr;
for (int idx = 0; idx < ZSIZE; idx++)
@@ -134,9 +137,17 @@ __global__ void dev_cone_BP(void* D_volData, unsigned int volPitch, int startAng
fU = fUNum * fr;
fV = fVNum * fr;
float fVal = tex3D(gT_coneProjTexture, fU, fAngle, fV);
- if (FDKWEIGHT)
+ if (FDKWEIGHT) {
+ // The correct factor here is this one:
+ // Z[idx] += (fr*fCd.w)*(fr*fCd.w)*fVal;
+ // This is the square of the inverse magnification factor
+ // from fX,fY,fZ to the detector.
+
+ // Since we are assuming we have a circular cone
+ // beam trajectory, fCd.w is constant, and we instead
+ // multiply by fCd.w*fCd.w in the FDK preweighting step.
Z[idx] += fr*fr*fVal;
- else
+ } else
Z[idx] += fVal;
fUNum += fCu.z;