diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2021-12-01 10:52:15 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2021-12-01 10:52:15 +0100 |
commit | 628e1da0b73140bd73501de3805b27b78ec8a19c (patch) | |
tree | f49938fc58f84412f787bfd4fe8f0b9d116dd31f /cuda/3d/fdk.cu | |
parent | d5e4c9814a2a72e737b8ca99b748ac8a9bfeedc2 (diff) | |
download | astra-628e1da0b73140bd73501de3805b27b78ec8a19c.tar.gz astra-628e1da0b73140bd73501de3805b27b78ec8a19c.tar.bz2 astra-628e1da0b73140bd73501de3805b27b78ec8a19c.tar.xz astra-628e1da0b73140bd73501de3805b27b78ec8a19c.zip |
Handle angular range discretisation better
Diffstat (limited to 'cuda/3d/fdk.cu')
-rw-r--r-- | cuda/3d/fdk.cu | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cuda/3d/fdk.cu b/cuda/3d/fdk.cu index e549670..754aa7b 100644 --- a/cuda/3d/fdk.cu +++ b/cuda/3d/fdk.cu @@ -218,6 +218,10 @@ bool FDK_PreWeight(cudaPitchedPtr D_projData, } float fRange = fabs(fRelAngles[dims.iProjAngles-1] - fRelAngles[0]); + // Adjust for discretisation + fRange /= dims.iProjAngles - 1; + fRange *= dims.iProjAngles; + ASTRA_DEBUG("Assuming angles are linearly ordered and equally spaced for Parker weighting. Angular range %f radians", fRange); float fScale = fRange / M_PI; @@ -230,8 +234,7 @@ bool FDK_PreWeight(cudaPitchedPtr D_projData, float fCentralFanAngle = fabs(atanf(fDetUSize * (dims.iProjU*0.5f) / (fSrcOrigin + fDetOrigin))); - // Check range, but take possible discretisation and rounding into affect - if (fRange + 1e-3 < (M_PI + 2*fCentralFanAngle) * (dims.iProjAngles - 1)/ dims.iProjAngles) { + if (fRange + 1e-3 < M_PI + 2*fCentralFanAngle) { ASTRA_WARN("Angular range (%f rad) smaller than Parker weighting range (%f rad)", fRange, M_PI + 2*fCentralFanAngle); } |