Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
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 (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 mitkClippingPlaneInteractor3D_h
14 #define mitkClippingPlaneInteractor3D_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) itkCloneMacro(Self)
34 
35  protected : ClippingPlaneInteractor3D();
36  ~ClippingPlaneInteractor3D() override;
41  void ConnectActionsAndFunctions() override;
45  void DataNodeChanged() override;
46 
50  virtual bool CheckOverObject(const InteractionEvent *);
51  virtual void SelectObject(StateMachineAction *, InteractionEvent *);
52  virtual void DeselectObject(StateMachineAction *, InteractionEvent *);
53  virtual void InitTranslate(StateMachineAction *, InteractionEvent *);
54  virtual void InitRotate(StateMachineAction *, InteractionEvent *);
55  virtual void TranslateObject(StateMachineAction *, InteractionEvent *);
56  virtual void RotateObject(StateMachineAction *, InteractionEvent *);
57 
58  private:
59  void ColorizeSurface(BaseRenderer::Pointer renderer, double scalar = 0.0);
60 
61  double m_InitialPickedWorldPoint[4];
62  Point2D m_InitialPickedDisplayPoint;
63 
64  Geometry3D::Pointer m_OriginalGeometry;
65 
66  Vector3D m_ObjectNormal;
67  };
68 }
69 #endif // mitkClippingPlaneInteractor3D_h
#define MITKDATATYPESEXT_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
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...
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Specialized interactor for clipping planes.