diff options
Diffstat (limited to 'src/CudaBackProjectionAlgorithm3D.cpp')
-rw-r--r-- | src/CudaBackProjectionAlgorithm3D.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/CudaBackProjectionAlgorithm3D.cpp b/src/CudaBackProjectionAlgorithm3D.cpp index 76d7b35..27bb968 100644 --- a/src/CudaBackProjectionAlgorithm3D.cpp +++ b/src/CudaBackProjectionAlgorithm3D.cpp @@ -1,10 +1,10 @@ /* ----------------------------------------------------------------------- -Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp - 2014-2015, CWI, Amsterdam +Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp + 2014-2016, CWI, Amsterdam Contact: astra@uantwerpen.be -Website: http://sf.net/projects/astra-toolbox +Website: http://www.astra-toolbox.com/ This file is part of the ASTRA Toolbox. @@ -23,7 +23,6 @@ You should have received a copy of the GNU General Public License along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>. ----------------------------------------------------------------------- -$Id$ */ #include "astra/CudaBackProjectionAlgorithm3D.h" @@ -61,8 +60,8 @@ CCudaBackProjectionAlgorithm3D::CCudaBackProjectionAlgorithm3D() //---------------------------------------------------------------------------------------- // Constructor with initialization CCudaBackProjectionAlgorithm3D::CCudaBackProjectionAlgorithm3D(CProjector3D* _pProjector, - CFloat32ProjectionData3DMemory* _pProjectionData, - CFloat32VolumeData3DMemory* _pReconstruction) + CFloat32ProjectionData3D* _pProjectionData, + CFloat32VolumeData3D* _pReconstruction) { _clear(); initialize(_pProjector, _pProjectionData, _pReconstruction); @@ -146,8 +145,8 @@ bool CCudaBackProjectionAlgorithm3D::initialize(const Config& _cfg) //---------------------------------------------------------------------------------------- // Initialize - C++ bool CCudaBackProjectionAlgorithm3D::initialize(CProjector3D* _pProjector, - CFloat32ProjectionData3DMemory* _pSinogram, - CFloat32VolumeData3DMemory* _pReconstruction) + CFloat32ProjectionData3D* _pSinogram, + CFloat32VolumeData3D* _pReconstruction) { // if already initialized, clear first if (m_bIsInitialized) { @@ -188,17 +187,21 @@ void CCudaBackProjectionAlgorithm3D::run(int _iNrIterations) // check initialized ASTRA_ASSERT(m_bIsInitialized); - CFloat32ProjectionData3DMemory* pSinoMem = dynamic_cast<CFloat32ProjectionData3DMemory*>(m_pSinogram); + CFloat32ProjectionData3D* pSinoMem = dynamic_cast<CFloat32ProjectionData3D*>(m_pSinogram); ASTRA_ASSERT(pSinoMem); - CFloat32VolumeData3DMemory* pReconMem = dynamic_cast<CFloat32VolumeData3DMemory*>(m_pReconstruction); + CFloat32VolumeData3D* pReconMem = dynamic_cast<CFloat32VolumeData3D*>(m_pReconstruction); ASTRA_ASSERT(pReconMem); const CProjectionGeometry3D* projgeom = pSinoMem->getGeometry(); const CVolumeGeometry3D& volgeom = *pReconMem->getGeometry(); if (m_bSIRTWeighting) { - astraCudaBP_SIRTWeighted(pReconMem->getData(), - pSinoMem->getDataConst(), + CFloat32ProjectionData3DMemory* pSinoMemory = dynamic_cast<CFloat32ProjectionData3DMemory*>(m_pSinogram); + ASTRA_ASSERT(pSinoMemory); + CFloat32VolumeData3DMemory* pReconMemory = dynamic_cast<CFloat32VolumeData3DMemory*>(m_pReconstruction); + ASTRA_ASSERT(pReconMemory); + astraCudaBP_SIRTWeighted(pReconMemory->getData(), + pSinoMemory->getDataConst(), &volgeom, projgeom, m_iGPUIndex, m_iVoxelSuperSampling); } else { |