![]() |
ImFusion SDK 4.3
|
#include <ImFusion/CT/Solver/IdentityOperator.h>
Identity linear operator implementation. More...
Inheritance diagram for IdentityOperator:Identity linear operator implementation.
Implements the identity matrix as a LinearOperator \(A*x = x\).
Public Member Functions | |
| IdentityOperator (const SharedImageSet &domainRef) | |
| Constructor. | |
| Status | apply (const ExprBase &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const override |
| Applies a linear operator \(A\), optionally pre/post-composing with an ImageMath expression. | |
| Status | applyAdjoint (const ExprBase &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const override |
| Applies the adjoint of a linear operator \(A\), optionally pre/post-composing with an ImageMath expression. | |
| std::unique_ptr< LinearOperator > | clone () const override |
| Factory method. | |
Public Member Functions inherited from 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. | |
| virtual Status | apply (const ExprBase &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const=0 |
| Applies a linear operator \(A\), optionally pre/post-composing with an ImageMath expression. | |
| 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 |
| virtual Status | applyAdjoint (const ExprBase &exprIn, const SharedImageSet &in, SharedImageSet &out, const ExprBase *exprOut=nullptr) const=0 |
| Applies the adjoint of a linear operator \(A\), optionally pre/post-composing with an ImageMath expression. | |
| 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 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< LinearOperatorAdjointWrapper > | adjoint () const |
| Creates an adjoint operator of this. | |
| const SharedImageSet * | domainRef () const |
| Getter for m_domainRef, can be nullptr if this is implicitly defined by the operator. | |
| const SharedImageSet * | rangeRef () const |
| Getter for m_rangeRef, can be nullptr if this is implicitly defined by the operator. | |
| virtual std::unique_ptr< SharedImageSet > | createDomainSis () const |
| Creates a SharedImageSet which is in the range of the operator. | |
| virtual std::unique_ptr< SharedImageSet > | createRangeSis () const |
| Creates a SharedImageSet which is in the range of 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 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 Types inherited from LinearOperator | |
| using | ExprBase = ImageMath::ExprBase |
Public Types inherited from Block | |
| using | Input = DataList |
| using | Output = DataList |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Attributes inherited from LinearOperator | |
| const SharedImageSet * | m_domainRef = nullptr |
| const SharedImageSet * | m_rangeRef = nullptr |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
overridevirtual |
Applies a linear operator \(A\), optionally pre/post-composing with an ImageMath expression.
Computes \(exprOut(A * exprIn(in))\).
As \(A\) is linear, it can in principle be represented as a matrix. However we aim at large-scale implementations meaning that the corresponding matrix is typically to large to be kept in memory. We therefore only require an implementation of the matrix-vector product as opposed to an explicit representation.
| [in] | exprIn | Expression to which the linear operator is applied |
| [in] | in | Reference input to define the domain of the operator (this is neccessary as exprIn could be scalar). |
| [in,out] | out | Is overwritten with result of \(exprOut(A * exprIn(in))\). |
| [in] | exprOut | If set, this expression will be applied to the results after the operator was applied. If not set, treated as identity. out must contain ImageMath::Variable which will be substituted with the result of \(A * exprIn(in)\). In principle, this expression may contain out even if the values of out are then overwritten by this function. However, an operator may split up \(A\) into blocks, in which case the implemented LinearOperator must use checkOutExprAndCreateUpdateExprAndTmpOut to accumulate the result correctly. |
Implements LinearOperator.
|
overridevirtual |
Applies the adjoint of a linear operator \(A\), optionally pre/post-composing with an ImageMath expression.
Computes \(exprOut(A^\top * exprIn(in))\).
| [in] | exprIn | Expression to which the adjoint operator is applied. |
| [in] | in | Reference input defining the domain of the operator (this is neccessary, as exprIn can be a scalar expression). |
| [in,out] | out | Is overwritten with result of \(exprOut(A * exprIn(in))\). |
| [in] | exprOut | If set, this expression will be applied to the results after the operator was applied. If not set, treated as identity. out is expected to contain ImageMath::Variable which will be substituted with the result of \(A * exprIn(in)\). In principle, this expression may contain out even though out is overwritten by this function. However, an operator may split up \(A\) into blocks, in which case the implemented LinearOperator must use checkOutExprAndCreateUpdateExprAndTmpOut to accumulate the result correctly. |
Implements LinearOperator.
|
overridevirtual |
Factory method.
Implements LinearOperator.