Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkAffineImageCropperInteractor_h_
18 #define mitkAffineImageCropperInteractor_h_
19 
21 #include "mitkBaseRenderer.h"
22 #include "mitkDataInteractor.h"
23 #include "mitkGeometry3D.h"
24 
25 namespace mitk
26 {
32  // Inherit from DataInteratcor, this provides functionality of a state machine and configurable inputs.
34  {
35  public:
37  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
38 
39  protected : AffineImageCropperInteractor();
45  virtual void ConnectActionsAndFunctions() override;
49  virtual void DataNodeChanged() override;
50 
54  virtual bool CheckOverObject(const InteractionEvent *interactionEvent);
57  virtual void InitTranslate(StateMachineAction *, InteractionEvent *);
58  virtual void InitRotate(StateMachineAction *, InteractionEvent *);
59  virtual void InitDeformation(StateMachineAction *, InteractionEvent *);
60  virtual void TranslateObject(StateMachineAction *, InteractionEvent *interactionEvent);
61  virtual void RotateObject(StateMachineAction *, InteractionEvent *interactionEvent);
62  virtual void DeformObject(StateMachineAction *, InteractionEvent *);
63  virtual void ScaleRadius(StateMachineAction *, InteractionEvent *interactionEvent);
64 
65  private:
66  Geometry3D::Pointer m_OriginalGeometry;
67  mitk::DataNode::Pointer m_SelectedNode;
68 
69  Point3D m_InitialPickedPoint;
70  Point3D m_InitialOrigin;
71  Point2D m_InitialPickedDisplayPoint;
72 
73  void Deselect();
74  };
75 }
76 #endif
virtual bool CheckOverObject(const InteractionEvent *)
Checks if the mouse pointer is over the object.
#define MITKDATATYPESEXT_EXPORT
virtual void DataNodeChanged() override
Called when a DataNode has been set/changed.
DataCollection - Class to facilitate loading/accessing structured data.
virtual void DeselectObject(StateMachineAction *, InteractionEvent *)
Called if the mouse pointer leaves the area of the object.
virtual void SelectObject(StateMachineAction *, InteractionEvent *)
Called if the mouse pointer is over the object indicated by a color change.
Base class from with interactors that handle DataNodes are to be derived.
virtual void TranslateObject(StateMachineAction *, InteractionEvent *)
Performs a translation of the object relative to the mouse movement.
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
virtual void ConnectActionsAndFunctions() override
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Affine interaction with objects in 3D windows.