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

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

Deformation of a single AnatomicalStructure object. More...

Inheritance diagram for ImFusion::AnatomicalStructureDeformation:

Detailed Description

Deformation of a single AnatomicalStructure object.

We use "deformation" as a general term referring to both linear and nonlinear transformations of the object in space. A deformation consists of a linear part and additional per-structure (mesh, point cloud, keypoint) transformations Mathematically, we want these deformations to form a group.

Classes

struct  DeformationKeys
 Structure for managing collections of keys for objects that can be deformed individually. More...

Public Member Functions

 AnatomicalStructureDeformation (const ScaledIso3 &linearPartIn=ScaledIso3::identity())
 Initialize an AnatomicalStructureDeformation with the given linear part.
AnatomicalStructureDeformation clone () const
void setLinearPartIdentity ()
void factorOutCommonLinearPart (bool rigid)
 Combine the linear parts of the individual deformations objects and factor out the common result into this->linearPart().
void inplaceLeftMultiply (const ScaledIso3 &mat)
void clean (double tolerance=1.0e-6)
 Per object deformations with no nonlinear part and a linear part close enough to the identity (as determined by tolerance) are removed from the final structure.
bool isLinear () const
std::map< std::string, AnatomicalStructurePointwiseDeformation > & meshDeformations ()
const std::map< std::string, AnatomicalStructurePointwiseDeformation > & meshDeformations () const
std::map< std::string, AnatomicalStructurePointwiseDeformation > & pointCloudDeformations ()
const std::map< std::string, AnatomicalStructurePointwiseDeformation > & pointCloudDeformations () const
std::map< std::string, AnatomicalStructurePointwiseDeformation > & graphDeformations ()
const std::map< std::string, AnatomicalStructurePointwiseDeformation > & graphDeformations () const
std::map< std::string, AnatomicalStructurePointwiseDeformation > & splineDeformations ()
const std::map< std::string, AnatomicalStructurePointwiseDeformation > & splineDeformations () const
std::map< std::string, std::pair< vec3, vec3 > > & keypointDeformations ()
const std::map< std::string, std::pair< vec3, vec3 > > & keypointDeformations () const
std::optional< AnatomicalStructureDenseDeformation > & imageDeformation ()
const std::optional< AnatomicalStructureDenseDeformation > & imageDeformation () const
DeformationKeys getDeformationKeys () const
 Returns the set of keys for which there is a mesh deformation, point cloud deformation, and keypoint deformation, respectively.
void emplacePointwiseDeformation (const std::string &key, AnatomyPlugin::ContentType contentType, const std::vector< vec3 > &from, const std::vector< vec3 > &to)
ScaledIso3linearPart ()
const ScaledIso3linearPart () const

Static Public Member Functions

static std::optional< AnatomicalStructureDeformationcreate (const AnatomicalStructure &fixed, const AnatomicalStructure &moving, bool rigid)
 Initialize an AnatomicalStructureDeformation that maps moving to fixed.
static std::optional< AnatomicalStructureDeformationcreate (AnatomicalStructureDenseDeformation imageDeformation, const AnatomicalStructure &moving, bool rigid)
 Create an AnatomicalStructureDeformation from an AnatomicalStructureDenseDeformation applied to initial positions at moving.

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

◆ create()

std::optional< AnatomicalStructureDeformation > ImFusion::AnatomicalStructureDeformation::create ( const AnatomicalStructure & fixed,
const AnatomicalStructure & moving,
bool rigid )
static

Initialize an AnatomicalStructureDeformation that maps moving to fixed.

Assumes that such a deformation exists, i.e. fixed and moving must have compatible objects. For example, meshes/pointclouds/graphs must have the same number of vertices and connectivity. A typical use case is to start with fixed, clone it into moving, manipulate vertices in moving, and then call this constructor. Does not initialize image deformations.

◆ clean()

void ImFusion::AnatomicalStructureDeformation::clean ( double tolerance = 1.0e-6)

Per object deformations with no nonlinear part and a linear part close enough to the identity (as determined by tolerance) are removed from the final structure.

Tolerance 0 indicates that no structures are removed.


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