diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-03-23 15:30:56 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-03-23 16:03:21 +0100 |
commit | 5edb35edc2c721b458334a65512b534912c2c542 (patch) | |
tree | 15e65ffa5de215950c75ae85cf97e92eb7f49dea /src/CudaSartAlgorithm.cpp | |
parent | f03ceb16d2dbde0c43e8c90683c5feafe01e5356 (diff) | |
download | astra-5edb35edc2c721b458334a65512b534912c2c542.tar.gz astra-5edb35edc2c721b458334a65512b534912c2c542.tar.bz2 astra-5edb35edc2c721b458334a65512b534912c2c542.tar.xz astra-5edb35edc2c721b458334a65512b534912c2c542.zip |
Add relaxation parameters to SIRT, SART
Diffstat (limited to 'src/CudaSartAlgorithm.cpp')
-rw-r--r-- | src/CudaSartAlgorithm.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/CudaSartAlgorithm.cpp b/src/CudaSartAlgorithm.cpp index d202847..bf97224 100644 --- a/src/CudaSartAlgorithm.cpp +++ b/src/CudaSartAlgorithm.cpp @@ -107,7 +107,8 @@ bool CCudaSartAlgorithm::initialize(const Config& _cfg) CC.markOptionParsed("ProjectionOrderList"); } - + m_fLambda = _cfg.self.getOptionNumerical("Relaxation", 1.0f); + CC.markOptionParsed("Relaxation"); return true; } @@ -123,12 +124,26 @@ bool CCudaSartAlgorithm::initialize(CProjector2D* _pProjector, if (!m_bIsInitialized) return false; + m_fLambda = 1.0f; + m_pAlgo = new astraCUDA::SART(); m_bAlgoInit = false; return true; } +//---------------------------------------------------------------------------------------- + +void CCudaSartAlgorithm::initCUDAAlgorithm() +{ + CCudaReconstructionAlgorithm2D::initCUDAAlgorithm(); + + astraCUDA::SART* pSart = dynamic_cast<astraCUDA::SART*>(m_pAlgo); + + pSart->setRelaxation(m_fLambda); +} + + } // namespace astra |