diff options
Diffstat (limited to 'cuda')
-rw-r--r-- | cuda/3d/astra3d.cu | 2 | ||||
-rw-r--r-- | cuda/3d/fdk.cu | 12 | ||||
-rw-r--r-- | cuda/3d/fdk.h | 3 | ||||
-rw-r--r-- | cuda/3d/mem3d.cu | 4 | ||||
-rw-r--r-- | cuda/3d/mem3d.h | 2 |
5 files changed, 15 insertions, 8 deletions
diff --git a/cuda/3d/astra3d.cu b/cuda/3d/astra3d.cu index 91f4530..3bd56ea 100644 --- a/cuda/3d/astra3d.cu +++ b/cuda/3d/astra3d.cu @@ -1289,6 +1289,4 @@ bool astraCudaBP_SIRTWeighted(float* pfVolume, } - - } 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); diff --git a/cuda/3d/fdk.h b/cuda/3d/fdk.h index 8d2a128..fc0df20 100644 --- a/cuda/3d/fdk.h +++ b/cuda/3d/fdk.h @@ -42,7 +42,8 @@ bool FDK_PreWeight(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* filter); } diff --git a/cuda/3d/mem3d.cu b/cuda/3d/mem3d.cu index 4fb30a2..cb15ab9 100644 --- a/cuda/3d/mem3d.cu +++ b/cuda/3d/mem3d.cu @@ -279,7 +279,7 @@ bool BP(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, con } -bool FDK(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, const astra::CVolumeGeometry3D* pVolGeom, MemHandle3D volData, bool bShortScan) +bool FDK(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, const astra::CVolumeGeometry3D* pVolGeom, MemHandle3D volData, bool bShortScan, const float *pfFilter) { SDimensions3D dims; SProjectorParams3D params; @@ -298,7 +298,7 @@ bool FDK(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, co if (!ok || !pConeProjs) return false; - ok &= FDK(volData.d->ptr, projData.d->ptr, pConeProjs, dims, params, bShortScan); + ok &= FDK(volData.d->ptr, projData.d->ptr, pConeProjs, dims, params, bShortScan, pfFilter); return ok; diff --git a/cuda/3d/mem3d.h b/cuda/3d/mem3d.h index 2d0fb27..bb8b091 100644 --- a/cuda/3d/mem3d.h +++ b/cuda/3d/mem3d.h @@ -95,7 +95,7 @@ bool FP(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, con bool BP(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, const astra::CVolumeGeometry3D* pVolGeom, MemHandle3D volData, int iVoxelSuperSampling); -bool FDK(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, const astra::CVolumeGeometry3D* pVolGeom, MemHandle3D volData, bool bShortScan); +bool FDK(const astra::CProjectionGeometry3D* pProjGeom, MemHandle3D projData, const astra::CVolumeGeometry3D* pVolGeom, MemHandle3D volData, bool bShortScan, const float *pfFilter = 0); } |