ImFusion C++ SDK 4.5.0
ImFusion::CT::LinearOperatorTreeNode Class Reference

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

Composite pattern for linear operator expression trees. More...

Inheritance diagram for ImFusion::CT::LinearOperatorTreeNode:

Detailed Description

Composite pattern for linear operator expression trees.

Enables composition of linear operators via arithmetic operations (*, +). Supports large-scale implementations with on-the-fly execution.

Public Types

enum class  CompositionMode { SUM , PROD }
Public Types inherited from ImFusion::CT::LinearOperator
using ExprBase = ImageMath::ExprBase
Public Types inherited from ImFusion::CT::Block
using Input = DataList
using Output = DataList

Public Member Functions

 LinearOperatorTreeNode (std::unique_ptr< LinearOperator > lhs, std::unique_ptr< LinearOperator > rhs, CompositionMode mode)
 Constructor.
 LinearOperatorTreeNode ()=delete
 delete default constructor!
 ~LinearOperatorTreeNode () override
 Destructor.
Status apply (const ExprBase &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const override
 Computes the Matrix vector product by performing a tree-traversal of the evaluation tree.
Status applyAdjoint (const ExprBase &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const override
 Computes the Matrix vector product by performing a tree-traversal of the evaluation tree.
std::unique_ptr< LinearOperatorclone () const override
 Factory method.
std::unique_ptr< SharedImageSetcreateDomainSis () const override
 Creates a SharedImageSet which is in the range of the operator.
std::unique_ptr< SharedImageSetcreateRangeSis () const override
 Creates a SharedImageSet which is in the range of the operator.
Public Member Functions inherited from ImFusion::CT::LinearOperatorEvalInputExpr< false >
Status apply (const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const override final
Status applyAdjoint (const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const override final
 LinearOperator (const SharedImageSet *domainRef, const SharedImageSet *rangeRef=nullptr)
 Constructor with optional references for the domain and codomain (i.e. range) of the operator.
template<typename ImplType, typename ImplTypeOut>
Status apply (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ImageMath::ExprBaseTpl< ImplTypeOut > *exprOut=nullptr) const
template<typename ImplType>
Status apply (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const
template<typename ImplType, typename ImplTypeOut>
Status applyAdjoint (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ImageMath::ExprBaseTpl< ImplTypeOut > *exprOut=nullptr) const
template<typename ImplType>
Status applyAdjoint (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const
Public Member Functions inherited from ImFusion::CT::LinearOperator
 LinearOperator (const SharedImageSet *domainRef, const SharedImageSet *rangeRef=nullptr)
 Constructor with optional references for the domain and codomain (i.e. range) of the operator.
 ~LinearOperator () override=0
 Destructor.
template<typename ImplType, typename ImplTypeOut>
Status apply (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ImageMath::ExprBaseTpl< ImplTypeOut > *exprOut=nullptr) const
template<typename ImplType>
Status apply (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const
template<typename ImplType, typename ImplTypeOut>
Status applyAdjoint (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ImageMath::ExprBaseTpl< ImplTypeOut > *exprOut=nullptr) const
template<typename ImplType>
Status applyAdjoint (const ImageMath::ExprBaseTpl< ImplType > &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const
Status runBlock (Input &input, Output &output) override
 Applies the operator to the first element of input.
std::unique_ptr< LinearOperatorAdjointWrapperadjoint () const
 Creates an adjoint operator of this.
const SharedImageSetdomainRef () const
 Getter for m_domainRef, can be nullptr if this is implicitly defined by the operator.
const SharedImageSetrangeRef () const
 Getter for m_rangeRef, can be nullptr if this is implicitly defined by the operator.
Eigen::MatrixXf extractApplyMatrix () const
 Extracts a dense matrix representing this operator.
Eigen::MatrixXf extractApplyAdjointMatrix () const
 Extracts a dense matrix representing this operator.
Public Member Functions inherited from ImFusion::Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
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

Additional Inherited Members

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::LinearOperator
const SharedImageSetm_domainRef = nullptr
const SharedImageSetm_rangeRef = nullptr
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Constructor & Destructor Documentation

◆ LinearOperatorTreeNode()

ImFusion::CT::LinearOperatorTreeNode::LinearOperatorTreeNode ( std::unique_ptr< LinearOperator > lhs,
std::unique_ptr< LinearOperator > rhs,
CompositionMode mode )

Constructor.

Parameters
[in]lhsleft-hand side of the composition
[in]rhsright-hand side of the composition
[in]modecomposition mode (either, '+' or '*')

Member Function Documentation

◆ apply()

Status ImFusion::CT::LinearOperatorTreeNode::apply ( const ExprBase & exprIn,
const SharedImageSet & in,
SharedImageSet & out,
const ExprBase * exprOut = nullptr ) const
overridevirtual

Computes the Matrix vector product by performing a tree-traversal of the evaluation tree.

Reimplemented from ImFusion::CT::LinearOperatorEvalInputExpr< false >.

◆ applyAdjoint()

Status ImFusion::CT::LinearOperatorTreeNode::applyAdjoint ( const ExprBase & exprIn,
const SharedImageSet & in,
SharedImageSet & out,
const ExprBase * exprOut = nullptr ) const
overridevirtual

Computes the Matrix vector product by performing a tree-traversal of the evaluation tree.

Reimplemented from ImFusion::CT::LinearOperatorEvalInputExpr< false >.

◆ clone()

std::unique_ptr< LinearOperator > ImFusion::CT::LinearOperatorTreeNode::clone ( ) const
overridevirtual

◆ createDomainSis()

std::unique_ptr< SharedImageSet > ImFusion::CT::LinearOperatorTreeNode::createDomainSis ( ) const
overridevirtual

Creates a SharedImageSet which is in the range of the operator.

Reimplemented from ImFusion::CT::LinearOperator.

◆ createRangeSis()

std::unique_ptr< SharedImageSet > ImFusion::CT::LinearOperatorTreeNode::createRangeSis ( ) const
overridevirtual

Creates a SharedImageSet which is in the range of the operator.

Reimplemented from ImFusion::CT::LinearOperator.


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