diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2016-04-14 13:12:51 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2016-04-14 13:12:51 +0200 |
commit | 7633a0f48ce030413642627f16e50d27da4cf709 (patch) | |
tree | 53150eade1dd920644c690a1d9da741cedcefdf6 /src/CudaSirtAlgorithm3D.cpp | |
parent | a7c4275ee8cd90b4ecf7fbca5d9571aae62a2931 (diff) | |
parent | 16430239d04ff738a21146c410918c285552543f (diff) | |
download | astra-7633a0f48ce030413642627f16e50d27da4cf709.tar.gz astra-7633a0f48ce030413642627f16e50d27da4cf709.tar.bz2 astra-7633a0f48ce030413642627f16e50d27da4cf709.tar.xz astra-7633a0f48ce030413642627f16e50d27da4cf709.zip |
Merge pull request #35 from wjp/relaxation
Add relaxation factor option to SIRT, SART
Diffstat (limited to 'src/CudaSirtAlgorithm3D.cpp')
-rw-r--r-- | src/CudaSirtAlgorithm3D.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CudaSirtAlgorithm3D.cpp b/src/CudaSirtAlgorithm3D.cpp index 605c470..c819f8e 100644 --- a/src/CudaSirtAlgorithm3D.cpp +++ b/src/CudaSirtAlgorithm3D.cpp @@ -56,6 +56,7 @@ CCudaSirtAlgorithm3D::CCudaSirtAlgorithm3D() m_iGPUIndex = -1; m_iVoxelSuperSampling = 1; m_iDetectorSuperSampling = 1; + m_fLambda = 1.0f; } //---------------------------------------------------------------------------------------- @@ -128,6 +129,8 @@ bool CCudaSirtAlgorithm3D::initialize(const Config& _cfg) return false; } + m_fLambda = _cfg.self.getOptionNumerical("Relaxation"); + initializeFromProjector(); // Deprecated options @@ -135,6 +138,7 @@ bool CCudaSirtAlgorithm3D::initialize(const Config& _cfg) m_iDetectorSuperSampling = (int)_cfg.self.getOptionNumerical("DetectorSuperSampling", m_iDetectorSuperSampling); m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUindex", m_iGPUIndex); m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUIndex", m_iGPUIndex); + CC.markOptionParsed("VoxelSuperSampling"); CC.markOptionParsed("DetectorSuperSampling"); CC.markOptionParsed("GPUIndex"); @@ -164,6 +168,8 @@ bool CCudaSirtAlgorithm3D::initialize(CProjector3D* _pProjector, clear(); } + m_fLambda = 1.0f; + // required classes m_pProjector = _pProjector; m_pSinogram = _pSinogram; @@ -224,6 +230,8 @@ void CCudaSirtAlgorithm3D::run(int _iNrIterations) ASTRA_ASSERT(ok); + m_pSirt->setRelaxation(m_fLambda); + m_bAstraSIRTInit = true; } |