summaryrefslogtreecommitdiffstats
path: root/src/CudaBackProjectionAlgorithm3D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-11 18:44:53 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-11 18:44:53 +0100
commit6909836555afe155ffc3897ef2189ed0562bb045 (patch)
tree8e42aff75e2a1b6648952611d6bf7e5f66510e68 /src/CudaBackProjectionAlgorithm3D.cpp
parent18d12242207d1113c3015b451f522531168e626a (diff)
downloadastra-6909836555afe155ffc3897ef2189ed0562bb045.tar.gz
astra-6909836555afe155ffc3897ef2189ed0562bb045.tar.bz2
astra-6909836555afe155ffc3897ef2189ed0562bb045.tar.xz
astra-6909836555afe155ffc3897ef2189ed0562bb045.zip
Add flexible volgeom3d support to astraCudaBP
Diffstat (limited to 'src/CudaBackProjectionAlgorithm3D.cpp')
-rw-r--r--src/CudaBackProjectionAlgorithm3D.cpp54
1 files changed, 3 insertions, 51 deletions
diff --git a/src/CudaBackProjectionAlgorithm3D.cpp b/src/CudaBackProjectionAlgorithm3D.cpp
index 7117cfc..a8a1b0a 100644
--- a/src/CudaBackProjectionAlgorithm3D.cpp
+++ b/src/CudaBackProjectionAlgorithm3D.cpp
@@ -164,10 +164,6 @@ void CCudaBackProjectionAlgorithm3D::run(int _iNrIterations)
ASTRA_ASSERT(pReconMem);
const CProjectionGeometry3D* projgeom = pSinoMem->getGeometry();
- const CConeProjectionGeometry3D* conegeom = dynamic_cast<const CConeProjectionGeometry3D*>(projgeom);
- const CParallelProjectionGeometry3D* par3dgeom = dynamic_cast<const CParallelProjectionGeometry3D*>(projgeom);
- const CConeVecProjectionGeometry3D* conevecgeom = dynamic_cast<const CConeVecProjectionGeometry3D*>(projgeom);
- const CParallelVecProjectionGeometry3D* parvec3dgeom = dynamic_cast<const CParallelVecProjectionGeometry3D*>(projgeom);
const CVolumeGeometry3D& volgeom = *pReconMem->getGeometry();
if (m_bSIRTWeighting) {
@@ -175,54 +171,10 @@ void CCudaBackProjectionAlgorithm3D::run(int _iNrIterations)
pSinoMem->getDataConst(),
&volgeom, projgeom,
m_iGPUIndex, m_iVoxelSuperSampling);
- } else if (conegeom) {
- astraCudaConeBP(pReconMem->getData(), pSinoMem->getDataConst(),
- volgeom.getGridColCount(),
- volgeom.getGridRowCount(),
- volgeom.getGridSliceCount(),
- conegeom->getProjectionCount(),
- conegeom->getDetectorColCount(),
- conegeom->getDetectorRowCount(),
- conegeom->getOriginSourceDistance(),
- conegeom->getOriginDetectorDistance(),
- conegeom->getDetectorSpacingX(),
- conegeom->getDetectorSpacingY(),
- conegeom->getProjectionAngles(),
- m_iGPUIndex, m_iVoxelSuperSampling);
- } else if (par3dgeom) {
- astraCudaPar3DBP(pReconMem->getData(), pSinoMem->getDataConst(),
- volgeom.getGridColCount(),
- volgeom.getGridRowCount(),
- volgeom.getGridSliceCount(),
- par3dgeom->getProjectionCount(),
- par3dgeom->getDetectorColCount(),
- par3dgeom->getDetectorRowCount(),
- par3dgeom->getDetectorSpacingX(),
- par3dgeom->getDetectorSpacingY(),
- par3dgeom->getProjectionAngles(),
- m_iGPUIndex, m_iVoxelSuperSampling);
- } else if (parvec3dgeom) {
- astraCudaPar3DBP(pReconMem->getData(), pSinoMem->getDataConst(),
- volgeom.getGridColCount(),
- volgeom.getGridRowCount(),
- volgeom.getGridSliceCount(),
- parvec3dgeom->getProjectionCount(),
- parvec3dgeom->getDetectorColCount(),
- parvec3dgeom->getDetectorRowCount(),
- parvec3dgeom->getProjectionVectors(),
- m_iGPUIndex, m_iVoxelSuperSampling);
- } else if (conevecgeom) {
- astraCudaConeBP(pReconMem->getData(), pSinoMem->getDataConst(),
- volgeom.getGridColCount(),
- volgeom.getGridRowCount(),
- volgeom.getGridSliceCount(),
- conevecgeom->getProjectionCount(),
- conevecgeom->getDetectorColCount(),
- conevecgeom->getDetectorRowCount(),
- conevecgeom->getProjectionVectors(),
- m_iGPUIndex, m_iVoxelSuperSampling);
} else {
- ASTRA_ASSERT(false);
+ astraCudaBP(pReconMem->getData(), pSinoMem->getDataConst(),
+ &volgeom, projgeom,
+ m_iGPUIndex, m_iVoxelSuperSampling);
}
}