Medical Imaging Interaction Toolkit  2021.10.99-fd647480
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 (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 mitkSurfaceDeformationDataInteractor3D_h_
14 #define mitkSurfaceDeformationDataInteractor3D_h_
15 
17 #include "mitkDataInteractor.h"
18 #include "mitkSurface.h"
19 
20 namespace mitk
21 {
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 *);
52  virtual void SelectObject(StateMachineAction *, InteractionEvent *);
53  virtual void DeselectObject(StateMachineAction *, InteractionEvent *);
54  virtual void InitDeformation(StateMachineAction *, InteractionEvent *);
55  virtual void DeformObject(StateMachineAction *, InteractionEvent *);
56  virtual void ScaleRadius(StateMachineAction *, InteractionEvent *);
57 
58  enum
59  {
61  COLORIZATION_CONSTANT
62  };
63 
64  private:
65  void ColorizeSurface(
66  vtkPolyData *polyData, int timeStep, const Point3D &pickedPoint, int mode, double scalar = 0.0);
67 
68  double m_InitialPickedWorldPoint[4];
69  Point3D m_InitialPickedPoint;
70  Point3D m_SurfaceColorizationCenter;
71 
72  Surface *m_Surface;
73  vtkPolyData *m_OriginalPolyData;
74 
75  double m_GaussSigma;
76  Vector3D m_ObjectNormal;
77  };
78 }
79 #endif
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
#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:36
SurfaceDeformation interaction with objects in 3D windows.