32 #ifndef __vtkImageCroppingRegionsWidget_h
33 #define __vtkImageCroppingRegionsWidget_h
35 #include "vtkInteractionWidgetsModule.h"
41 class vtkVolumeMapper;
52 void PrintSelf(ostream& os, vtkIndent indent);
62 virtual void SetEnabled(
int enabling);
66 vtkGetVector6Macro(PlanePositions,
double);
68 {this->SetPlanePositions(pos[0], pos[1], pos[2], pos[3], pos[4], pos[5]);}
70 {this->SetPlanePositions(pos[0], pos[1], pos[2], pos[3], pos[4], pos[5]);}
71 virtual void SetPlanePositions(
double xMin,
double xMax,
72 double yMin,
double yMax,
73 double zMin,
double zMax);
78 virtual void SetCroppingRegionFlags(
int flags);
79 vtkGetMacro(CroppingRegionFlags,
int);
86 SLICE_ORIENTATION_YZ = 0,
87 SLICE_ORIENTATION_XZ = 1,
88 SLICE_ORIENTATION_XY = 2
91 vtkGetMacro(SliceOrientation,
int);
92 virtual void SetSliceOrientation(
int orientation);
103 virtual void SetSlice(
int num);
104 vtkGetMacro(Slice,
int);
109 virtual void SetLine1Color(
double r,
double g,
double b);
111 { this->SetLine1Color(rgb[0], rgb[1], rgb[2]); }
112 virtual double *GetLine1Color();
113 virtual void GetLine1Color(
double rgb[3]);
118 virtual void SetLine2Color(
double r,
double g,
double b);
120 { this->SetLine2Color(rgb[0], rgb[1], rgb[2]); }
121 virtual double *GetLine2Color();
122 virtual void GetLine2Color(
double rgb[3]);
127 virtual void SetLine3Color(
double r,
double g,
double b);
129 { this->SetLine3Color(rgb[0], rgb[1], rgb[2]); }
130 virtual double *GetLine3Color();
131 virtual void GetLine3Color(
double rgb[3]);
136 virtual void SetLine4Color(
double r,
double g,
double b);
138 { this->SetLine4Color(rgb[0], rgb[1], rgb[2]); }
139 virtual double *GetLine4Color();
140 virtual void GetLine4Color(
double rgb[3]);
146 virtual void SetVolumeMapper(vtkVolumeMapper *mapper);
147 vtkGetObjectMacro(VolumeMapper, vtkVolumeMapper);
148 virtual void UpdateAccordingToInput();
153 void MoveHorizontalLine();
154 void MoveVerticalLine();
155 void MoveIntersectingLines();
156 void UpdateCursorIcon();
157 void OnButtonPress();
158 void OnButtonRelease();
167 CroppingPlanesPositionChangedEvent = 10050
180 vtkActor2D *LineActors[4];
182 vtkActor2D* RegionActors[9];
184 double PlanePositions[6];
189 double GetSlicePosition();
198 static void ProcessEvents(vtkObject*
object,
203 void SetMouseCursor(
int state);
220 int ComputeWorldCoordinate(
int x,
int y,
double* coord);
222 void UpdateOpacity();
223 void UpdateGeometry();
224 void ConstrainPlanePositions(
double positions[6]);
concrete dataset represents vertices, lines, polygons, and triangle strips
create a line defined by two end points