diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-09-16 12:01:02 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-09-16 12:01:02 +0200 |
commit | 55cbaa5df6f91594b7cd69754e04c186c7c88c97 (patch) | |
tree | b1456253660a7762df6868d1452a6d9480e25b19 /src/CudaCglsAlgorithm3D.cpp | |
parent | 7584ffbd6748bcca8c3f7ed2dc961be01f2fcfdc (diff) | |
parent | 026aa46c5db24ddd687cec0fa6e056a2ee3790c5 (diff) | |
download | astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.tar.gz astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.tar.bz2 astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.tar.xz astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.zip |
Merge branch 'master' into volgeom3d
Conflicts:
src/CudaBackProjectionAlgorithm3D.cpp
Diffstat (limited to 'src/CudaCglsAlgorithm3D.cpp')
-rw-r--r-- | src/CudaCglsAlgorithm3D.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/CudaCglsAlgorithm3D.cpp b/src/CudaCglsAlgorithm3D.cpp index 3677458..2d28964 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; } - m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUindex", -1); + 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(); |