Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkBoundingShapeInteractor.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 mitkBoundingShapeInteractor_h
14 #define mitkBoundingShapeInteractor_h
15 
16 #include <mitkDataInteractor.h>
17 #include <mitkEventConfig.h>
18 #include <mitkGeometry3D.h>
19 
20 #include <usServiceRegistration.h>
21 
23 
24 namespace mitk
25 {
26 // create events for interactions
27 #pragma GCC visibility push(default)
28  itkEventMacroDeclaration(BoundingShapeInteractionEvent, itk::AnyEvent);
29 #pragma GCC visibility pop
30 
39  {
40  public:
42  itkFactorylessNewMacro(Self);
43  itkCloneMacro(Self);
44 
45  void SetDataNode(DataNode *dataNode) override;
46  void SetRotationEnabled(bool rotationEnabled);
47 
48  protected:
50  ~BoundingShapeInteractor() override;
51 
56  void ConnectActionsAndFunctions() override;
57 
61  void DataNodeChanged() override;
62 
63  void HandlePositionChanged(const InteractionEvent *interactionEvent, Point3D &center);
64 
68  virtual bool CheckOverObject(const InteractionEvent *);
69 
73  virtual bool CheckOverHandles(const InteractionEvent *interactionEvent);
74 
78  virtual void SelectObject(StateMachineAction *, InteractionEvent *);
79 
83  virtual void DeselectObject(StateMachineAction *, InteractionEvent *);
84 
88  virtual void SelectHandle(StateMachineAction *, InteractionEvent *);
89 
93  virtual void TranslateObject(StateMachineAction *, InteractionEvent *);
94 
98  virtual void ScaleObject(StateMachineAction *, InteractionEvent *);
99 
104  virtual void InitInteraction(StateMachineAction *, InteractionEvent *interactionEvent);
105 
109  virtual void DeselectHandles(StateMachineAction *, InteractionEvent *interactionEvent);
110 
114  virtual void RestoreNodeProperties();
115 
119  bool InitMembers(InteractionEvent *interactionEvent);
120 
121  private:
125  void EnableOriginalInteraction();
126 
130  void DisableOriginalInteraction();
131 
132  class Impl;
133  Impl *m_Impl;
134  };
135 }
136 #endif
MITKBOUNDINGSHAPE_EXPORT
#define MITKBOUNDINGSHAPE_EXPORT
Definition: MitkBoundingShapeExports.h:15
mitkEventConfig.h
mitk::BoundingShapeInteractor
Basic interaction methods for mitk::GeometryData.
Definition: mitkBoundingShapeInteractor.h:38
mitk::InteractionEvent
Definition: mitkInteractionEvent.h:26
MitkBoundingShapeExports.h
mitkGeometry3D.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Point< ScalarType, 3 >
usServiceRegistration.h
mitkDataInteractor.h
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
mitk::DataInteractor
Base class from with interactors that handle DataNodes are to be derived.
Definition: mitkDataInteractor.h:48
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
mitk::itkEventMacroDeclaration
itkEventMacroDeclaration(BoundingShapeInteractionEvent, itk::AnyEvent)