ImFusion SDK 4.3
Structure Class Referencefinal

#include <ImFusion/Seg/Structure.h>

A Structure is a helper class providing a view onto a single label value within a label map. More...

+ Inheritance diagram for Structure:

Detailed Description

A Structure is a helper class providing a view onto a single label value within a label map.

This class only serves as convenience interface to manage the metadata of a structure. The actual label map (pixel data) and the majority of its metadata (color, name, visibility) is stored elsewhere. Usually, instances of this class are not created manually but fully managed by the StructuresView.

See also
StructuresView, LabelDataComponent, LabelDataComponent::LabelConfig

Public Member Functions

 Structure (SharedImageSet &labelMap, int labelIndex)
 Instantiates a new Structure providing a view onto an existing label map.
 
 Structure (Structure &&rhs)=default
 
Structureoperator= (Structure &&rhs)=default
 
SharedImageSetlabelMap ()
 Returns the label map storing the actual segmentation information.
 
const SharedImageSetlabelMap () const
 
int labelIndex () const
 Returns the storage value in labelMap() corresponding to this structure.
 
std::string name () const
 Returns the name of this structure to be shown in the UI.
 
void setName (const std::string &name)
 Sets the name of this structure to be shown in the UI.
 
vec4 color () const
 Returns the color to render this structure in.
 
void setColor (const vec4 &color)
 Sets the color to render this structure in.
 
bool isVisible () const
 Returns whether this structure is shown in 2d or 3d visualization.
 
void setVisible (bool value)
 Sets whether this structure shall be shown in both 2d and 3d visualization.
 
bool isVisible2d () const
 Returns the flag whether this structure shall be shown in 2d visualizations.
 
void setVisible2d (bool value)
 Sets the flag whether this structure shall be shown in 2d visualizations.
 
bool isVisible3d () const
 Returns the flag whether this structure shall be shown in 3d visualizations.
 
void setVisible3d (bool value)
 Sets the flag whether this structure shall be shown in 3d visualizations.
 
std::unique_ptr< MeshextractMesh () const
 Extracts a mesh from the underlying label map representing this structure.
 
std::shared_ptr< const Meshmesh () const
 Returns the optional reference to a mesh extracted from the label map (needs to be managed from the outside).
 
void setMesh (std::shared_ptr< const Mesh > value)
 Sets the optional reference to a mesh extracted from the label map (needs to be managed from the outside).
 
- Public Member Functions inherited from 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.
 

Public Attributes

Signal signalChanged
 Signal emitted when any of the properties has changed.
 
Signal signalMeshChanged
 Signal emitted when a new mesh has been assigned.
 

Additional Inherited Members

- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Constructor & Destructor Documentation

◆ Structure()

Structure ( SharedImageSet & labelMap,
int labelIndex )

Instantiates a new Structure providing a view onto an existing label map.

Parameters
labelMapLabel image storing the actual segmentation pixel data, must stay alive as long as this Structure exists
labelIndexStorage value index in labelMap corresponding to this structure

Member Data Documentation

◆ signalChanged

Signal signalChanged

Signal emitted when any of the properties has changed.

Will not trigger if the underlying label map or the mesh has changed.


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