Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkSurfaceDeformationDataInteractor3D.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 mitkSurfaceDeformationDataInteractor3D_h_
18 #define mitkSurfaceDeformationDataInteractor3D_h_
19 
21 #include "mitkDataInteractor.h"
22 #include "mitkSurface.h"
23 
24 namespace mitk
25 {
32  // Inherit from DataInteratcor, this provides functionality of a state machine and configurable inputs.
34  {
35  public:
37  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
38 
45  virtual void ConnectActionsAndFunctions() override;
49  virtual void DataNodeChanged() override;
50 
54  virtual bool CheckOverObject(const InteractionEvent *);
57  virtual void InitDeformation(StateMachineAction *, InteractionEvent *);
58  virtual void DeformObject(StateMachineAction *, InteractionEvent *);
59  virtual void ScaleRadius(StateMachineAction *, InteractionEvent *);
60 
61  enum
62  {
64  COLORIZATION_CONSTANT
65  };
66 
67  private:
68  void ColorizeSurface(
69  vtkPolyData *polyData, int timeStep, const Point3D &pickedPoint, int mode, double scalar = 0.0);
70 
71  double m_InitialPickedWorldPoint[4];
72  Point3D m_InitialPickedPoint;
73  Point3D m_SurfaceColorizationCenter;
74 
75  Surface *m_Surface;
76  vtkPolyData *m_OriginalPolyData;
77 
78  double m_GaussSigma;
79  Vector3D m_ObjectNormal;
80  };
81 }
82 #endif
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:32
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.
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
SurfaceDeformation interaction with objects in 3D windows.