13 #ifndef mitkVtkPropRenderer_h
14 #define mitkVtkPropRenderer_h
18 #include <itkCommand.h>
25 class vtkRenderWindow;
28 class vtkWorldPointPicker;
32 class vtkTextProperty;
33 class vtkAssemblyPath;
35 #include <vtkAssemblyPaths.h>
36 #include <vtkSmartPointer.h>
80 void SetPropertyKeys(vtkInformation *info);
82 int Render(RenderType type);
85 virtual void PrepareRender();
88 virtual void MakeCurrent();
93 void InitRenderer(vtkRenderWindow *renderwindow)
override;
98 void InitSize(
int w,
int h)
override;
99 void Resize(
int w,
int h)
override;
118 itkSetEnumMacro(PickingMode, PickingMode);
119 itkGetEnumMacro(PickingMode, PickingMode);
121 void PickWorldPoint(
const Point2D &displayPoint,
Point3D &worldPoint)
const override;
134 DEPRECATED(
int WriteSimpleText(std::string text,
140 float opacity = 1.0));
149 DEPRECATED(vtkTextProperty *GetTextLabelProperty(
int text_id));
159 bool SetWorldGeometryToDataStorageBounds()
override;
165 void InitPathTraversal();
171 vtkAssemblyPath *GetNextPath();
173 int GetNumberOfPaths();
175 const vtkWorldPointPicker *GetWorldPointPicker()
const;
176 const vtkPointPicker *GetPointPicker()
const;
177 const vtkCellPicker *GetCellPicker()
const;
183 virtual void ReleaseGraphicsResources(vtkWindow *renWin);
185 MappersMapType GetMappersMap()
const;
187 static bool useImmediateModeRendering();
190 VtkPropRenderer(
const char *name =
"VtkPropRenderer", vtkRenderWindow *renWin =
nullptr);
192 void Update()
override;
194 static void RenderingCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
196 virtual void UpdatePaths();
200 vtkTimeStamp m_PathTime;
203 void PrepareMapperQueue();
206 void PropagateRenderInfoToMappers();
209 bool Initialize2DvtkCamera();
216 vtkWorldPointPicker *m_WorldPointPicker;
217 vtkPointPicker *m_PointPicker;
218 vtkCellPicker *m_CellPicker;
220 PickingMode m_PickingMode;
225 vtkLightKit *m_LightKit;
228 MappersMapType m_MappersMap;
231 vtkRenderer *m_TextRenderer;
232 typedef std::map<unsigned int, vtkTextActor *> TextMapType;
233 TextMapType m_TextCollection;
241 vtkInformation* m_VtkRenderInfo =
nullptr;