![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Seg/StructuresView.h>
The StructuresView provides a flattened view onto a given set of label maps. More...
Inheritance diagram for StructuresView:The StructuresView provides a flattened view onto a given set of label maps.
It provides a list of Structures, each representing one label configuration of the underlying label maps. Furthermore, it provides a couple of convenience functions to manage their settings and lifetime, as well as a set of signals to notify potential listeners when structures change. You can use the StructuresViewRenderer to automatically visualize the structures in a DisplayWidget.
Classes | |
| struct | LabelMapInfo |
| Bookkeeping information to easily map between label maps and their structures. More... | |
Public Types | |
| enum class | StructureSelection { All , OnlyVisible } |
Public Member Functions | |
| StructuresView (const std::vector< SharedImageSet * > &labelMaps) | |
| std::vector< Structure * > | structures () |
| Returns the all Structures of all underlying label maps. | |
| std::vector< const Structure * > | structures () const |
| std::vector< Structure * > | structuresOf (const SharedImageSet *labelMap) |
| Returns the all Structures of the given label map. | |
| std::vector< const Structure * > | structuresOf (const SharedImageSet *labelMap) const |
| void | setLabelMaps (const std::vector< SharedImageSet * > &labelMaps) |
| Sets the list of label maps that are currently represented by this StructuresView. | |
| std::vector< SharedImageSet * > | labelMaps () |
| Returns the list of label maps that are currently represented by this StructuresView. | |
| std::vector< const SharedImageSet * > | labelMaps () const |
| void | addLabelMap (SharedImageSet *labelMap) |
| Adds the given label. | |
| void | removeLabelMap (const SharedImageSet *labelMap) |
| Adds the given label map to the list of label maps that are currently represented by this StructuresView. | |
| std::unique_ptr< SharedImage > | computeOtherLabelsMask (const Structure &s, StructureSelection selection) const |
| Returns a binary mask image of all other active labels in the reference grid of the given Structure. | |
| std::unique_ptr< SharedImage > | computeOtherLabelsMask (const Structure &s, const std::vector< const Structure * > &structuresToMask) const |
| Returns a binary mask image of all other active labels in the reference grid of the given Structure. | |
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. | |
| SignalReceiver & | operator= (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< Structure * > | signalStructureAdded |
| Signal emitted every time when a new Structure has been added. | |
| Signal< Structure * > | signalStructureChanged |
| Signal emitted every time a Structure of this StructuresView has changed. | |
| Signal< Structure * > | signalStructureDeleted |
| Signal emitted every time when a Structure has been removed and any corresponding pointer has become invalid. | |
Protected Member Functions | |
| void | onLabelDataComponentChanged (LabelDataComponent *ldc) |
| Structure & | addStructure (SharedImageSet &labelMap, int labelIndex) |
| void | removeStructure (Structure *structure) |
Protected Member Functions inherited from SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
Protected Attributes | |
| std::vector< std::unique_ptr< Structure > > | m_structures |
| std::unordered_map< SharedImageSet *, LabelMapInfo > | m_labelMapInfos |
| void setLabelMaps | ( | const std::vector< SharedImageSet * > & | labelMaps | ) |
Sets the list of label maps that are currently represented by this StructuresView.
This function will first remove all current label maps and then add the new ones. Use addLabelMap()/removeLabelMap() instead if some label maps remain the same.
| std::unique_ptr< SharedImage > computeOtherLabelsMask | ( | const Structure & | s, |
| StructureSelection | selection ) const |
Returns a binary mask image of all other active labels in the reference grid of the given Structure.
| s | Reference structure for which to compute all other labels |
| selection | Enumeration whether to consider all other structures or only the currently visible ones. |
| std::unique_ptr< SharedImage > computeOtherLabelsMask | ( | const Structure & | s, |
| const std::vector< const Structure * > & | structuresToMask ) const |
Returns a binary mask image of all other active labels in the reference grid of the given Structure.
| s | Reference structure for which to compute all other labels |
| selection | Enumeration whether to consider all other structures or only the currently visible ones. |