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>
134 DEPRECATED(
int WriteSimpleText(std::string text,
140 float opacity = 1.0));
190 VtkPropRenderer(
const char *name =
"VtkPropRenderer", vtkRenderWindow *renWin =
nullptr);
194 static void RenderingCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
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;
225 vtkLightKit *m_LightKit;
231 vtkRenderer *m_TextRenderer;
232 typedef std::map<unsigned int, vtkTextActor *> TextMapType;
233 TextMapType m_TextCollection;
241 vtkInformation* m_VtkRenderInfo =
nullptr;
Class for nodes of the DataTree.
Data management class that handles 'was created by' relations.
itkGetEnumMacro(PickingMode, PickingMode)
vtkTextProperty * GetTextLabelProperty(int text_id)
CGetTextLabelProperty an be used in order to get a vtkTextProperty for a specific text_id....
itkSetEnumMacro(PickingMode, PickingMode)
Set the picking mode. This method is used to set the picking mode for 3D object picking....
static void RenderingCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
const vtkCellPicker * GetCellPicker() const
virtual void Update(mitk::DataNode *datatreenode)
MappersMapType GetMappersMap() const
~VtkPropRenderer() override
void SetPropertyKeys(vtkInformation *info)
Store/propagate vtkInformation during rendering.
mitk::DataNode * PickObject(const Point2D &displayPosition, Point3D &worldPosition) const override
Determines the object (mitk::DataNode) closest to the current position by means of picking.
void InitRenderer(vtkRenderWindow *renderwindow) override
Initialize the base renderer with a vtk render window. Set the new renderer for the camera controller...
virtual void MakeCurrent()
VtkPropRenderer(const char *name="VtkPropRenderer", vtkRenderWindow *renWin=nullptr)
int Render(RenderType type)
static bool useImmediateModeRendering()
void PickWorldPoint(const Point2D &displayPoint, Point3D &worldPoint) const override
Pick a world coordinate (x,y,z) given a display coordinate (x,y).
mitkNewMacro2Param(VtkPropRenderer, const char *, vtkRenderWindow *)
void SetMapperID(const MapperSlotId mapperId) override
Set the used mapperID.
void InitPathTraversal()
Used by vtkPointPicker/vtkPicker. This will query a list of all objects in MITK and provide every vtk...
const vtkPointPicker * GetPointPicker() const
mitkClassMacro(VtkPropRenderer, BaseRenderer)
void SetDataStorage(mitk::DataStorage *storage) override
set the datastorage that will be used for rendering
virtual void PrepareRender()
This methods contains all method neceassary before a VTK Render() call.
virtual void ReleaseGraphicsResources(vtkWindow *renWin)
Release vtk-based graphics resources. Called by vtkMitkRenderProp::ReleaseGraphicsResources.
std::map< int, Mapper * > MappersMapType
bool SetWorldGeometryToDataStorageBounds() override
const vtkWorldPointPicker * GetWorldPointPicker() const
void InitSize(int w, int h) override
Set the initial size for the render window.
virtual void UpdatePaths()
vtkAssemblyPath * GetNextPath()
Used by vtkPointPicker/vtkPicker. This will query a list of all objects in MITK and provide every vtk...
void Resize(int w, int h) override
Set a new size for the render window.
unsigned int MapperSlotId
Find image slices visible on a given plane.