ImFusion SDK 4.3
AnatomicalStructureDeformation Class Reference

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

Deformation of a single AnatomicalStructure object. More...

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.
 
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 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
 
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.
 

Member Function Documentation

◆ create()

static std::optional< 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.

◆ clean()

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.

Tolerance 0 indicates that no structures are removed.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close