34 #ifndef __vtkAnnotationROIRepresentation2D_h 35 #define __vtkAnnotationROIRepresentation2D_h 41 class vtkSphereSource;
46 class vtkPolyDataAlgorithm;
47 class vtkPointHandleRepresentation2D;
55 class vtkPolyDataMapper2D;
58 class vtkTransformPolyDataFilter;
61 class VTK_SLICER_ANNOTATIONS_MODULE_VTKWIDGETS_EXPORT
73 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
77 vtkGetObjectMacro(IntersectionPlane,vtkPlane);
80 vtkGetObjectMacro(IntersectionPlaneTransform,vtkTransform);
82 virtual void GetActors2D(vtkPropCollection *actors) VTK_OVERRIDE;
84 void GetIntersectionActors(vtkPropCollection *actors);
87 virtual
void StartWidgetInteraction(
double e[2]) VTK_OVERRIDE;
88 virtual
void WidgetInteraction(
double e[2]) VTK_OVERRIDE;
89 virtual
void SetInteractionState(
int state) VTK_OVERRIDE;
93 virtual
void ReleaseGraphicsResources(vtkWindow*) VTK_OVERRIDE;
94 virtual
int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
95 virtual
int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
96 virtual
int RenderOverlay(vtkViewport *viewport) VTK_OVERRIDE;
98 virtual
int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
100 virtual
void SizeHandles() VTK_OVERRIDE;
102 vtkGetMacro(SliceIntersectionVisibility,
int);
103 vtkSetMacro(SliceIntersectionVisibility,
int);
105 vtkGetMacro(HandlesVisibility,
int);
106 vtkSetMacro(HandlesVisibility,
int);
108 virtual
int HighlightHandle(vtkProp *prop) VTK_OVERRIDE;
109 virtual
void HighlightFace(
int cellId) VTK_OVERRIDE;
114 vtkSetClampMacro(HandleSize,
double, 0.0001, 0.5);
115 vtkGetMacro(HandleSize,
double);
117 void PrintIntersections(ostream& os);
125 virtual
void ComputeIntersectionLine(vtkPolyData* inputIntersectionFace, vtkPlane* inputPlane, vtkPolyData* outputIntersectionFacesIntersection);
128 vtkActor2D **Handle2D;
129 vtkPolyDataMapper2D **HandleMapper2D;
130 vtkTransformPolyDataFilter **HandleToPlaneTransformFilters;
133 vtkPlane *IntersectionPlane;
134 vtkTransform *IntersectionPlaneTransform;
135 vtkPolyData *IntersectionLines[6];
136 vtkPolyData *IntersectionFaces[6];
137 vtkTransformPolyDataFilter *IntersectionPlaneTransformFilters[6];
138 vtkActor2D *IntersectionActors[6];
139 vtkPolyDataMapper2D *IntersectionMappers[6];
141 vtkProperty2D *HandleProperties2D[NUMBER_HANDLES];
142 vtkProperty2D *SelectedHandleProperty2D;
143 vtkProperty2D *SelectedFaceProperty2D;
144 vtkProperty2D *DefaultFaceProperty2D;
146 vtkPropPicker *HandlePicker2D;
147 vtkPropPicker *LastPicker2D;
148 vtkActor2D *CurrentHandle2D;
150 double LastEventPosition2D[4];
152 void CreateFaceIntersections();
154 double ComputeHandleRadiusInWorldCoordinates(
double radInPixels);
156 virtual
void CreateDefaultProperties() VTK_OVERRIDE;
157 virtual
void PositionHandles() VTK_OVERRIDE;
159 int SliceIntersectionVisibility;
162 int HandlesVisibility;
virtual int ComputeInteractionState(int X, int Y, int modify=0) VTK_OVERRIDE
static vtkAnnotationROIRepresentation * New()
Instantiate the class.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE