diff options
Diffstat (limited to 'cuda/3d')
-rw-r--r-- | cuda/3d/astra3d.cu | 4 | ||||
-rw-r--r-- | cuda/3d/astra3d.h | 2 | ||||
-rw-r--r-- | cuda/3d/fdk.cu | 12 | ||||
-rw-r--r-- | cuda/3d/fdk.h | 3 |
4 files changed, 15 insertions, 6 deletions
diff --git a/cuda/3d/astra3d.cu b/cuda/3d/astra3d.cu index 5670873..35e3cd4 100644 --- a/cuda/3d/astra3d.cu +++ b/cuda/3d/astra3d.cu @@ -1311,7 +1311,7 @@ bool astraCudaFDK(float* pfVolume, const float* pfProjections, const CVolumeGeometry3D* pVolGeom, const CConeProjectionGeometry3D* pProjGeom, bool bShortScan, - int iGPUIndex, int iVoxelSuperSampling) + int iGPUIndex, int iVoxelSuperSampling, const float* filter) { SDimensions3D dims; @@ -1369,7 +1369,7 @@ bool astraCudaFDK(float* pfVolume, const float* pfProjections, // TODO: Offer interface for SrcZ, DetZ ok &= FDK(D_volumeData, D_projData, fOriginSourceDistance, fOriginDetectorDistance, 0, 0, fDetUSize, fDetVSize, - dims, pfAngles, bShortScan); + dims, pfAngles, bShortScan, filter); ok &= copyVolumeFromDevice(pfVolume, D_volumeData, dims, dims.iVolX); diff --git a/cuda/3d/astra3d.h b/cuda/3d/astra3d.h index 2137587..dde1347 100644 --- a/cuda/3d/astra3d.h +++ b/cuda/3d/astra3d.h @@ -314,7 +314,7 @@ _AstraExport bool astraCudaFDK(float* pfVolume, const float* pfProjections, const CVolumeGeometry3D* pVolGeom, const CConeProjectionGeometry3D* pProjGeom, bool bShortScan, - int iGPUIndex, int iVoxelSuperSampling); + int iGPUIndex, int iVoxelSuperSampling, const float* filter); } 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); diff --git a/cuda/3d/fdk.h b/cuda/3d/fdk.h index de7fe53..7a9d318 100644 --- a/cuda/3d/fdk.h +++ b/cuda/3d/fdk.h @@ -43,7 +43,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); } |