112 #ifndef __vtkImagePlaneWidget_h
113 #define __vtkImagePlaneWidget_h
134 #define VTK_NEAREST_RESLICE 0
135 #define VTK_LINEAR_RESLICE 1
136 #define VTK_CUBIC_RESLICE 2
153 void PlaceWidget(
double xmin,
double xmax,
double ymin,
double ymax,
154 double zmin,
double zmax)
163 void SetOrigin(
double x,
double y,
double z);
164 void SetOrigin(
double xyz[3]);
166 void GetOrigin(
double xyz[3]);
172 void SetPoint1(
double x,
double y,
double z);
173 void SetPoint1(
double xyz[3]);
175 void GetPoint1(
double xyz[3]);
181 void SetPoint2(
double x,
double y,
double z);
182 void SetPoint2(
double xyz[3]);
184 void GetPoint2(
double xyz[3]);
190 void GetCenter(
double xyz[3]);
196 void GetNormal(
double xyz[3]);
200 void GetVector1(
double v1[3]);
203 void GetVector2(
double v2[3]);
209 void SetSliceIndex(
int index);
212 double GetSlicePosition();
215 void SetSlicePosition(
double position);
219 void SetResliceInterpolate(
int);
220 vtkGetMacro(ResliceInterpolate,
int);
221 void SetResliceInterpolateToNearestNeighbour()
223 void SetResliceInterpolateToLinear()
225 void SetResliceInterpolateToCubic()
234 vtkSetMacro(RestrictPlaneToVolume,
int);
235 vtkGetMacro(RestrictPlaneToVolume,
int);
236 vtkBooleanMacro(RestrictPlaneToVolume,
int);
242 vtkSetMacro(UserControlledLookupTable,
int);
243 vtkGetMacro(UserControlledLookupTable,
int);
244 vtkBooleanMacro(UserControlledLookupTable,
int);
252 vtkSetMacro(TextureInterpolate,
int);
253 vtkGetMacro(TextureInterpolate,
int);
254 vtkBooleanMacro(TextureInterpolate,
int);
260 virtual void SetTextureVisibility(
int);
261 vtkGetMacro(TextureVisibility,
int);
262 vtkBooleanMacro(TextureVisibility,
int);
303 virtual void SetSelectedPlaneProperty(
vtkProperty*);
304 vtkGetObjectMacro(SelectedPlaneProperty,
vtkProperty);
310 void SetPlaneOrientation(
int);
311 vtkGetMacro(PlaneOrientation,
int);
312 void SetPlaneOrientationToXAxes()
313 { this->SetPlaneOrientation(0); }
314 void SetPlaneOrientationToYAxes()
315 { this->SetPlaneOrientation(1); }
316 void SetPlaneOrientationToZAxes()
317 { this->SetPlaneOrientation(2); }
339 vtkSetMacro(DisplayText,
int);
340 vtkGetMacro(DisplayText,
int);
341 vtkBooleanMacro(DisplayText,
int);
359 vtkSetClampMacro(MarginSizeX,
double, 0.0, 0.5);
360 vtkGetMacro(MarginSizeX,
double);
361 vtkSetClampMacro(MarginSizeY,
double, 0.0, 0.5);
362 vtkGetMacro(MarginSizeY,
double);
374 virtual void SetTexturePlaneProperty(
vtkProperty*);
375 vtkGetObjectMacro(TexturePlaneProperty,
vtkProperty);
383 void SetWindowLevel(
double window,
double level,
int copy = 0);
384 void GetWindowLevel(
double wl[2]);
391 int GetCursorData(
double xyzv[4]);
396 int GetCursorDataStatus();
401 vtkGetVectorMacro(CurrentCursorPosition,
double,3);
408 vtkGetMacro(CurrentImageValue,
double);
424 vtkSetMacro(UseContinuousCursor,
int);
425 vtkGetMacro(UseContinuousCursor,
int);
426 vtkBooleanMacro(UseContinuousCursor,
int);
431 void SetInteraction(
int interact);
432 vtkGetMacro(Interaction,
int);
433 vtkBooleanMacro(Interaction,
int);
441 VTK_CURSOR_ACTION = 0,
442 VTK_SLICE_MOTION_ACTION = 1,
443 VTK_WINDOW_LEVEL_ACTION = 2
446 vtkSetClampMacro(LeftButtonAction,
int, VTK_CURSOR_ACTION, VTK_WINDOW_LEVEL_ACTION);
447 vtkGetMacro(LeftButtonAction,
int);
448 vtkSetClampMacro(MiddleButtonAction,
int, VTK_CURSOR_ACTION, VTK_WINDOW_LEVEL_ACTION);
449 vtkGetMacro(MiddleButtonAction,
int);
450 vtkSetClampMacro(RightButtonAction,
int, VTK_CURSOR_ACTION, VTK_WINDOW_LEVEL_ACTION);
451 vtkGetMacro(RightButtonAction,
int);
465 VTK_SHIFT_MODIFIER = 1,
466 VTK_CONTROL_MODIFIER = 2
469 vtkSetClampMacro(LeftButtonAutoModifier,
int, VTK_NO_MODIFIER, VTK_CONTROL_MODIFIER);
470 vtkGetMacro(LeftButtonAutoModifier,
int);
471 vtkSetClampMacro(MiddleButtonAutoModifier,
int, VTK_NO_MODIFIER, VTK_CONTROL_MODIFIER);
472 vtkGetMacro(MiddleButtonAutoModifier,
int);
473 vtkSetClampMacro(RightButtonAutoModifier,
int, VTK_NO_MODIFIER, VTK_CONTROL_MODIFIER);
474 vtkGetMacro(RightButtonAutoModifier,
int);
496 VTK_MIDDLE_BUTTON = 2,
530 virtual void OnMouseMove();
531 virtual void OnLeftButtonDown();
532 virtual void OnLeftButtonUp();
533 virtual void OnMiddleButtonDown();
534 virtual void OnMiddleButtonUp();
535 virtual void OnRightButtonDown();
536 virtual void OnRightButtonUp();
539 virtual void StartCursor();
540 virtual void StopCursor();
541 virtual void StartSliceMotion();
542 virtual void StopSliceMotion();
543 virtual void StartWindowLevel();
544 virtual void StopWindowLevel();
567 void HighlightPlane(
int highlight);
568 void GeneratePlaneOutline();
571 void BuildRepresentation();
580 void WindowLevel(
int X,
int Y);
581 void Push(
double *p1,
double *p2);
582 void Spin(
double *p1,
double *p2);
583 void Rotate(
double *p1,
double *p2,
double *vpn);
584 void Scale(
double *p1,
double *p2,
int X,
int Y);
585 void Translate(
double *p1,
double *p2);
606 void CreateDefaultProperties();
610 void GenerateTexturePlane();
615 double CurrentCursorPosition[3];
617 void GenerateCursor();
618 void UpdateCursor(
int,
int);
619 void ActivateCursor(
int);
620 int UpdateContinuousCursor(
double *q);
621 int UpdateDiscreteCursor(
double *q);
628 void ManageTextDisplay();
629 void ActivateText(
int);
632 double RotateAxis[3];
633 double RadiusVector[3];
640 void GenerateMargins();
641 void UpdateMargins();
642 void ActivateMargins(
int);