![]() |
ImFusion SDK 4.3
|
#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: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 Map & | map () 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 | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (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< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
| 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.
| 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:
| 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.
|
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.
Reimplemented from Configurable.
|
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.
Reimplemented from Configurable.