vtkSlicerViewerInteractorStyle.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00019
00030
00034
00035 #ifndef __vtkSlicerViewerInteractorStyle_h
00036 #define __vtkSlicerViewerInteractorStyle_h
00037
00038 #include "vtkSlicerBaseGUIWin32Header.h"
00039
00040 #include "vtkObject.h"
00041 #include "vtkInteractorStyle.h"
00042
00043 #include "vtkMRML.h"
00044 #include "vtkMRMLCameraNode.h"
00045 #include "vtkSlicerApplicationLogic.h"
00046
00047 class vtkSlicerViewerWidget;
00048 class VTK_SLICER_BASE_GUI_EXPORT vtkSlicerViewerInteractorStyle : public vtkInteractorStyle
00049 {
00050 public:
00051 static vtkSlicerViewerInteractorStyle *New();
00052 vtkTypeRevisionMacro(vtkSlicerViewerInteractorStyle,vtkInteractorStyle);
00053 void PrintSelf(ostream& os, vtkIndent indent);
00054
00055 vtkGetObjectMacro (ApplicationLogic, vtkSlicerApplicationLogic );
00056 vtkSetObjectMacro (ApplicationLogic, vtkSlicerApplicationLogic );
00057
00061 virtual void OnMouseMove();
00062 virtual void OnLeftButtonDown();
00063 virtual void OnLeftButtonUp();
00064 virtual void OnMiddleButtonDown();
00065 virtual void OnMiddleButtonUp();
00066 virtual void OnRightButtonDown();
00067 virtual void OnRightButtonUp();
00068 virtual void OnMouseWheelForward();
00069 virtual void OnMouseWheelBackward();
00070
00075 virtual void Rotate();
00076 virtual void Spin();
00077 virtual void Pan();
00078 virtual void Dolly();
00079 virtual void Dolly(double factor);
00080
00081 virtual void OnEnter();
00082 virtual void OnLeave();
00083 virtual void OnExpose();
00084
00085
00088 vtkGetObjectMacro ( CameraNode, vtkMRMLCameraNode );
00089 vtkSetObjectMacro ( CameraNode, vtkMRMLCameraNode );
00090
00091
00092
00093 vtkGetMacro (NumberOfPicks, int);
00094
00095
00096
00097
00098
00099 vtkGetMacro (NumberOfTransientPicks, int );
00100
00101
00102
00103 vtkGetMacro (NumberOfPlaces, int);
00104
00105
00106
00107
00108
00109 vtkGetMacro ( NumberOfTransientPlaces, int );
00110
00111
00114 vtkGetObjectMacro(ViewerWidget, vtkSlicerViewerWidget);
00115 virtual void SetViewerWidget(vtkSlicerViewerWidget *viewerWidget);
00116
00119
00120 enum
00121 {
00122 PickEvent,
00123 PlaceEvent,
00124 SelectRegionEvent,
00125 PlotEvent,
00126 };
00127
00128
00129 protected:
00130 vtkSlicerViewerInteractorStyle();
00131 ~vtkSlicerViewerInteractorStyle();
00132
00133 vtkMRMLCameraNode *CameraNode;
00134 vtkSlicerApplicationLogic *ApplicationLogic;
00135
00136 double MotionFactor;
00137
00138
00139
00140
00141
00142 int NumberOfPicks;
00143 int NumberOfPlaces;
00144
00145
00146
00147
00148
00149 int NumberOfTransientPicks;
00150 int NumberOfTransientPlaces;
00151
00154 vtkSlicerViewerWidget *ViewerWidget;
00155
00156 private:
00157 vtkSlicerViewerInteractorStyle(const vtkSlicerViewerInteractorStyle&);
00158 void operator=(const vtkSlicerViewerInteractorStyle&);
00159 };
00160
00161 #endif