From b8ee38bdada2067f4351b27d841e68580bcbff8e Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 8 Feb 2016 16:21:16 +0100 Subject: Restrict FDK_CUDA to cube voxels for now --- src/CudaFDKAlgorithm3D.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/CudaFDKAlgorithm3D.cpp') diff --git a/src/CudaFDKAlgorithm3D.cpp b/src/CudaFDKAlgorithm3D.cpp index b5ce545..e101a42 100644 --- a/src/CudaFDKAlgorithm3D.cpp +++ b/src/CudaFDKAlgorithm3D.cpp @@ -81,6 +81,17 @@ bool CCudaFDKAlgorithm3D::_check() const CProjectionGeometry3D* projgeom = m_pSinogram->getGeometry(); ASTRA_CONFIG_CHECK(dynamic_cast(projgeom), "CUDA_FDK", "Error setting FDK geometry"); + + const CVolumeGeometry3D* volgeom = m_pReconstruction->getGeometry(); + bool cube = true; + if (abs(volgeom->getPixelLengthX() / volgeom->getPixelLengthY() - 1.0) > 0.00001) + cube = false; + if (abs(volgeom->getPixelLengthX() / volgeom->getPixelLengthZ() - 1.0) > 0.00001) + cube = false; + ASTRA_CONFIG_CHECK(cube, "CUDA_FDK", "Voxels must be cubes for FDK"); + + + return true; } -- cgit v1.2.3 From 048755bab6b77c1da0050ed091e5007a60564adf Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 8 Mar 2016 15:41:38 +0100 Subject: Use CompositeGeometryManager for FDK Also fix a number of scaling/weighting issues in FDK, and switch to standard cone_bp with FDKWeighting for the BP step. --- src/CudaFDKAlgorithm3D.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/CudaFDKAlgorithm3D.cpp') diff --git a/src/CudaFDKAlgorithm3D.cpp b/src/CudaFDKAlgorithm3D.cpp index e101a42..c7c8ed5 100644 --- a/src/CudaFDKAlgorithm3D.cpp +++ b/src/CudaFDKAlgorithm3D.cpp @@ -32,6 +32,7 @@ $Id$ #include "astra/CudaProjector3D.h" #include "astra/ConeProjectionGeometry3D.h" +#include "astra/CompositeGeometryManager.h" #include "astra/Logging.h" @@ -206,6 +207,7 @@ void CCudaFDKAlgorithm3D::run(int _iNrIterations) ASTRA_ASSERT(pReconMem); +#if 0 bool ok = true; ok = astraCudaFDK(pReconMem->getData(), pSinoMem->getDataConst(), @@ -213,6 +215,13 @@ void CCudaFDKAlgorithm3D::run(int _iNrIterations) m_bShortScan, m_iGPUIndex, m_iVoxelSuperSampling); ASTRA_ASSERT(ok); +#endif + + CCompositeGeometryManager cgm; + + cgm.doFDK(m_pProjector, pReconMem, pSinoMem, m_bShortScan); + + } //---------------------------------------------------------------------------------------- -- cgit v1.2.3