summaryrefslogtreecommitdiffstats
path: root/src/CudaCglsAlgorithm3D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-26 15:36:42 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-06-04 17:24:20 +0200
commit0985154228a63db25e9a0a0165994221d9b97a91 (patch)
treeca5c090b9c2cd320dc1598abb66198f198e8ce46 /src/CudaCglsAlgorithm3D.cpp
parent167ec3f4e1cbe4eb856474cb515291261955b053 (diff)
downloadastra-0985154228a63db25e9a0a0165994221d9b97a91.tar.gz
astra-0985154228a63db25e9a0a0165994221d9b97a91.tar.bz2
astra-0985154228a63db25e9a0a0165994221d9b97a91.tar.xz
astra-0985154228a63db25e9a0a0165994221d9b97a91.zip
Use supersampling options from CudaProjector3D
Diffstat (limited to 'src/CudaCglsAlgorithm3D.cpp')
-rw-r--r--src/CudaCglsAlgorithm3D.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/CudaCglsAlgorithm3D.cpp b/src/CudaCglsAlgorithm3D.cpp
index 3457b81..f527dc5 100644
--- a/src/CudaCglsAlgorithm3D.cpp
+++ b/src/CudaCglsAlgorithm3D.cpp
@@ -32,6 +32,7 @@ $Id$
#include "astra/AstraObjectManager.h"
+#include "astra/CudaProjector3D.h"
#include "astra/ConeProjectionGeometry3D.h"
#include "astra/ParallelVecProjectionGeometry3D.h"
#include "astra/ConeVecProjectionGeometry3D.h"
@@ -106,12 +107,27 @@ bool CCudaCglsAlgorithm3D::initialize(const Config& _cfg)
return false;
}
+ CCudaProjector3D* pCudaProjector = 0;
+ pCudaProjector = dynamic_cast<CCudaProjector3D*>(m_pProjector);
+ if (!pCudaProjector) {
+ // TODO: Report
+ }
+
m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUindex", -1);
CC.markOptionParsed("GPUindex");
- m_iDetectorSuperSampling = (int)_cfg.self.getOptionNumerical("DetectorSuperSampling", 1);
- CC.markOptionParsed("DetectorSuperSampling");
- m_iVoxelSuperSampling = (int)_cfg.self.getOptionNumerical("VoxelSuperSampling", 1);
+
+ m_iVoxelSuperSampling = 1;
+ m_iDetectorSuperSampling = 1;
+ if (pCudaProjector) {
+ // New interface
+ m_iVoxelSuperSampling = pCudaProjector->getVoxelSuperSampling();
+ m_iDetectorSuperSampling = pCudaProjector->getDetectorSuperSampling();
+ }
+ // Deprecated options
+ m_iVoxelSuperSampling = (int)_cfg.self.getOptionNumerical("VoxelSuperSampling", m_iVoxelSuperSampling);
+ m_iDetectorSuperSampling = (int)_cfg.self.getOptionNumerical("DetectorSuperSampling", m_iDetectorSuperSampling);
CC.markOptionParsed("VoxelSuperSampling");
+ CC.markOptionParsed("DetectorSuperSampling");
m_pCgls = new AstraCGLS3d();