106 #ifndef vtkImagePlaneWidget_h
107 #define vtkImagePlaneWidget_h
109 #include "vtkInteractionWidgetsModule.h"
129 #define VTK_NEAREST_RESLICE 0
130 #define VTK_LINEAR_RESLICE 1
131 #define VTK_CUBIC_RESLICE 2
134 #define VTK_IMAGE_PLANE_WIDGET_MAX_TEXTBUFF 128
155 void PlaceWidget(
double xmin,
double xmax,
double ymin,
double ymax,
156 double zmin,
double zmax)
override
169 void SetOrigin(
double x,
double y,
double z);
170 void SetOrigin(
double xyz[3]);
172 void GetOrigin(
double xyz[3]);
179 void SetPoint1(
double x,
double y,
double z);
180 void SetPoint1(
double xyz[3]);
182 void GetPoint1(
double xyz[3]);
189 void SetPoint2(
double x,
double y,
double z);
190 void SetPoint2(
double xyz[3]);
192 void GetPoint2(
double xyz[3]);
200 void GetCenter(
double xyz[3]);
208 void GetNormal(
double xyz[3]);
214 void GetVector1(
double v1[3]);
219 void GetVector2(
double v2[3]);
229 void SetSliceIndex(
int index);
234 double GetSlicePosition();
239 void SetSlicePosition(
double position);
245 void SetResliceInterpolate(
int);
246 vtkGetMacro(ResliceInterpolate,
int);
247 void SetResliceInterpolateToNearestNeighbour()
267 vtkBooleanMacro(RestrictPlaneToVolume,
vtkTypeBool);
276 vtkSetMacro(UserControlledLookupTable,
vtkTypeBool);
277 vtkGetMacro(UserControlledLookupTable,
vtkTypeBool);
278 vtkBooleanMacro(UserControlledLookupTable,
vtkTypeBool);
351 virtual void SetSelectedPlaneProperty(
vtkProperty*);
352 vtkGetObjectMacro(SelectedPlaneProperty,
vtkProperty);
360 void SetPlaneOrientation(
int);
361 vtkGetMacro(PlaneOrientation,
int);
363 { this->SetPlaneOrientation(0); }
365 { this->SetPlaneOrientation(1); }
367 { this->SetPlaneOrientation(2); }
421 vtkSetClampMacro(MarginSizeX,
double, 0.0, 0.5);
422 vtkGetMacro(MarginSizeX,
double);
423 vtkSetClampMacro(MarginSizeY,
double, 0.0, 0.5);
424 vtkGetMacro(MarginSizeY,
double);
439 virtual void SetTexturePlaneProperty(
vtkProperty*);
440 vtkGetObjectMacro(TexturePlaneProperty,
vtkProperty);
450 void SetWindowLevel(
double window,
double level,
int copy = 0);
451 void GetWindowLevel(
double wl[2]);
460 int GetCursorData(
double xyzv[4]);
467 int GetCursorDataStatus();
474 vtkGetVectorMacro(CurrentCursorPosition,
double,3);
483 vtkGetMacro(CurrentImageValue,
double);
522 VTK_CURSOR_ACTION = 0,
523 VTK_SLICE_MOTION_ACTION = 1,
524 VTK_WINDOW_LEVEL_ACTION = 2
526 vtkSetClampMacro(LeftButtonAction,
int, VTK_CURSOR_ACTION, VTK_WINDOW_LEVEL_ACTION);
527 vtkGetMacro(LeftButtonAction,
int);
528 vtkSetClampMacro(MiddleButtonAction,
int, VTK_CURSOR_ACTION, VTK_WINDOW_LEVEL_ACTION);
529 vtkGetMacro(MiddleButtonAction,
int);
530 vtkSetClampMacro(RightButtonAction,
int, VTK_CURSOR_ACTION, VTK_WINDOW_LEVEL_ACTION);
531 vtkGetMacro(RightButtonAction,
int);
546 VTK_SHIFT_MODIFIER = 1,
547 VTK_CONTROL_MODIFIER = 2
549 vtkSetClampMacro(LeftButtonAutoModifier,
int, VTK_NO_MODIFIER, VTK_CONTROL_MODIFIER);
550 vtkGetMacro(LeftButtonAutoModifier,
int);
551 vtkSetClampMacro(MiddleButtonAutoModifier,
int, VTK_NO_MODIFIER, VTK_CONTROL_MODIFIER);
552 vtkGetMacro(MiddleButtonAutoModifier,
int);
553 vtkSetClampMacro(RightButtonAutoModifier,
int, VTK_NO_MODIFIER, VTK_CONTROL_MODIFIER);
554 vtkGetMacro(RightButtonAutoModifier,
int);
575 VTK_MIDDLE_BUTTON = 2,
607 virtual void OnMouseMove();
608 virtual void OnLeftButtonDown();
609 virtual void OnLeftButtonUp();
610 virtual void OnMiddleButtonDown();
611 virtual void OnMiddleButtonUp();
612 virtual void OnRightButtonDown();
613 virtual void OnRightButtonUp();
616 virtual void StartCursor();
617 virtual void StopCursor();
618 virtual void StartSliceMotion();
619 virtual void StopSliceMotion();
620 virtual void StartWindowLevel();
621 virtual void StopWindowLevel();
644 void HighlightPlane(
int highlight);
645 void GeneratePlaneOutline();
648 void BuildRepresentation();
660 void WindowLevel(
int X,
int Y);
661 void Push(
double *p1,
double *p2);
662 void Spin(
double *p1,
double *p2);
663 void Rotate(
double *p1,
double *p2,
double *vpn);
664 void Scale(
double *p1,
double *p2,
int X,
int Y);
665 void Translate(
double *p1,
double *p2);
686 void CreateDefaultProperties();
690 void GenerateTexturePlane();
695 double CurrentCursorPosition[3];
697 void GenerateCursor();
698 void UpdateCursor(
int,
int);
699 void ActivateCursor(
int);
700 int UpdateContinuousCursor(
double *q);
701 int UpdateDiscreteCursor(
double *q);
708 void ManageTextDisplay();
709 void ActivateText(
int);
712 double RotateAxis[3];
713 double RadiusVector[3];
720 void GenerateMargins();
721 void UpdateMargins();
722 void ActivateMargins(
int);