Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkLabelHighlightGuard.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkLabelHighlightGuard_h
14 #define mitkLabelHighlightGuard_h
15 
16 #include <MitkMultilabelExports.h>
17 
18 #include <mitkDataNode.h>
19 #include <mitkLabelSetImage.h>
20 
21 namespace mitk
22 {
30  {
31  public:
33  DataNode::Pointer GetSegmentationNode() const;
34 
37 
38  void SetHighlightInvisibleLabels(bool highlightInvisible);
39 
41 
42  constexpr static const char* PROPERTY_NAME_LABELS_HIGHLIGHTED()
43  {
44  return "org.mitk.multilabel.labels.highlighted";
45  };
46 
47  constexpr static const char* PROPERTY_NAME_HIGHLIGHT_INVISIBLE()
48  {
49  return "org.mitk.multilabel.highlight_invisible";
50  };
51 
52  protected:
53  static void UpdateNode(DataNode* node, MultiLabelSegmentation::LabelValueVectorType labels, bool highlightInvisible);
55  bool m_HighlightInvisible = false;
57  };
58 }
59 
60 #endif
#define MITKMULTILABEL_EXPORT
Class for nodes of the DataTree.
Definition: mitkDataNode.h:64
constexpr static const char * PROPERTY_NAME_LABELS_HIGHLIGHTED()
void SetHighlightedLabels(MultiLabelSegmentation::LabelValueVectorType labels)
MultiLabelSegmentation::LabelValueVectorType GetHighlightedLabels() const
static void UpdateNode(DataNode *node, MultiLabelSegmentation::LabelValueVectorType labels, bool highlightInvisible)
void SetHighlightInvisibleLabels(bool highlightInvisible)
DataNode::Pointer GetSegmentationNode() const
constexpr static const char * PROPERTY_NAME_HIGHLIGHT_INVISIBLE()
void SetSegmentationNode(DataNode *node)
WeakPointer< DataNode > m_Node
std::vector< LabelValueType > LabelValueVectorType
Find image slices visible on a given plane.