summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-12 11:53:40 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-03-12 11:53:40 +0100
commit57ee6b85884b8226b26b7415ef151b4a6e63337c (patch)
treee73e4db54f0686cf6d55f3b39f7729ee82fe995e /src
parent6909836555afe155ffc3897ef2189ed0562bb045 (diff)
downloadastra-57ee6b85884b8226b26b7415ef151b4a6e63337c.tar.gz
astra-57ee6b85884b8226b26b7415ef151b4a6e63337c.tar.bz2
astra-57ee6b85884b8226b26b7415ef151b4a6e63337c.tar.xz
astra-57ee6b85884b8226b26b7415ef151b4a6e63337c.zip
Add flexible volgeom3d support to astraCudaFP
Diffstat (limited to 'src')
-rw-r--r--src/CudaForwardProjectionAlgorithm3D.cpp59
1 files changed, 3 insertions, 56 deletions
diff --git a/src/CudaForwardProjectionAlgorithm3D.cpp b/src/CudaForwardProjectionAlgorithm3D.cpp
index bb122e0..914ee2f 100644
--- a/src/CudaForwardProjectionAlgorithm3D.cpp
+++ b/src/CudaForwardProjectionAlgorithm3D.cpp
@@ -239,10 +239,6 @@ void CCudaForwardProjectionAlgorithm3D::run(int)
assert(m_bIsInitialized);
const CProjectionGeometry3D* projgeom = m_pProjections->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 = *m_pVolume->getGeometry();
Cuda3DProjectionKernel projKernel = ker3d_default;
@@ -270,58 +266,9 @@ void CCudaForwardProjectionAlgorithm3D::run(int)
}
#endif
- if (conegeom) {
- astraCudaConeFP(m_pVolume->getDataConst(), m_pProjections->getData(),
- 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_iDetectorSuperSampling);
- } else if (par3dgeom) {
- astraCudaPar3DFP(m_pVolume->getDataConst(), m_pProjections->getData(),
- volgeom.getGridColCount(),
- volgeom.getGridRowCount(),
- volgeom.getGridSliceCount(),
- par3dgeom->getProjectionCount(),
- par3dgeom->getDetectorColCount(),
- par3dgeom->getDetectorRowCount(),
- par3dgeom->getDetectorSpacingX(),
- par3dgeom->getDetectorSpacingY(),
- par3dgeom->getProjectionAngles(),
- m_iGPUIndex, m_iDetectorSuperSampling,
- projKernel);
- } else if (parvec3dgeom) {
- astraCudaPar3DFP(m_pVolume->getDataConst(), m_pProjections->getData(),
- volgeom.getGridColCount(),
- volgeom.getGridRowCount(),
- volgeom.getGridSliceCount(),
- parvec3dgeom->getProjectionCount(),
- parvec3dgeom->getDetectorColCount(),
- parvec3dgeom->getDetectorRowCount(),
- parvec3dgeom->getProjectionVectors(),
- m_iGPUIndex, m_iDetectorSuperSampling,
- projKernel);
- } else if (conevecgeom) {
- astraCudaConeFP(m_pVolume->getDataConst(), m_pProjections->getData(),
- volgeom.getGridColCount(),
- volgeom.getGridRowCount(),
- volgeom.getGridSliceCount(),
- conevecgeom->getProjectionCount(),
- conevecgeom->getDetectorColCount(),
- conevecgeom->getDetectorRowCount(),
- conevecgeom->getProjectionVectors(),
- m_iGPUIndex, m_iDetectorSuperSampling);
- } else {
- ASTRA_ASSERT(false);
- }
-
+ astraCudaFP(m_pVolume->getDataConst(), m_pProjections->getData(),
+ &volgeom, projgeom,
+ m_iGPUIndex, m_iDetectorSuperSampling, projKernel);
}