ImFusion C++ SDK 4.5.0
ImFusion::AnatomicalStructureDenseDeformation Class Reference

#include <AnatomyPlugin/include/ImFusion/AnatomyPlugin/AnatomicalStructureDenseDeformation.h>

Class representing a dense deformation on an AnatomicalStructure as a combination of a matrix and a GlDenseDeformation It represents the mapping mat*(pt + dispPoint(pt)) where dispPoint(pt) is given by evaluation of the GlDenseDeformation and mat* denotes the action of the affine matrix mat (i.e. More...

Inheritance diagram for ImFusion::AnatomicalStructureDenseDeformation:

Detailed Description

Class representing a dense deformation on an AnatomicalStructure as a combination of a matrix and a GlDenseDeformation It represents the mapping mat*(pt + dispPoint(pt)) where dispPoint(pt) is given by evaluation of the GlDenseDeformation and mat* denotes the action of the affine matrix mat (i.e.

the usual matrix multiplication in homogeneous coordinates) WARNING: the ImFusionLib usually uses displacement field to denote the deformation of the image, i.e. the inverse to the mapping described above. In order to simplify handling of image deformations, this class can be used to store the inverse of dispPoint. However, users should be warned that the subsequent application of mat in the forward model complicates application of the inverse, with careful treatment being required for any applications.

Public Member Functions

 AnatomicalStructureDenseDeformation (const ScaledIso3 &linearPart, std::shared_ptr< GlDenseDeformation > pointDeformation, std::shared_ptr< GlDenseDeformation > inversePointDeformation)
 Constructor that takes a linear part together with (optional) point and inverse-point deformations.
AnatomicalStructureDenseDeformation clone () const
ScaledIso3linearPart ()
const ScaledIso3linearPart () const
void inplaceLeftMultiply (const ScaledIso3 &mat)
 Multiply this deformation from the left by mat, effectively just multiplies the linear part from the left.
void inplacePullbackAsVectorField (const ScaledIso3 &mat)
 Treat the deformation on points as a vector field on R^3 and pull it back under the transformation give by mat, i.e.
GlDenseDeformationimageDeformation (bool invertIfDoesntExist)
 Returns m_inversePointDeformation. If this does not exist but m_pointDeformation does, invert the deformation using InvertDeformationAlgorithm.
const GlDenseDeformationimageDeformation (bool invertIfDoesntExist) const
GlDenseDeformationpointDeformation (bool invertIfDoesntExist)
 Returns m_pointDeformation. If this does not exist but m_inversePointDeformation does, invert the deformation using InvertDeformationAlgorithm.
const GlDenseDeformationpointDeformation (bool invertIfDoesntExist) const
void applyDeformation (SharedImage &displacementFieldOut, const ScaledIso3 &prefactor, const ScaledIso3 &appliedToMoving, const ImageMath::ExprBase *weight=nullptr) const
 Writes the prefactor*this as a displacement field into displacementFieldOut, so that that resulting displacement fields acts on an image transformed by appliedToMoving The canonical use-case for this is that one has an AnatomicalStructureDenseDeformation defined as a (dense) deformation on some moving image.
void zeroDeformations ()
 Zeros m_pointDeformation and m_inversePointDeformation.

Additional Inherited Members

Protected Member Functions inherited from ImFusion::Utils::NotCopyable
 NotCopyable (NotCopyable &&) noexcept=default
NotCopyable & operator= (NotCopyable &&) noexcept=default
 NotCopyable (const NotCopyable &)=delete
NotCopyable & operator= (const NotCopyable &)=delete

Member Function Documentation

◆ inplacePullbackAsVectorField()

void ImFusion::AnatomicalStructureDenseDeformation::inplacePullbackAsVectorField ( const ScaledIso3 & mat)

Treat the deformation on points as a vector field on R^3 and pull it back under the transformation give by mat, i.e.

this is precomposing the deformation by mat.

◆ applyDeformation()

void ImFusion::AnatomicalStructureDenseDeformation::applyDeformation ( SharedImage & displacementFieldOut,
const ScaledIso3 & prefactor,
const ScaledIso3 & appliedToMoving,
const ImageMath::ExprBase * weight = nullptr ) const

Writes the prefactor*this as a displacement field into displacementFieldOut, so that that resulting displacement fields acts on an image transformed by appliedToMoving The canonical use-case for this is that one has an AnatomicalStructureDenseDeformation defined as a (dense) deformation on some moving image.

One then transforms the moving image by appliedToMoving and wants to create a GlDenseDeformation on the resulting (transformed) image that contains the transformed AnatomicalStructureDenseDeformation. Optionally, to support blending-use-cases a weight image can be passed to scale the resulting output pixelwise by weight.

Warning
: this functions adds the new deformation field to the result and displacementFieldOut is not zeroed beforehand.

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