summaryrefslogtreecommitdiffstats
path: root/src/CudaForwardProjectionAlgorithm3D.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/CudaForwardProjectionAlgorithm3D.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/CudaForwardProjectionAlgorithm3D.cpp')
-rw-r--r--src/CudaForwardProjectionAlgorithm3D.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/CudaForwardProjectionAlgorithm3D.cpp b/src/CudaForwardProjectionAlgorithm3D.cpp
index e29b5a9..46dab12 100644
--- a/src/CudaForwardProjectionAlgorithm3D.cpp
+++ b/src/CudaForwardProjectionAlgorithm3D.cpp
@@ -97,18 +97,28 @@ bool CCudaForwardProjectionAlgorithm3D::initialize(const Config& _cfg)
// optional: projector
node = _cfg.self.getSingleNode("ProjectorId");
+ CCudaProjector3D* pCudaProjector = 0;
+ m_pProjector = 0;
if (node) {
id = boost::lexical_cast<int>(node.getContent());
m_pProjector = CProjector3DManager::getSingleton().get(id);
- } else {
- m_pProjector = 0; // TODO: or manually construct default projector?
+ pCudaProjector = dynamic_cast<CCudaProjector3D*>(CProjector3DManager::getSingleton().get(id));
+ m_pProjector = pCudaProjector;
+ if (!pCudaProjector) {
+ // TODO: Report
+ }
}
CC.markNodeParsed("ProjectorId");
// GPU number
m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUindex", -1);
CC.markOptionParsed("GPUindex");
- m_iDetectorSuperSampling = (int)_cfg.self.getOptionNumerical("DetectorSuperSampling", 1);
+
+
+ m_iDetectorSuperSampling = 1;
+ if (pCudaProjector)
+ m_iDetectorSuperSampling = pCudaProjector->getDetectorSuperSampling();
+ m_iDetectorSuperSampling = (int)_cfg.self.getOptionNumerical("DetectorSuperSampling", m_iDetectorSuperSampling);
CC.markOptionParsed("DetectorSuperSampling");
// success