summaryrefslogtreecommitdiffstats
path: root/src/CudaSartAlgorithm.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2016-04-14 13:12:51 +0200
committerWillem Jan Palenstijn <wjp@usecode.org>2016-04-14 13:12:51 +0200
commit7633a0f48ce030413642627f16e50d27da4cf709 (patch)
tree53150eade1dd920644c690a1d9da741cedcefdf6 /src/CudaSartAlgorithm.cpp
parenta7c4275ee8cd90b4ecf7fbca5d9571aae62a2931 (diff)
parent16430239d04ff738a21146c410918c285552543f (diff)
downloadastra-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/CudaSartAlgorithm.cpp')
-rw-r--r--src/CudaSartAlgorithm.cpp17
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