summaryrefslogtreecommitdiffstats
path: root/cuda/3d/fdk.cu
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2016-05-20 15:10:03 +0200
committerDaniel M. Pelt <D.M.Pelt@cwi.nl>2016-05-20 15:10:03 +0200
commit399422985fd27a1e6a1f8cea3642402128b050fa (patch)
tree4898e3470bbd2b81bc378df1c3b8c14654eb3ba5 /cuda/3d/fdk.cu
parent844a9f71fba18c76d6b3566b78908877a0a1a9c8 (diff)
downloadastra-399422985fd27a1e6a1f8cea3642402128b050fa.tar.gz
astra-399422985fd27a1e6a1f8cea3642402128b050fa.tar.bz2
astra-399422985fd27a1e6a1f8cea3642402128b050fa.tar.xz
astra-399422985fd27a1e6a1f8cea3642402128b050fa.zip
Add option to specify custom filter for FDK
Diffstat (limited to 'cuda/3d/fdk.cu')
-rw-r--r--cuda/3d/fdk.cu12
1 files changed, 10 insertions, 2 deletions
diff --git a/cuda/3d/fdk.cu b/cuda/3d/fdk.cu
index 0e13be1..4899ad1 100644
--- a/cuda/3d/fdk.cu
+++ b/cuda/3d/fdk.cu
@@ -394,7 +394,8 @@ bool FDK(cudaPitchedPtr D_volumeData,
cudaPitchedPtr D_projData,
float fSrcOrigin, float fDetOrigin,
float fSrcZ, float fDetZ, float fDetUSize, float fDetVSize,
- const SDimensions3D& dims, const float* angles, bool bShortScan)
+ const SDimensions3D& dims, const float* angles, bool bShortScan,
+ const float* filter)
{
bool ok;
// Generate filter
@@ -412,7 +413,14 @@ bool FDK(cudaPitchedPtr D_volumeData,
cufftComplex *pHostFilter = new cufftComplex[dims.iProjAngles * iHalfFFTSize];
memset(pHostFilter, 0, sizeof(cufftComplex) * dims.iProjAngles * iHalfFFTSize);
- genFilter(FILTER_RAMLAK, 1.0f, dims.iProjAngles, pHostFilter, iPaddedDetCount, iHalfFFTSize);
+ if (filter==NULL){
+ genFilter(FILTER_RAMLAK, 1.0f, dims.iProjAngles, pHostFilter, iPaddedDetCount, iHalfFFTSize);
+ }else{
+ for(int i=0;i<dims.iProjAngles * iHalfFFTSize;i++){
+ pHostFilter[i].x = filter[i];
+ pHostFilter[i].y = 0;
+ }
+ }
allocateComplexOnDevice(dims.iProjAngles, iHalfFFTSize, &D_filter);