![]() |
ImFusion SDK 4.3
|
#include <ImFusion/CT/Solver/OptimizationProblem.h>
Optimization problem formulation for tomographic reconstruction. More...
Inheritance diagram for OptimizationProblem:Optimization problem formulation for tomographic reconstruction.
Represents minimization problems over image/volume data with data fidelity and regularization terms. Mathematical representation: \(\mbox{argmin}_{x}f(x)\) where \( f(x) = f_0 (x) + \sum_{i = 1}^N w_i f_i (x)\). Here \(f\) is a SharedImageSet valued function with range in the real numbers.
Classes | |
| struct | RegTerm |
| struct | RegTermOwning |
Public Types | |
| using | ExprBase = ImageMath::ExprBase |
Public Member Functions | |
| OptimizationProblem (SharedImageSet ¤tSolution, Functional *dataTerm, const std::list< RegTerm > ®Terms={}) | |
| Constructor. | |
| OptimizationProblem (SharedImageSet ¤tSolution, std::unique_ptr< Functional > dataTerm, std::list< RegTermOwning > regTerms={}) | |
| Constructor. | |
| float | eval (const SharedImageSet &in) const |
| Evaluates the problem \(f(x) = f_0 (x) + \sum_{i = 1}^N w_i f_i (x)\). | |
| float | eval () const |
| Evaluates eval(m_currentSolution) | |
| Status | gradient (const SharedImageSet &in, SharedImageSet &out, const Selection *sel=nullptr, const ExprBase *exprOut=nullptr) const |
| Evaluates the gradient \(\nabla f(in)\). | |
| Status | gradient (SharedImageSet &out, const Selection *sel=nullptr, const ExprBase *exprOut=nullptr) const |
| Evaluates gradient(m_currentSolution, out, sel, exprOut) | |
| template<typename ImplType> | |
| Status | gradient (const SharedImageSet &in, SharedImageSet &out, const Selection *sel=nullptr, const ImageMath::ExprBaseTpl< ImplType > *exprOut=nullptr) const |
Convenience function that wraps exprOut in a sharedPolyWrapper. | |
| template<typename ImplType> | |
| Status | gradient (SharedImageSet &out, const Selection *sel=nullptr, const ImageMath::ExprBaseTpl< ImplType > *exprOut=nullptr) const |
Convenience function that wraps exprOut in a sharedPolyWrapper. | |
| std::unique_ptr< LinearOperator > | hessian (const SharedImageSet &in) const |
| Return a LinearOperator representing the hessian matrix \( H_f(in) \). | |
| std::unique_ptr< LinearOperator > | hessian () const |
| Evaluates hessian(m_currentSolution) | |
| SharedImageSet & | currentSolution () |
| Getters for m_currentSolutions. | |
| const SharedImageSet & | currentSolution () const |
| Functional & | dataTerm () |
| Getter for m_dataTerm. | |
| const Functional & | dataTerm () const |
| Const-getter for m_dataTerm. | |
| std::list< RegTerm > & | regTerms () |
| Getter for m_regTerms. | |
| const std::list< RegTerm > & | regTerms () const |
| Const-getter for m_regTerms. | |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Protected Attributes | |
| SharedImageSet & | m_currentSolution |
| Current solution (non-owning). This may be set by a Solver. | |
| Functional * | m_dataTerm |
| Data term of the optimization problem. | |
| std::list< RegTerm > | m_regTerms |
| Regularization terms. | |
| std::unique_ptr< Functional > | m_dataTermOwning |
| Owning data term of the optimization problem. | |
| std::list< RegTermOwning > | m_regTermsOwning |
| Owning regularization terms. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
| OptimizationProblem | ( | SharedImageSet & | currentSolution, |
| Functional * | dataTerm, | ||
| const std::list< RegTerm > & | regTerms = {} ) |
Constructor.
currentSolution must be a value in the domain of dataTerm Domains of dataTerm and of the elements of regTerms must match
| OptimizationProblem | ( | SharedImageSet & | currentSolution, |
| std::unique_ptr< Functional > | dataTerm, | ||
| std::list< RegTermOwning > | regTerms = {} ) |
Constructor.
currentSolution must be a value in the domain of dataTerm Domains of dataTerm and of the elements of regTerms must match
| float eval | ( | const SharedImageSet & | in | ) | const |
Evaluates the problem \(f(x) = f_0 (x) + \sum_{i = 1}^N w_i f_i (x)\).
| [in] | in | SharedImageSet for which the functional \(f\) is evaluated. |
in. | Status gradient | ( | const SharedImageSet & | in, |
| SharedImageSet & | out, | ||
| const Selection * | sel = nullptr, | ||
| const ExprBase * | exprOut = nullptr ) const |
Evaluates the gradient \(\nabla f(in)\).
| [in] | in | SharedImageSet at which the gradient is evaluated. |
| [out] | out | gradient. |
| [in] | sel | Selection on the range of the residual. Can be used for evaluating subsets |
| [in] | exprOut | If set it will be applied to the result of the gradient. This can e.g. be used to implicitly perform a gradient step with a single function call. |
| std::unique_ptr< LinearOperator > hessian | ( | const SharedImageSet & | in | ) | const |
Return a LinearOperator representing the hessian matrix \( H_f(in) \).
| [in] | in | SharedImageSet at which the hessian is evaluated. |
|
overridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.