diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2016-10-07 16:28:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-07 16:28:41 +0200 |
commit | 8f2b55a66db9747419e75dae5973281a7536b934 (patch) | |
tree | e7ca39da75ad5c9d728698295ac9c8ec32e4e499 /cuda/3d/cone_bp.cu | |
parent | e4b8b6e94be7c5f7dbaad51543c5eace8882a115 (diff) | |
parent | e835d5d588b7404037289c7b5cfa1475e931ba44 (diff) | |
download | astra-8f2b55a66db9747419e75dae5973281a7536b934.tar.gz astra-8f2b55a66db9747419e75dae5973281a7536b934.tar.bz2 astra-8f2b55a66db9747419e75dae5973281a7536b934.tar.xz astra-8f2b55a66db9747419e75dae5973281a7536b934.zip |
Merge pull request #42 from wjp/FDK
Use CompositeGeometryManager for FDK
Diffstat (limited to 'cuda/3d/cone_bp.cu')
-rw-r--r-- | cuda/3d/cone_bp.cu | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cuda/3d/cone_bp.cu b/cuda/3d/cone_bp.cu index f077f0d..6bd9d16 100644 --- a/cuda/3d/cone_bp.cu +++ b/cuda/3d/cone_bp.cu @@ -77,6 +77,7 @@ bool bindProjDataTexture(const cudaArray* array) //__launch_bounds__(32*16, 4) +template<bool FDKWEIGHT> __global__ void dev_cone_BP(void* D_volData, unsigned int volPitch, int startAngle, int angleOffset, const astraCUDA3d::SDimensions3D dims, float fOutputScale) @@ -134,7 +135,10 @@ __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); - Z[idx] += fVal; // fr*fr*fVal; + if (FDKWEIGHT) + Z[idx] += fr*fr*fVal; + else + Z[idx] += fVal; fUNum += fCu.z; fVNum += fCv.z; @@ -297,8 +301,10 @@ bool ConeBP_Array(cudaPitchedPtr D_volumeData, for (unsigned int i = 0; i < angleCount; i += g_anglesPerBlock) { // printf("Calling BP: %d, %dx%d, %dx%d to %p\n", i, dimBlock.x, dimBlock.y, dimGrid.x, dimGrid.y, (void*)D_volumeData.ptr); - if (params.iRaysPerVoxelDim == 1) - dev_cone_BP<<<dimGrid, dimBlock>>>(D_volumeData.ptr, D_volumeData.pitch/sizeof(float), i, th, dims, fOutputScale); + if (params.bFDKWeighting) + dev_cone_BP<true><<<dimGrid, dimBlock>>>(D_volumeData.ptr, D_volumeData.pitch/sizeof(float), i, th, dims, fOutputScale); + else if (params.iRaysPerVoxelDim == 1) + dev_cone_BP<false><<<dimGrid, dimBlock>>>(D_volumeData.ptr, D_volumeData.pitch/sizeof(float), i, th, dims, fOutputScale); else dev_cone_BP_SS<<<dimGrid, dimBlock>>>(D_volumeData.ptr, D_volumeData.pitch/sizeof(float), i, th, dims, params.iRaysPerVoxelDim, fOutputScale); } |