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 /include/astra/SartAlgorithm.h | |
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 'include/astra/SartAlgorithm.h')
-rw-r--r-- | include/astra/SartAlgorithm.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/astra/SartAlgorithm.h b/include/astra/SartAlgorithm.h index eb4c61e..cdae029 100644 --- a/include/astra/SartAlgorithm.h +++ b/include/astra/SartAlgorithm.h @@ -49,7 +49,7 @@ namespace astra { * * The update step of pixel \f$v_j\f$ for projection \f$phi\f$ and iteration \f$k\f$ is given by: * \f[ - * v_j^{(k+1)} = v_j^{(k)} + \frac{\sum_{p_i \in P_\phi} \left( \lambda \frac{p_i - \sum_{r=1}^{N} w_{ir}v_r^{(k)}} {\sum_{r=1}^{N}w_{ir} } \right)} {\sum_{p_i \in P_\phi}w_{ij}} + * v_j^{(k+1)} = v_j^{(k)} + \lambda \frac{\sum_{p_i \in P_\phi} \left( \frac{p_i - \sum_{r=1}^{N} w_{ir}v_r^{(k)}} {\sum_{r=1}^{N}w_{ir} } \right)} {\sum_{p_i \in P_\phi}w_{ij}} * \f] * * \par XML Configuration @@ -64,6 +64,7 @@ namespace astra { * \astra_xml_item_option{MaxConstraintValue, float, 255, Maximum constraint value.} * \astra_xml_item_option{ProjectionOrder, string, "sequential", the order in which the projections are updated. 'sequential', 'random' or 'custom'} * \astra_xml_item_option{ProjectionOrderList, vector of float, not used, if ProjectionOrder='custom': use this order.} + * \astra_xml_item_option{Relaxation, float, 1, The relaxation parameter.} * * \par MATLAB example * \astra_code{ @@ -76,7 +77,8 @@ namespace astra { * cfg.option.UseMaxConstraint = 'yes';\n * cfg.option.MaxConstraintValue = 1024;\n * cfg.option.ProjectionOrder = 'custom';\n -* cfg.option.ProjectionOrderList = randperm(100);\n + * cfg.option.ProjectionOrderList = randperm(100);\n + * cfg.option.Relaxation = 1.0;\n * alg_id = astra_mex_algorithm('create'\, cfg);\n * astra_mex_algorithm('iterate'\, alg_id\, 10);\n * astra_mex_algorithm('delete'\, alg_id);\n @@ -215,6 +217,8 @@ protected: //< Current index in the projection order array. int m_iCurrentProjection; + //< Relaxation parameter + float m_fLambda; }; // inline functions |