13 #ifndef mitkVtkPropRenderer_h
14 #define mitkVtkPropRenderer_h
18 #include <itkCommand.h>
25 class vtkRenderWindow;
28 class vtkWorldPointPicker;
31 class vtkAssemblyPath;
33 #include <vtkAssemblyPaths.h>
34 #include <vtkSmartPointer.h>
239 VtkPropRenderer(
const char *name =
"VtkPropRenderer", vtkRenderWindow *renWin =
nullptr);
243 static void RenderingCallback(vtkObject *caller,
unsigned long eid,
void *clientdata,
void *calldata);
249 vtkTimeStamp m_PathTime;
252 void PrepareMapperQueue();
255 void PropagateRenderInfoToMappers();
258 bool Initialize2DvtkCamera();
265 vtkWorldPointPicker *m_WorldPointPicker;
266 vtkPointPicker *m_PointPicker;
267 vtkCellPicker *m_CellPicker;
274 vtkLightKit *m_LightKit;
285 vtkInformation* m_VtkRenderInfo =
nullptr;
Organizes the rendering process.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Organizes the MITK rendering process within the VTK rendering pipeline.
itkGetEnumMacro(PickingMode, PickingMode)
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)
int GetNumberOfPaths()
Return the number of assembly paths in the current traversal.
const vtkCellPicker * GetCellPicker() const
Return the cell picker.
virtual void Update(mitk::DataNode *datatreenode)
Update a specific data node in the rendering pipeline.
MappersMapType GetMappersMap() const
Return the current map of mappers sorted by layer.
~VtkPropRenderer() override
void SetPropertyKeys(vtkInformation *info)
Store and propagate vtkInformation during rendering.
mitk::DataNode * PickObject(const Point2D &displayPosition, Point3D &worldPosition) const override
Pick the data node at the given display position.
void InitRenderer(vtkRenderWindow *renderwindow) override
Initialize the renderer with the given VTK render window.
virtual void MakeCurrent()
Make the current render window the active OpenGL context.
RenderType
Enumeration of render pass types.
VtkPropRenderer(const char *name="VtkPropRenderer", vtkRenderWindow *renWin=nullptr)
int Render(RenderType type)
Render the scene for the given render type.
static bool useImmediateModeRendering()
Return whether immediate mode rendering is used.
void PickWorldPoint(const Point2D &displayPoint, Point3D &worldPoint) const override
Pick a world point from a display position using the current picking mode.
mitkNewMacro2Param(VtkPropRenderer, const char *, vtkRenderWindow *)
void SetMapperID(const MapperSlotId mapperId) override
Set the mapper slot ID to select 2D or 3D mappers.
void InitPathTraversal()
Used by vtkPointPicker/vtkPicker. This will query a list of all objects in MITK and provide every vtk...
const vtkPointPicker * GetPointPicker() const
Return the point picker.
mitkClassMacro(VtkPropRenderer, BaseRenderer)
void SetDataStorage(mitk::DataStorage *storage) override
Set the data storage that will be used for rendering.
virtual void PrepareRender()
Perform all preparations necessary before a VTK Render() call.
virtual void ReleaseGraphicsResources(vtkWindow *renWin)
Release VTK-based graphics resources.
std::map< int, Mapper * > MappersMapType
bool SetWorldGeometryToDataStorageBounds() override
const vtkWorldPointPicker * GetWorldPointPicker() const
Return the world point picker.
void InitSize(int w, int h) override
Initialize the renderer size.
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
Resize the renderer.
unsigned int MapperSlotId
Find image slices visible on a given plane.