ImFusion SDK 4.3
DependentKeypoint Class Reference

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

Represents a keypoint as linear combination of points in meshes or point clouds or other keypoints. More...

+ Inheritance diagram for DependentKeypoint:

Detailed Description

Represents a keypoint as linear combination of points in meshes or point clouds or other keypoints.

Public Types

enum class  DataType { Mesh , PointCloud , Keypoint }
 Used to specify the type of KeyValueStore used as dependency.
 
typedef std::map< std::string, std::map< std::pair< DataType, std::string >, std::map< int, double > > > Map
 

Public Member Functions

const Mapmap () const
 Returns the map storing the individual points of the linear combination hierarchically.
 
std::optional< double > pointWeight (const std::string &anatStructId, DataType dataType, const std::string &dataKey, int pointId) const
 Returns the weight of an individual point, if it is part of the dependent keypoint.
 
void addOrSetPoint (const std::string &anatStructId, DataType dataType, const std::string &dataKey, int pointId, double weight=1.)
 Adds a point to the linear combination or sets a new weight, if it is already part of the dependent keypoint.
 
void removePoint (const std::string &anatStructId, DataType dataType, const std::string &dataKey, int pointId)
 Removes the specified point.
 
vec3 offset () const
 Returns the offset of the linear combination.
 
void setOffset (const vec3 &offset)
 Sets the offset of the linear combination.
 
void clear ()
 Removes all points and sets the offset to zero.
 
std::optional< vec3 > evaluate (const AnatomicalStructure &parentAnatStruct) const
 Returns the result of evaluating the linear combination defining this dependent keypoint or nullopt, if the dependent keypoint doesn't exist or any of its keys or ids are invalid.
 
- Public Member Functions inherited from Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Configurable interface

void configure (const Properties *prop) override
 Configure this object instance by de-serializing the given Properties.
 
void configuration (Properties *prop) const override
 Serialize the current object configuration into the given Properties object.
 

Additional Inherited Members

- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ pointWeight()

std::optional< double > pointWeight ( const std::string & anatStructId,
DataType dataType,
const std::string & dataKey,
int pointId ) const

Returns the weight of an individual point, if it is part of the dependent keypoint.

Can also be used to check if a point exists.

◆ addOrSetPoint()

void addOrSetPoint ( const std::string & anatStructId,
DataType dataType,
const std::string & dataKey,
int pointId,
double weight = 1. )

Adds a point to the linear combination or sets a new weight, if it is already part of the dependent keypoint.

Example:

addOrSetPoint("MyAnatomicalStructureIdentifier", DependentKeypoint::DataType::Mesh, "MyMeshKey", 42, 2.);
void addOrSetPoint(const std::string &anatStructId, DataType dataType, const std::string &dataKey, int pointId, double weight=1.)
Adds a point to the linear combination or sets a new weight, if it is already part of the dependent k...

◆ evaluate()

std::optional< vec3 > evaluate ( const AnatomicalStructure & parentAnatStruct) const

Returns the result of evaluating the linear combination defining this dependent keypoint or nullopt, if the dependent keypoint doesn't exist or any of its keys or ids are invalid.

The anatomical structure this dependent keypoint belongs to has to be provided as parentAnatStruct.

◆ configure()

void configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from Configurable.


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