![]() |
ImFusion SDK 4.3
|
#include <AnatomyPlugin/include/ImFusion/AnatomyPlugin/ASCDeformation.h>
Class for representing "deformations" over an AnatomicalStructureCollection. More...
Class for representing "deformations" over an AnatomicalStructureCollection.
Such a deformation comprises a linear transformation (rotation, translation, scaling), together with a set of AnatomicalStructureDeformation objects to be applied to child structures.
Public Member Functions | |
ASCDeformation (const ScaledIso3 &linearPart) | |
Initialize an ASCDeformation with the given linear part. | |
ASCDeformation (const AnatomicalStructureCollection &fixed, const AnatomicalStructureCollection &moving, bool rigid, bool ignoreNonContributing=false) | |
Initialize an ASCDeformation that maps moving to fixed . | |
void | setLinearPartIdentity () |
Sets the linear part to the identity transformation. | |
void | factorOutCommonLinearPart (bool preserveTotalTransformation=true, bool rigid=false, const AnatomicalStructureCollection *as=nullptr) |
Factors out the a common global linear transformation the children AnatomicalStructureDeformation objects. | |
void | clean (double tolerance=1.0e-6) |
Calls clean() on individual m_deformations objects and removes those that are equal to the identity. | |
void | moveScaleToChildren () |
Moves the "scale" part of the global transformation to the children AnatomicalStructureDeformation objects. | |
ScaledIso3 & | linearPart () |
const ScaledIso3 & | linearPart () const |
std::map< std::string, AnatomicalStructureDeformation > & | deformations () |
const std::map< std::string, AnatomicalStructureDeformation > & | deformations () const |
Static Public Attributes | |
static constexpr const char * | frozenString = "_frozen" |
Specifies how individual structures should be transformed by an ASCDeformation. | |
static constexpr const char * | contributesToRegistrationString = "_contributesToRegistration" |
Specifies how individual structures should be transformed by an ASCDeformation. | |
ASCDeformation | ( | const AnatomicalStructureCollection & | fixed, |
const AnatomicalStructureCollection & | moving, | ||
bool | rigid, | ||
bool | ignoreNonContributing = false ) |
Initialize an ASCDeformation 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.
ignoreNonContributing | - if set, this function will ignore structures that have the contributesToRegistrationString attribute set to Free. |
void factorOutCommonLinearPart | ( | bool | preserveTotalTransformation = true, |
bool | rigid = false, | ||
const AnatomicalStructureCollection * | as = nullptr ) |
Factors out the a common global linear transformation the children AnatomicalStructureDeformation objects.
If from
is specified, keypoints from it are used to compute a "best-fit" global transformation.
void moveScaleToChildren | ( | ) |
Moves the "scale" part of the global transformation to the children AnatomicalStructureDeformation objects.
|
staticconstexpr |
Specifies how individual structures should be transformed by an ASCDeformation.
Setting the "frozen" parameter in AnatomicalStructure::attributes() dictates how applyDeformation() treats an object.
|
staticconstexpr |
Specifies how individual structures should be transformed by an ASCDeformation.
Setting the "contributesToRegistration" parameter in AnatomicalStructure::attributes() may contribute to how an ASCDeformation is constructed, this behaviour can be controlled with the ignoreNonContributing parameter in the constructor. Individual registration methods should furthermore use this attribute to determine whether a structure should constribute to the registration.