Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitknnInteractiveLassoInteractor.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 mitknnInteractiveLassoInteractor_h
14 #define mitknnInteractiveLassoInteractor_h
15 
16 #include <mitkImage.h>
19 
20 namespace mitk::nnInteractive
21 {
43  {
44  public:
48 
51  ~LassoInteractor() override;
52 
58  bool HasInteractions() const override;
59 
71  Image::ConstPointer GetLastLassoMask() 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 drawing contours.
bool HasInteractions() const override
Checks whether any contours have been drawn.
Image::ConstPointer GetLastLassoMask() const
Returns the binary mask slice of the most recently drawn contour.
const InteractionBoundingBox * GetLastLassoBoundingBox() const
Returns the interaction bounding box for the most recently drawn contour.
~LassoInteractor() override
Destructor. Calls OnReset() to clean up data nodes.
void RemoveLastInteraction(PromptType promptType) override
Removes the most recently drawn contour for the given prompt type.
LassoInteractor()
Constructs a LassoInteractor with InteractionType::Lasso.
PromptType
Specifies the types of prompts used in nnInteractive.
std::array< std::array< int, 2 >, 3 > InteractionBoundingBox