ImFusion SDK 4.3
OptimizationProblem Class Reference

#include <ImFusion/CT/Solver/OptimizationProblem.h>

Optimization problem formulation for tomographic reconstruction. More...

+ Inheritance diagram for OptimizationProblem:

Detailed Description

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 &currentSolution, Functional *dataTerm, const std::list< RegTerm > &regTerms={})
 Constructor.
 
 OptimizationProblem (SharedImageSet &currentSolution, 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< LinearOperatorhessian (const SharedImageSet &in) const
 Return a LinearOperator representing the hessian matrix \( H_f(in) \).
 
std::unique_ptr< LinearOperatorhessian () const
 Evaluates hessian(m_currentSolution)
 
SharedImageSetcurrentSolution ()
 Getters for m_currentSolutions.
 
const SharedImageSetcurrentSolution () const
 
FunctionaldataTerm ()
 Getter for m_dataTerm.
 
const FunctionaldataTerm () 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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Protected Attributes

SharedImageSetm_currentSolution
 Current solution (non-owning). This may be set by a Solver.
 
Functionalm_dataTerm
 Data term of the optimization problem.
 
std::list< RegTermm_regTerms
 Regularization terms.
 
std::unique_ptr< Functionalm_dataTermOwning
 Owning data term of the optimization problem.
 
std::list< RegTermOwningm_regTermsOwning
 Owning regularization terms.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_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.
 

Constructor & Destructor Documentation

◆ OptimizationProblem() [1/2]

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() [2/2]

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

Member Function Documentation

◆ eval()

float eval ( const SharedImageSet & in) const

Evaluates the problem \(f(x) = f_0 (x) + \sum_{i = 1}^N w_i f_i (x)\).

Parameters
[in]inSharedImageSet for which the functional \(f\) is evaluated.
Returns
value of the function at the position in.

◆ gradient()

Status gradient ( const SharedImageSet & in,
SharedImageSet & out,
const Selection * sel = nullptr,
const ExprBase * exprOut = nullptr ) const

Evaluates the gradient \(\nabla f(in)\).

Parameters
[in]inSharedImageSet at which the gradient is evaluated.
[out]outgradient.
[in]selSelection on the range of the residual. Can be used for evaluating subsets
[in]exprOutIf 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.

◆ hessian()

std::unique_ptr< LinearOperator > hessian ( const SharedImageSet & in) const

Return a LinearOperator representing the hessian matrix \( H_f(in) \).

Parameters
[in]inSharedImageSet at which the hessian is evaluated.

◆ configure()

void configure ( const Properties * p)
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.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
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.

See also
configure() for the inverse functionality

Reimplemented from Configurable.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close