00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00061 #ifndef __vtkInteractorStyleImage_h
00062 #define __vtkInteractorStyleImage_h
00063
00064 #include "vtkInteractorStyle.h"
00065
00066
00067 #define VTK_INTERACTOR_STYLE_IMAGE_NONE 0
00068 #define VTK_INTERACTOR_STYLE_IMAGE_WINDOW_LEVEL 1
00069 #define VTK_INTERACTOR_STYLE_IMAGE_PAN 2
00070 #define VTK_INTERACTOR_STYLE_IMAGE_ZOOM 3
00071 #define VTK_INTERACTOR_STYLE_IMAGE_SPIN 4
00072
00073 class VTK_RENDERING_EXPORT vtkInteractorStyleImage : public vtkInteractorStyle
00074 {
00075 public:
00076 static vtkInteractorStyleImage *New();
00077 vtkTypeMacro(vtkInteractorStyleImage, vtkObject);
00078 void PrintSelf(ostream& os, vtkIndent indent);
00079
00081
00083 void OnMouseMove (int ctrl, int shift, int x, int y);
00084 void OnLeftButtonDown(int ctrl, int shift, int x, int y);
00085 void OnLeftButtonUp (int ctrl, int shift, int x, int y);
00086 void OnMiddleButtonDown(int ctrl, int shift, int x, int y);
00087 void OnMiddleButtonUp (int ctrl, int shift, int x, int y);
00088 void OnRightButtonDown(int ctrl, int shift, int x, int y);
00089 void OnRightButtonUp (int ctrl, int shift, int x, int y);
00091
00093
00094 vtkGetVector2Macro(WindowLevelStartPosition,int);
00095 vtkGetVector2Macro(WindowLevelCurrentPosition,int);
00097
00098 protected:
00099 vtkInteractorStyleImage();
00100 ~vtkInteractorStyleImage();
00101
00102 void WindowLevelXY(int dx, int dy);
00103 void PanXY(int x, int y, int oldX, int oldY);
00104 void DollyXY(int dx, int dy);
00105 void SpinXY(int dx, int dy, int oldX, int oldY);
00106
00107 int WindowLevelStartPosition[2];
00108 int WindowLevelCurrentPosition[2];
00109 int State;
00110 float MotionFactor;
00111 float RadianToDegree;
00112 private:
00113 vtkInteractorStyleImage(const vtkInteractorStyleImage&);
00114 void operator=(const vtkInteractorStyleImage&);
00115 };
00116
00117 #endif