ImFusion C++ SDK 4.4.0
ImFusion::OrientedVertebra Class Reference

#include <SpinePlugin/include/ImFusion/Spine/OrientedVertebra.h>

A representation of a vertebra, containing orientation, classification keypoints, segmentations, meshes and all other related information. More...

Inheritance diagram for ImFusion::OrientedVertebra:

Detailed Description

A representation of a vertebra, containing orientation, classification keypoints, segmentations, meshes and all other related information.

Public Member Functions

 OrientedVertebra (const KeyValueStore< vec3 > &keypoints)
 Vertebra Constructor that takes a map of keypoints for initialization.
 OrientedVertebra (vec3 center)
 OrientedVertebra (OrientedVertebra &&other)
std::string describe () const override
 A (human-readable) description of this anatomy.
 OrientedVertebra (std::vector< vec3 > keypoints)
 Vertebra Constructor that takes a vector of keypoints for initialization The order is either a single {body_keypoint}, or a set {body, left_pedicle, right_pedicle}.
vec3 position () const
 Returns the estimated position of the vertebra as was previously calculated by calculatePosition().
vec3 body () const
 Returns the body keypoint. If this keypoint is not available, a vec3(Nan, Nan, Nan) is returned.
vec3 posterior () const
 Returns the posterior keypoint. If this keypoint is not available, a vec3(Nan, Nan, Nan) is returned.
vec3 rightPedicle () const
 Returns the right pedicle keypoint. If this keypoint is not available, a vec3(Nan, Nan, Nan) is returned.
vec3 leftPedicle () const
 Returns the left pedicle keypoint. If this keypoint is not available, a vec3(Nan, Nan, Nan) is returned.
vec3 rightKeypoint () const
vec3 leftKeypoint () const
mat4 estimateMatrix (bool centerOnPedicles=false)
std::string name () const
 Return name of the vertebra If the type is known it will be in the name ("T12", "L1", etc) Otherwise it will simply be "Vertebra".
std::string identifier () const override
 A (machine-readable) name of the anatomy.
std::string serializationID () const override
 String differentiating the type of Anatomical Structure For imfusion types, these strings should start with "imfusion." Used for (de)serialization.
std::string getName () const
VertebraType getType () const
int getRelativeIndex () const
void setMeshes (std::vector< std::unique_ptr< Mesh > > &meshes_)
 Store a vector of meshes in the vertebra class If there is a single mesh it is stored under Keys::Spine::Vertebra::key for legacy reasons Otherwise, the meshes are stored under their given mesh->name().
Eigen::Quaternion< double > calculateOrientation ()
std::vector< double > & getTypeProbabilities ()
const std::vector< double > & getTypeProbabilities () const
int getTypeId () const
void setTypeId (int t)
int getPinnedTypeId () const
void setPinnedTypeId (int t)
void calculatePosition ()
 Estimates the vertebra "position" from keypoints If pedicle keypoints are present the estimate at the center of the vertebra, If only the body keypoint is present, this position will be returned.
Public Member Functions inherited from ImFusion::AnatomicalStructure
 AnatomicalStructure (bool is2D=false)
 AnatomicalStructure (AnatomicalStructure &other)
 AnatomicalStructure (AnatomicalStructure &&other)
virtual void setMatrixToWorld (const mat4 &m, bool synchronizeWorld=true)
 Set the local to world matrix of this object.
mat4 matrixToWorld () const
virtual Geometry::AlignedBox bounds (const mat4 &orientation=mat4::Identity(), const std::vector< ContentType > &toConsider={ContentType::Keypoints, ContentType::PointClouds, ContentType::Meshes, ContentType::Splines, ContentType::Graphs}) const
virtual bool empty () const
 Retuns true if all members are empty, i.e. this structure has no associated information.
Propertiesattributes ()
Properties const & attributes () const
template<typename Derived>
std::unique_ptr< Derived > clone () const
 Helper function for calling cloneImpl() and casting to a specific type.
virtual void clear ()
 Clear all data contained in this structure.
void configure (const Properties *p) override
 Configure attributes and parameters.
void configuration (Properties *p) const override
 Retrieve configuration of attributes and parameters.
bool is2D () const
 Returns true if the AnatomicalStructure is 2D or false if it is 3D.
KeyValueStore< vec3 > & keypoints ()
 Getters for non-Data key/value stores.
const KeyValueStore< vec3 > & keypoints () const
KeyValueStore< vec4 > & planes ()
const KeyValueStore< vec4 > & planes () const
KeyValueStore< std::unique_ptr< Spline > > & splines ()
const KeyValueStore< std::unique_ptr< Spline > > & splines () const
KeyValueStore< std::unique_ptr< SharedImageSet > > & images ()
 Getters for Data key/value stores.
const KeyValueStore< std::unique_ptr< SharedImageSet > > & images () const
KeyValueStore< std::unique_ptr< Mesh > > & meshes ()
const KeyValueStore< std::unique_ptr< Mesh > > & meshes () const
KeyValueStore< std::unique_ptr< PointCloud > > & pointclouds ()
const KeyValueStore< std::unique_ptr< PointCloud > > & pointclouds () const
KeyValueStore< std::unique_ptr< Graph > > & graphs ()
const KeyValueStore< std::unique_ptr< Graph > > & graphs () const
KeyValueStore< AnatomicalStructureDeformation > & deformations ()
const KeyValueStore< AnatomicalStructureDeformation > & deformations () const
Public Member Functions inherited from ImFusion::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
Public Member Functions inherited from ImFusion::SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.

Protected Member Functions

std::unique_ptr< AnatomicalStructure > construct () const override
std::unique_ptr< AnatomicalStructure > cloneImpl () const override
 Derived classes may override this, but should call the base class cloneImpl to obtain a (unique-ptr) which they may assume to point to an object of the derived class.
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
Protected Member Functions inherited from ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.

Additional Inherited Members

Public Types inherited from ImFusion::AnatomicalStructure
using ContentType = AnatomyPlugin::ContentType
Public Attributes inherited from ImFusion::AnatomicalStructure
Signal signalMatrixChanged
Signal signalInDestructor
 This signal is called in the destructor. Classes that inherit from AnatomicalStructure may additionally emit this signal.
Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Attributes inherited from ImFusion::AnatomicalStructure
mat4 m_matrixToWorld = mat4::Identity()
KeyValueStore< vec3 > m_keypoints {m_matrixToWorld}
KeyValueStore< vec4 > m_planes {m_matrixToWorld}
KeyValueStore< std::unique_ptr< Spline > > m_splines {m_matrixToWorld}
KeyValueStore< std::unique_ptr< SharedImageSet > > m_images {m_matrixToWorld}
KeyValueStore< std::unique_ptr< Mesh > > m_meshes {m_matrixToWorld}
KeyValueStore< std::unique_ptr< PointCloud > > m_pointClouds {m_matrixToWorld}
KeyValueStore< std::unique_ptr< Graph > > m_graphs {m_matrixToWorld}
KeyValueStore< AnatomicalStructureDeformationm_deformations {m_matrixToWorld}
Properties m_attributes
 General properties object for the Anatomical Structure.
bool m_is2D
 Indicates if the AnatomicalStructure information is in 2D or, if false, in 3D.
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Constructor & Destructor Documentation

◆ OrientedVertebra() [1/2]

ImFusion::OrientedVertebra::OrientedVertebra ( const KeyValueStore< vec3 > & keypoints)

Vertebra Constructor that takes a map of keypoints for initialization.

This clones the key/value store. If Keys::Spine::Vertebra::Body::Center::key is present, this will be used to set the position If Keys::Spine::Vertebra::Body::Center::key, Keys::Spine::Vertebra::LeftPedicle::Center::key and Keys::Spine::Vertebra::RightPedicle::Center::key are present, the orientation will also be estimated

◆ OrientedVertebra() [2/2]

ImFusion::OrientedVertebra::OrientedVertebra ( std::vector< vec3 > keypoints)

Vertebra Constructor that takes a vector of keypoints for initialization The order is either a single {body_keypoint}, or a set {body, left_pedicle, right_pedicle}.

Deprecated
"OrientedVertebra(std::vector<vec3> keypoints) is deprecated, use OrientedVertebra(std::map<std::string, vec3> keypoints);"

Member Function Documentation

◆ describe()

std::string ImFusion::OrientedVertebra::describe ( ) const
inlineoverridevirtual

A (human-readable) description of this anatomy.

Reimplemented from ImFusion::AnatomicalStructure.

◆ position()

vec3 ImFusion::OrientedVertebra::position ( ) const

Returns the estimated position of the vertebra as was previously calculated by calculatePosition().

If this is not available, retruns vec3(Nan,Nan,Nan)

◆ rightKeypoint()

vec3 ImFusion::OrientedVertebra::rightKeypoint ( ) const
Deprecated
"rightKeypoint() is deprecated, use rightPedicle() instead"

◆ leftKeypoint()

vec3 ImFusion::OrientedVertebra::leftKeypoint ( ) const
Deprecated
"leftKeypoint() is deprecated, use leftPedicle() instead"

◆ identifier()

std::string ImFusion::OrientedVertebra::identifier ( ) const
overridevirtual

A (machine-readable) name of the anatomy.

Implements ImFusion::AnatomicalStructure.

◆ serializationID()

std::string ImFusion::OrientedVertebra::serializationID ( ) const
inlineoverridevirtual

String differentiating the type of Anatomical Structure For imfusion types, these strings should start with "imfusion." Used for (de)serialization.

Implements ImFusion::AnatomicalStructure.

◆ getName()

std::string ImFusion::OrientedVertebra::getName ( ) const
Deprecated
"getName() is deprecated, Use name() instead"

◆ setMeshes()

void ImFusion::OrientedVertebra::setMeshes ( std::vector< std::unique_ptr< Mesh > > & meshes_)

Store a vector of meshes in the vertebra class If there is a single mesh it is stored under Keys::Spine::Vertebra::key for legacy reasons Otherwise, the meshes are stored under their given mesh->name().

Deprecated
"setMeshes() is deprecated, use setMesh(std::string name, std::unique_ptr<Mesh>) instead."

◆ construct()

std::unique_ptr< AnatomicalStructure > ImFusion::OrientedVertebra::construct ( ) const
overrideprotectedvirtual

◆ cloneImpl()

std::unique_ptr< AnatomicalStructure > ImFusion::OrientedVertebra::cloneImpl ( ) const
overrideprotectedvirtual

Derived classes may override this, but should call the base class cloneImpl to obtain a (unique-ptr) which they may assume to point to an object of the derived class.

This is done using the (virtual) construct function (see below).

Reimplemented from ImFusion::AnatomicalStructure.


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