Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitknnInteractiveScribbleInteractor.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 mitknnInteractiveScribbleInteractor_h
14 #define mitknnInteractiveScribbleInteractor_h
15 
16 #include <mitkImage.h>
19 
20 namespace mitk::nnInteractive
21 {
42  {
43  public:
47 
50  ~ScribbleInteractor() override;
51 
57  bool HasInteractions() const override;
58 
71  Image::ConstPointer GetLastScribbleMask() const;
72 
83 
91  void RemoveLastInteraction(PromptType promptType) override;
92 
93  private:
94  void OnHandleEvent(InteractionEvent* event) override;
95  void OnEnable() override;
96  void OnDisable() override;
97  void OnReset() override;
98 
99  class Impl;
100  std::unique_ptr<Impl> m_Impl;
101  };
102 }
103 
104 #endif
#define MITKPYTHONSEGMENTATION_EXPORT
Base class for all interaction events in MITK.
Base class for all nnInteractive interactors.
nnInteractive interactor for freehand brushstrokes.
ScribbleInteractor()
Constructs a ScribbleInteractor with InteractionType::Scribble.
bool HasInteractions() const override
Checks whether any scribbles have been drawn.
Image::ConstPointer GetLastScribbleMask() const
Returns the binary mask slice of the most recent brushstroke.
~ScribbleInteractor() override
Destructor. Calls OnReset() to clean up data nodes.
const InteractionBoundingBox * GetLastScribbleBoundingBox() const
Returns the interaction bounding box for the most recent brushstroke.
void RemoveLastInteraction(PromptType promptType) override
Removes the most recently drawn brushstroke for the given prompt type.
PromptType
Specifies the types of prompts used in nnInteractive.
std::array< std::array< int, 2 >, 3 > InteractionBoundingBox