Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkMedSAMTool.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 mitkMedSAMTool_h
14 #define mitkMedSAMTool_h
15 
19 #include <mitkRenderingManager.h>
20 
21 namespace us
22 {
23  class ModuleResource;
24 }
25 
26 namespace mitk
27 {
37  {
38  public:
40  itkFactorylessNewMacro(Self);
41  itkCloneMacro(Self);
42 
43  const char *GetName() const override;
44 
45  void Activated() override;
46  void Deactivated() override;
47  bool HasPicks() const override;
48  void ClearPicks() override;
49  void ConnectActionsAndFunctions() override;
50  std::string GetPointsAsCSVString(const mitk::BaseGeometry *baseGeometry) const override;
51 
56  void OnRenderWindowClicked(StateMachineAction *, InteractionEvent *interactionEvent);
57 
62  void OnDelete(StateMachineAction *, InteractionEvent *);
63 
64  void OnMove(StateMachineAction *, InteractionEvent *);
65  void OnRelease(StateMachineAction *, InteractionEvent *);
66  void OnPrimaryButtonPressed(StateMachineAction *, InteractionEvent *);
67 
68  protected:
69  MedSAMTool() = default;
70  ~MedSAMTool() = default;
71 
72  private:
77  void CreateBoundingShapeInteractor(bool rotationEnabled);
78 
83  mitk::Geometry3D::Pointer InitializeWithImageGeometry(const mitk::BaseGeometry *geometry) const;
84  DataNode::Pointer m_BoundingBoxNode;
85  BoundingShapeInteractor::Pointer m_BoundingShapeInteractor;
86  };
87 }
88 #endif
mitk::InteractionEvent
Definition: mitkInteractionEvent.h:26
us
Definition: mitkAbstractFileReader.h:29
itk::SmartPointer< Self >
mitk::SegmentAnythingTool
Segment Anything Model interactive 2D tool class.
Definition: mitkSegmentAnythingTool.h:39
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::EventStateMachine
‍**
Definition: mitkEventStateMachine.h:111
mitk::MedSAMTool
Medical Segment Anything Model interactive 2D tool class.
Definition: mitkMedSAMTool.h:36
mitk::BaseGeometry
BaseGeometry Describes the geometry of a data object.
Definition: mitkBaseGeometry.h:94
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
mitk::StateMachineAction
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Definition: mitkStateMachineAction.h:30
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
MitkSegmentationExports.h
mitkRenderingManager.h
mitkBoundingShapeInteractor.h
mitkSegmentAnythingTool.h