Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkClippingPlaneInteractor3D.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 mitkClippingPlaneInteractor3D_h
18 #define mitkClippingPlaneInteractor3D_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 : ClippingPlaneInteractor3D();
40  virtual ~ClippingPlaneInteractor3D();
45  virtual void ConnectActionsAndFunctions() override;
49  virtual void DataNodeChanged() override;
50 
54  virtual bool CheckOverObject(const InteractionEvent *);
57  virtual void InitTranslate(StateMachineAction *, InteractionEvent *);
58  virtual void InitRotate(StateMachineAction *, InteractionEvent *);
60  virtual void RotateObject(StateMachineAction *, InteractionEvent *);
61 
62  private:
63  void ColorizeSurface(BaseRenderer::Pointer renderer, double scalar = 0.0);
64 
65  double m_InitialPickedWorldPoint[4];
66  Point2D m_InitialPickedDisplayPoint;
67 
68  Geometry3D::Pointer m_OriginalGeometry;
69 
70  Vector3D m_ObjectNormal;
71  };
72 }
73 #endif // mitkClippingPlaneInteractor3D_h
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
Specialized interactor for clipping planes.