Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkLabelSelectionTool.h
Go to the documentation of this file.
1 /*============================================================================
2 The Medical Imaging Interaction Toolkit (MITK)
3 
4 Copyright (c) German Cancer Research Center (DKFZ)
5 All rights reserved.
6 
7 Use of this source code is governed by a 3-clause BSD license that can be
8 found in the LICENSE file.
9 
10 ============================================================================*/
11 
12 #ifndef mitkLabelSelectionTool_h
13 #define mitkLabelSelectionTool_h
14 
15 #include "mitkCommon.h"
16 #include "mitkSegTool2D.h"
18 
20 
21 
22 namespace mitk
23 {
37  {
38  public:
40  itkFactorylessNewMacro(Self);
41  itkCloneMacro(Self);
42 
44 
47 
48  const char** GetXPM() const override;
49 
50  const char* GetName() const override;
51 
53 
54  itkGetConstMacro(CheckOnlyActiveGroup, bool);
55  itkSetMacro(CheckOnlyActiveGroup, bool);
56  itkBooleanMacro(CheckOnlyActiveGroup);
57 
58  void Activated() override;
59  void Deactivated() override;
60 
61  void UpdateLabels();
62 
63  protected:
65  ~LabelSelectionTool() override;
66 
67  virtual void OnMouseMoved(StateMachineAction*, InteractionEvent* interactionEvent);
68  virtual void OnMouseReleased(StateMachineAction*, InteractionEvent* interactionEvent);
69 
70  void ConnectActionsAndFunctions() override;
71 
72  private:
73  LabelHighlightGuard m_HighlightGuard;
74  Point3D m_LastCheckedIndex;
75  Point3D m_LastCheckedPoint;
76  bool m_CheckOnlyActiveGroup = false;
77  };
78 
79 } // namespace
80 
81 #endif
#define MITKSEGMENTATION_EXPORT
Tools that allows to inspect and select labels via the render window.
~LabelSelectionTool() override
void Activated() override
Called when the tool gets activated.
void ConnectActionsAndFunctions() override
void Deactivated() override
Called when the tool gets deactivated.
const char ** GetXPM() const override
Returns an icon in the XPM format.
us::ModuleResource GetIconResource() const override
Returns the tool button icon of the tool wrapped by a usModuleResource.
const char * GetName() const override
Returns the name of this tool. Make it short!
mitkClassMacro(LabelSelectionTool, SegTool2D)
MultiLabelSegmentation::LabelValueVectorType GetIndicatedLabels() const
us::ModuleResource GetCursorIconResource() const override
Returns the path of a cursor icon.
virtual void OnMouseReleased(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void OnMouseMoved(StateMachineAction *, InteractionEvent *interactionEvent)
Event/message/notification class.
Definition: mitkMessage.h:453
std::vector< LabelValueType > LabelValueVectorType
Abstract base class for segmentation tools.
Definition: mitkSegTool2D.h:57
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Find image slices visible on a given plane.