summaryrefslogtreecommitdiffstats
path: root/cuda/3d/fdk.cu
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-11-28 13:41:08 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-11-28 13:41:08 +0100
commit9101748879d81e8aafe7c77ecc4c8b2175390335 (patch)
treee5c05f226b45d4fb910dda5fab74ff760d9e27a0 /cuda/3d/fdk.cu
parenteeffd2d9748b8912b384a5764b808f5bfc850ade (diff)
parent4a12901ad7b08021b2adad1241bf750aec4a3d2d (diff)
downloadastra-9101748879d81e8aafe7c77ecc4c8b2175390335.tar.gz
astra-9101748879d81e8aafe7c77ecc4c8b2175390335.tar.bz2
astra-9101748879d81e8aafe7c77ecc4c8b2175390335.tar.xz
astra-9101748879d81e8aafe7c77ecc4c8b2175390335.zip
Merge branch 'fdk_custom_filter'
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 19ef338..bbac0be 100644
--- a/cuda/3d/fdk.cu
+++ b/cuda/3d/fdk.cu
@@ -281,7 +281,8 @@ bool FDK_Filter(cudaPitchedPtr D_projData,
bool FDK(cudaPitchedPtr D_volumeData,
cudaPitchedPtr D_projData,
const SConeProjection* angles,
- const SDimensions3D& dims, SProjectorParams3D params, bool bShortScan)
+ const SDimensions3D& dims, SProjectorParams3D params, bool bShortScan,
+ const float* pfFilter)
{
bool ok;
// Generate filter
@@ -332,7 +333,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 (pfFilter == 0){
+ genFilter(FILTER_RAMLAK, 1.0f, dims.iProjAngles, pHostFilter, iPaddedDetCount, iHalfFFTSize);
+ } else {
+ for (int i = 0; i < dims.iProjAngles * iHalfFFTSize; i++) {
+ pHostFilter[i].x = pfFilter[i];
+ pHostFilter[i].y = 0;
+ }
+ }
allocateComplexOnDevice(dims.iProjAngles, iHalfFFTSize, &D_filter);