Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkAffineImageCropperInteractor.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 mitkAffineImageCropperInteractor_h
14 #define mitkAffineImageCropperInteractor_h
15 
17 #include "mitkBaseRenderer.h"
18 #include "mitkDataInteractor.h"
19 #include "mitkGeometry3D.h"
20 
21 namespace mitk
22 {
28  // Inherit from DataInteratcor, this provides functionality of a state machine and configurable inputs.
30  {
31  public:
33  itkFactorylessNewMacro(Self);
34  itkCloneMacro(Self);
35 
42  void ConnectActionsAndFunctions() override;
46  void DataNodeChanged() override;
47 
51  virtual bool CheckOverObject(const InteractionEvent *interactionEvent);
57  virtual void TranslateObject(StateMachineAction *, InteractionEvent *interactionEvent);
58  virtual void RotateObject(StateMachineAction *, InteractionEvent *interactionEvent);
60  virtual void ScaleRadius(StateMachineAction *, InteractionEvent *interactionEvent);
61 
62  private:
63  Geometry3D::Pointer m_OriginalGeometry;
64  mitk::DataNode::Pointer m_SelectedNode;
65 
66  Point3D m_InitialPickedPoint;
67  Point3D m_InitialOrigin;
68  Point2D m_InitialPickedDisplayPoint;
69 
70  void Deselect();
71  };
72 }
73 #endif
#define MITKDATATYPESEXT_EXPORT
Affine interaction with objects in 3D windows.
virtual void RotateObject(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void InitDeformation(StateMachineAction *, InteractionEvent *)
virtual void DeselectObject(StateMachineAction *, InteractionEvent *)
virtual void TranslateObject(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void InitTranslate(StateMachineAction *, InteractionEvent *)
virtual void SelectObject(StateMachineAction *, InteractionEvent *)
virtual bool CheckOverObject(const InteractionEvent *interactionEvent)
virtual void DeformObject(StateMachineAction *, InteractionEvent *)
virtual void ScaleRadius(StateMachineAction *, InteractionEvent *interactionEvent)
mitkClassMacro(AffineImageCropperInteractor, DataInteractor)
virtual void InitRotate(StateMachineAction *, InteractionEvent *)
void ConnectActionsAndFunctions() override
Base class from with interactors that handle DataNodes are to be derived.
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Find image slices visible on a given plane.