diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-11-28 13:41:08 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-11-28 13:41:08 +0100 |
commit | 9101748879d81e8aafe7c77ecc4c8b2175390335 (patch) | |
tree | e5c05f226b45d4fb910dda5fab74ff760d9e27a0 /cuda/3d/fdk.cu | |
parent | eeffd2d9748b8912b384a5764b808f5bfc850ade (diff) | |
parent | 4a12901ad7b08021b2adad1241bf750aec4a3d2d (diff) | |
download | astra-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.cu | 12 |
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); |