ImFusion C++ SDK 4.4.0
ImFusion::CT::L2Pow2 Class Reference

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

L2 squared norm functional for data fidelity. More...

Inheritance diagram for ImFusion::CT::L2Pow2:

Detailed Description

L2 squared norm functional for data fidelity.

Implements \(\frac{1}{2} \|Ax-b\|^2_2\) for least-squares data fitting in reconstruction.

Public Member Functions

 L2Pow2 (std::unique_ptr< LinearResidual > residual)
 Constructor with residual.
 L2Pow2 (std::unique_ptr< LinearOperator > A, SharedImageSet *b)
 Constructor which implicitly constructs a residual.
 ~L2Pow2 () override
 Destructor.
Status gradient (const SharedImageSet &in, SharedImageSet &out, const Selection *sel=nullptr, const ExprBase *exprOut=nullptr) const
 Evaluates the gradient \(\nabla f(in)\).
template<typename ImplName>
Status gradient (const SharedImageSet &in, SharedImageSet &out, const Selection *sel, const ImageMath::ExprBaseTpl< ImplName > *exprOut)
 Convenience function which wraps exprOut in sharedPolyWrapper.
Public Member Functions inherited from ImFusion::CT::Functional
 Functional (std::unique_ptr< LinearResidual > residual, bool hessianRequiresResidualEval=true)
 Constructor with residual. This residual can be nullptr, which is taken as shorthand for the identity.
 Functional (std::unique_ptr< LinearOperator > A, SharedImageSet *b, bool hessianRequiresResidualEval=true)
 Constructor which implicitly constructs a residual that owns the LinearOperator.
virtual ~Functional ()=0
 Destructor.
float eval (const SharedImageSet &in) const
 Evaluates the functional \(f(in)\).
Status gradient (const SharedImageSet &in, SharedImageSet &out, const Selection *sel=nullptr, const ExprBase *exprOut=nullptr) const
 Evaluates the gradient \(\nabla f(in)\).
template<typename ImplName>
Status gradient (const SharedImageSet &in, SharedImageSet &out, const Selection *sel, const ImageMath::ExprBaseTpl< ImplName > *exprOut)
 Convenience function which wraps exprOut in sharedPolyWrapper.
std::unique_ptr< LinearOperatorhessian (const SharedImageSet &in) const
 Evaluates the hessian \(H_f(in)\).
const LinearResidualresidual () const
 Const getter for m_residual.
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 ImFusion::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 Member Functions

float evalImpl (const SharedImageSet &in) const override
 Evaluation of this functional (without residual).
Status gradientImpl (const SharedImageSet &in, SharedImageSet &out) const override
 Gradient of this functional (without residual). Should be selection aware.
std::unique_ptr< LinearOperatorhessianImpl (const SharedImageSet &in) const override
 Hessian of this functional (without residual).

Additional Inherited Members

Public Types inherited from ImFusion::CT::Functional
using ExprBase = ImageMath::ExprBase
Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Attributes inherited from ImFusion::CT::Functional
std::unique_ptr< LinearResidualm_residual
 optional residual.
const bool m_hessianRequiresResidualEval = true
 if set to false the result of hessianImpl is expected not to depend on the input
detail::SparseSharedImageSet m_residualTempSparseSharedImageSet
 Sparse tmp image.
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Function Documentation

◆ evalImpl()

float ImFusion::CT::L2Pow2::evalImpl ( const SharedImageSet & in) const
overrideprotectedvirtual

Evaluation of this functional (without residual).

Implements ImFusion::CT::Functional.

◆ gradientImpl()

Status ImFusion::CT::L2Pow2::gradientImpl ( const SharedImageSet & in,
SharedImageSet & out ) const
overrideprotectedvirtual

Gradient of this functional (without residual). Should be selection aware.

Implements ImFusion::CT::Functional.

◆ hessianImpl()

std::unique_ptr< LinearOperator > ImFusion::CT::L2Pow2::hessianImpl ( const SharedImageSet & in) const
overrideprotectedvirtual

Hessian of this functional (without residual).

Implements ImFusion::CT::Functional.

◆ gradient()

Status ImFusion::CT::Functional::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 at the given value.
[in]selSelection on the range of the residual. Can be used for evaluating subsets in case a residual with an operator is set. Otherwise sel MUST be nullptr.
[in]exprOutIf set, this will be applied to the result of the gradient. This can be used to implicitly perform a gradient step for instance.

The documentation for this class was generated from the following file:
  • ImFusion/CT/Solver/L2Pow2.h
Search Tab / S to search, Esc to close