|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
RAII guard for managing label highlighting on data nodes. More...
#include <mitkLabelHighlightGuard.h>

Public Member Functions | |
| void | SetSegmentationNode (DataNode *node) |
| Sets the segmentation node on which labels should be highlighted. More... | |
| DataNode::Pointer | GetSegmentationNode () const |
| Returns the currently associated segmentation data node. More... | |
| void | SetHighlightedLabels (MultiLabelSegmentation::LabelValueVectorType labels) |
| Sets the label values that should be highlighted. More... | |
| MultiLabelSegmentation::LabelValueVectorType | GetHighlightedLabels () const |
| Returns the currently highlighted label values. More... | |
| void | SetHighlightInvisibleLabels (bool highlightInvisible) |
| Sets whether invisible labels should also be highlighted. More... | |
| ~LabelHighlightGuard () | |
| Destructor. Removes all highlighting from the associated node. More... | |
Static Public Member Functions | |
| constexpr static const char * | PROPERTY_NAME_LABELS_HIGHLIGHTED () |
| Returns the property name used to store highlighted label values on a data node. More... | |
| constexpr static const char * | PROPERTY_NAME_HIGHLIGHT_INVISIBLE () |
| Returns the property name used to control highlighting of invisible labels. More... | |
Static Protected Member Functions | |
| static void | UpdateNode (DataNode *node, MultiLabelSegmentation::LabelValueVectorType labels, bool highlightInvisible) |
Protected Attributes | |
| MultiLabelSegmentation::LabelValueVectorType | m_Labels |
| bool | m_HighlightInvisible |
| WeakPointer< DataNode > | m_Node |
RAII guard for managing label highlighting on data nodes.
This helper class manages the node properties used for label highlighting in multi-label segmentations. It ensures that highlighting is always properly removed when:
The guard also triggers the RenderingManager to refresh render windows when highlighting state changes.
Definition at line 50 of file mitkLabelHighlightGuard.h.
| mitk::LabelHighlightGuard::~LabelHighlightGuard | ( | ) |
Destructor. Removes all highlighting from the associated node.
| MultiLabelSegmentation::LabelValueVectorType mitk::LabelHighlightGuard::GetHighlightedLabels | ( | ) | const |
Returns the currently highlighted label values.
| DataNode::Pointer mitk::LabelHighlightGuard::GetSegmentationNode | ( | ) | const |
Returns the currently associated segmentation data node.
|
inlinestaticconstexpr |
Returns the property name used to control highlighting of invisible labels.
Definition at line 108 of file mitkLabelHighlightGuard.h.
|
inlinestaticconstexpr |
Returns the property name used to store highlighted label values on a data node.
Definition at line 99 of file mitkLabelHighlightGuard.h.
| void mitk::LabelHighlightGuard::SetHighlightedLabels | ( | MultiLabelSegmentation::LabelValueVectorType | labels | ) |
Sets the label values that should be highlighted.
Only takes effect if a segmentation node is set. Triggers a render update.
| [in] | labels | Vector of label values to highlight. |
| void mitk::LabelHighlightGuard::SetHighlightInvisibleLabels | ( | bool | highlightInvisible | ) |
Sets whether invisible labels should also be highlighted.
| [in] | highlightInvisible | If true, labels that are invisible will also be highlighted. |
| void mitk::LabelHighlightGuard::SetSegmentationNode | ( | DataNode * | node | ) |
Sets the segmentation node on which labels should be highlighted.
If a different node was previously set, the highlighting on the old node is removed first. Setting nullptr removes all highlighting.
| [in] | node | Pointer to the data node, or nullptr to clear highlighting. |
|
staticprotected |
|
protected |
Definition at line 116 of file mitkLabelHighlightGuard.h.
|
protected |
Definition at line 115 of file mitkLabelHighlightGuard.h.
|
protected |
Definition at line 117 of file mitkLabelHighlightGuard.h.