Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MITKSURFACEDEFORMATIONINTERACTOR3D_H_HEADER_INCLUDED
00020 #define MITKSURFACEDEFORMATIONINTERACTOR3D_H_HEADER_INCLUDED
00021
00022 #include "mitkInteractor.h"
00023 #include "MitkExtExports.h"
00024 #include "mitkCommon.h"
00025
00026 #include <vtkType.h>
00027
00028 class vtkPolyData;
00029
00030 namespace mitk
00031 {
00032
00033 class DataNode;
00034 class Surface;
00035
00043 class MitkExt_EXPORT SurfaceDeformationInteractor3D : public Interactor
00044 {
00045 public:
00046 mitkClassMacro(SurfaceDeformationInteractor3D, Interactor);
00047 mitkNewMacro3Param(Self, const char *, DataNode *, int);
00048 mitkNewMacro2Param(Self, const char *, DataNode *);
00049
00051 void SetPrecision( ScalarType precision );
00052
00059 virtual float CanHandleEvent(StateEvent const *stateEvent) const;
00060
00061
00062 protected:
00068 SurfaceDeformationInteractor3D(const char *type,
00069 DataNode *dataNode, int n = -1);
00070
00074 virtual ~SurfaceDeformationInteractor3D();
00075
00076 virtual bool ExecuteAction( Action* action,
00077 mitk::StateEvent const* stateEvent );
00078
00079 enum
00080 {
00081 COLORIZATION_GAUSS,
00082 COLORIZATION_CONSTANT
00083 };
00084
00085 bool ColorizeSurface( vtkPolyData *polyData, const Point3D &pickedPoint,
00086 int mode, double scalar = 0.0 );
00087
00088
00089 private:
00090
00092 ScalarType m_Precision;
00093
00094 Point3D m_InitialPickedPoint;
00095 Point2D m_InitialPickedDisplayPoint;
00096 vtkFloatingPointType m_InitialPickedPointWorld[4];
00097
00098 Point3D m_CurrentPickedPoint;
00099 Point2D m_CurrentPickedDisplayPoint;
00100 vtkFloatingPointType m_CurrentPickedPointWorld[4];
00101
00102 Point3D m_SurfaceColorizationCenter;
00103
00104 Vector3D m_ObjectNormal;
00105
00106 Geometry3D::Pointer m_Geometry;
00107
00108 Surface *m_Surface;
00109 vtkPolyData *m_PolyData;
00110
00111 DataNode *m_PickedSurfaceNode;
00112 Surface *m_PickedSurface;
00113 vtkPolyData *m_PickedPolyData;
00114
00115 vtkPolyData *m_OriginalPolyData;
00116
00117 double m_GaussSigma;
00118
00119 };
00120
00121 }
00122
00123 #endif