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;
111 vtkSetMacro(HandleSizeInPixels,
int);
112 vtkGetMacro(HandleSizeInPixels,
int);
115 void PrintIntersections(ostream& os);
119 ~vtkAnnotationROIRepresentation2D();
123 virtual
void ComputeIntersectionLine(vtkPolyData* inputIntersectionFace, vtkPlane* inputPlane, vtkPolyData* outputIntersectionFacesIntersection);
126 vtkActor2D **Handle2D;
127 vtkPolyDataMapper2D **HandleMapper2D;
128 vtkTransformPolyDataFilter **HandleToPlaneTransformFilters;
131 vtkPlane *IntersectionPlane;
132 vtkTransform *IntersectionPlaneTransform;
133 vtkPolyData *IntersectionLines[6];
134 vtkPolyData *IntersectionFaces[6];
135 vtkTransformPolyDataFilter *IntersectionPlaneTransformFilters[6];
136 vtkActor2D *IntersectionActors[6];
137 vtkPolyDataMapper2D *IntersectionMappers[6];
139 vtkProperty2D *HandleProperties2D[NUMBER_HANDLES];
140 vtkProperty2D *SelectedHandleProperty2D;
141 vtkProperty2D *SelectedFaceProperty2D;
142 vtkProperty2D *DefaultFaceProperty2D;
144 vtkPropPicker *HandlePicker2D;
145 vtkPropPicker *LastPicker2D;
146 vtkActor2D *CurrentHandle2D;
148 double LastEventPosition2D[4];
150 void CreateFaceIntersections();
152 double ComputeHandleRadiusInWorldCoordinates(
double radInPixels);
154 virtual
void CreateDefaultProperties() VTK_OVERRIDE;
155 virtual
void PositionHandles() VTK_OVERRIDE;
157 int SliceIntersectionVisibility;
159 double HandleSizeInPixels;
160 int HandlesVisibility;
163 vtkAnnotationROIRepresentation2D(const vtkAnnotationROIRepresentation2D&);
164 void operator=(const vtkAnnotationROIRepresentation2D&);
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