diff options
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); |