Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit

Base class of all VTK-based Mappers for displaying primitives using VTK functionality. More...

#include <mitkVtkMapper.h>

Inheritance diagram for mitk::VtkMapper:
Collaboration diagram for mitk::VtkMapper:

Classes

class  LocalStorage
 Empty LocalStorage subclass for VtkMapper. More...
 

Public Member Functions

 mitkClassMacro (VtkMapper, Mapper)
 
virtual vtkProp * GetVtkProp (mitk::BaseRenderer *renderer)=0
 Return the VTK prop (actor, assembly, etc.) for the given renderer. More...
 
void MitkRender (mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override
 Determine the render pass type and call the appropriate render method. More...
 
virtual void MitkRenderOverlay (BaseRenderer *renderer)
 Check visibility and render the overlay pass. More...
 
virtual void MitkRenderOpaqueGeometry (BaseRenderer *renderer)
 Check visibility and render opaque (untransparent) geometry. More...
 
virtual void MitkRenderTranslucentGeometry (BaseRenderer *renderer)
 Check visibility and render translucent (transparent) geometry. More...
 
virtual void MitkRenderVolumetricGeometry (BaseRenderer *renderer)
 Check visibility and render volumetric geometry. More...
 
virtual bool HasVtkProp (const vtkProp *prop, BaseRenderer *renderer)
 Check whether this mapper owns the specified vtkProp for the given renderer. More...
 
virtual void UpdateVtkTransform (mitk::BaseRenderer *renderer)
 Set the vtkTransform of the m_Prop3D for the current time step of renderer. More...
 
void ApplyColorAndOpacityProperties (mitk::BaseRenderer *renderer, vtkActor *actor) override
 Apply color and opacity properties read from the PropertyList to the given vtkActor. More...
 
virtual void ReleaseGraphicsResources (mitk::BaseRenderer *)
 Release VTK-based graphics resources consumed by this mapper. More...
 
- Public Member Functions inherited from mitk::Mapper
 mitkClassMacroItkParent (Mapper, itk::Object)
 
virtual void SetDataNode (DataNode *_arg)
 Set the DataNode containing the data to map. More...
 
virtual DataNode * GetDataNode () const
 Get the DataNode containing the data to map. More...
 
virtual void Update (BaseRenderer *renderer)
 Calculate the time step for the current renderer and generate rendering data. More...
 
TimeStepType GetTimestep () const
 Return the current time step as calculated from the renderer. More...
 
virtual bool IsLODEnabled (BaseRenderer *) const
 Return whether this Mapper currently allows for Level-of-Detail rendering. More...
 

Protected Member Functions

 VtkMapper ()
 
 ~VtkMapper () override
 
- Protected Member Functions inherited from mitk::Mapper
 Mapper ()
 explicit constructor which disallows implicit conversions More...
 
 ~Mapper () override
 virtual destructor in order to derive from this class More...
 
virtual void GenerateDataForRenderer (BaseRenderer *)
 Generate the data needed for rendering into renderer. More...
 
virtual void CalculateTimeStep (BaseRenderer *renderer)
 Updates the time step, which is sometimes needed in subclasses. More...
 
virtual void ResetMapper (BaseRenderer *)
 Reset the mapper (i.e., make sure that nothing is displayed) if no valid data is present. In most cases the reimplemented function disables the according actors (toggling visibility off) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mitk::Mapper
static void SetDefaultProperties (DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
 Set default values of properties used by this mapper on the given node. More...
 
- Protected Attributes inherited from mitk::Mapper
mitk::DataNode * m_DataNode
 

Detailed Description

Base class of all VTK-based Mappers for displaying primitives using VTK functionality.

Rendering of opaque, translucent or volumetric geometry and overlays is done in consecutive render passes. Subclasses must implement GetVtkProp() to provide the VTK prop (actor, assembly, etc.) for each BaseRenderer.

See also
Mapper
ImageVtkMapper2D
SurfaceVtkMapper2D
SurfaceVtkMapper3D

Definition at line 52 of file mitkVtkMapper.h.

Constructor & Destructor Documentation

◆ VtkMapper()

mitk::VtkMapper::VtkMapper ( )
protected

constructor

◆ ~VtkMapper()

mitk::VtkMapper::~VtkMapper ( )
overrideprotected

virtual destructor in order to derive from this class

Member Function Documentation

◆ ApplyColorAndOpacityProperties()

void mitk::VtkMapper::ApplyColorAndOpacityProperties ( mitk::BaseRenderer *  renderer,
vtkActor *  actor 
)
overridevirtual

Apply color and opacity properties read from the PropertyList to the given vtkActor.

Reads the "color" and "opacity" properties from the DataNode and applies them to the actor's vtkProperty.

Parameters
[in]rendererThe renderer whose property list is queried.
[in]actorThe vtkActor to apply color and opacity to.

Implements mitk::Mapper.

Reimplemented in mitk::EnhancedPointSetVtkMapper3D, mitk::ROIMapper3D, mitk::ROIMapper2D, and mitk::PlanarFigureVtkMapper3D.

◆ GetVtkProp()

◆ HasVtkProp()

virtual bool mitk::VtkMapper::HasVtkProp ( const vtkProp *  prop,
BaseRenderer *  renderer 
)
virtual

Check whether this mapper owns the specified vtkProp for the given renderer.

Default implementation compares the given prop pointer with the result of GetVtkProp().

Parameters
[in]propThe vtkProp to check ownership of.
[in]rendererThe renderer context.
Returns
true if this mapper owns the given prop, false otherwise.

◆ mitkClassMacro()

mitk::VtkMapper::mitkClassMacro ( VtkMapper  ,
Mapper   
)

◆ MitkRender()

void mitk::VtkMapper::MitkRender ( mitk::BaseRenderer *  renderer,
mitk::VtkPropRenderer::RenderType  type 
)
overridevirtual

Determine the render pass type and call the appropriate render method.

Dispatches to MitkRenderOpaqueGeometry(), MitkRenderTranslucentGeometry(), MitkRenderOverlay(), or MitkRenderVolumetricGeometry() based on the type. Called by mitk::VtkPropRenderer::Render.

Parameters
[in]rendererThe renderer to render into.
[in]typeThe render pass type (Opaque, Translucent, Overlay, Volumetric).

Implements mitk::Mapper.

◆ MitkRenderOpaqueGeometry()

virtual void mitk::VtkMapper::MitkRenderOpaqueGeometry ( BaseRenderer *  renderer)
virtual

Check visibility and render opaque (untransparent) geometry.

Parameters
[in]rendererThe renderer to render into.

◆ MitkRenderOverlay()

virtual void mitk::VtkMapper::MitkRenderOverlay ( BaseRenderer *  renderer)
virtual

Check visibility and render the overlay pass.

Parameters
[in]rendererThe renderer to render into.

◆ MitkRenderTranslucentGeometry()

virtual void mitk::VtkMapper::MitkRenderTranslucentGeometry ( BaseRenderer *  renderer)
virtual

Check visibility and render translucent (transparent) geometry.

Parameters
[in]rendererThe renderer to render into.

◆ MitkRenderVolumetricGeometry()

virtual void mitk::VtkMapper::MitkRenderVolumetricGeometry ( BaseRenderer *  renderer)
virtual

Check visibility and render volumetric geometry.

Parameters
[in]rendererThe renderer to render into.

◆ ReleaseGraphicsResources()

virtual void mitk::VtkMapper::ReleaseGraphicsResources ( mitk::BaseRenderer *  )
inlinevirtual

Release VTK-based graphics resources consumed by this mapper.

Called by mitk::VtkPropRenderer. Subclasses should override this to release renderer-specific VTK resources (textures, framebuffers, etc.).

Reimplemented in mitk::PointSetVtkMapper3D.

Definition at line 146 of file mitkVtkMapper.h.

◆ UpdateVtkTransform()

virtual void mitk::VtkMapper::UpdateVtkTransform ( mitk::BaseRenderer *  renderer)
virtual

Set the vtkTransform of the m_Prop3D for the current time step of renderer.

Called by mitk::VtkPropRenderer::Update before rendering. This method will transform all actors (e.g. of an vtkAssembly) according the geometry.

Warning
This method transforms only props which derive from vtkProp3D. Make sure to use vtkAssembly, if you have multiple props. vtkPropAssembly does not work, since it derives from vtkProp.

Reimplemented in mitk::SplineVtkMapper3D, mitk::EnhancedPointSetVtkMapper3D, mitk::PointSetVtkMapper3D, mitk::PlaneGeometryDataVtkMapper3D, mitk::SurfaceVtkMapper2D, and mitk::PlanarFigureVtkMapper3D.


The documentation for this class was generated from the following file: