![]() |
ImFusion C++ SDK 4.5.0
|
#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...
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 |
| ScaledIso3 & | linearPart () |
| const ScaledIso3 & | linearPart () 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. | |
| GlDenseDeformation * | imageDeformation (bool invertIfDoesntExist) |
| Returns m_inversePointDeformation. If this does not exist but m_pointDeformation does, invert the deformation using InvertDeformationAlgorithm. | |
| const GlDenseDeformation * | imageDeformation (bool invertIfDoesntExist) const |
| GlDenseDeformation * | pointDeformation (bool invertIfDoesntExist) |
| Returns m_pointDeformation. If this does not exist but m_inversePointDeformation does, invert the deformation using InvertDeformationAlgorithm. | |
| const GlDenseDeformation * | pointDeformation (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 |
| 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.
| 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.