Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit

Vtk-based mapper for Surfaces. More...

#include <mitkSurfaceVtkMapper3D.h>

Inheritance diagram for mitk::SurfaceVtkMapper3D:
Collaboration diagram for mitk::SurfaceVtkMapper3D:

Classes

class  LocalStorage
 Per-renderer storage holding VTK objects for 3D surface rendering. More...
 

Public Member Functions

 mitkClassMacro (SurfaceVtkMapper3D, VtkMapper)
 
Pointer Clone () const
 
virtual void SetGenerateNormals (bool _arg)
 Enable or disable automatic surface normal generation. More...
 
virtual bool GetGenerateNormals ()
 Get whether automatic surface normal generation is enabled. More...
 
virtual const mitk::Surface * GetInput ()
 Get the input Surface from the associated DataNode. More...
 
vtkProp * GetVtkProp (mitk::BaseRenderer *renderer) override
 Get the VTK prop (actor) for the given renderer. More...
 
virtual void ApplyAllProperties (mitk::BaseRenderer *renderer, vtkActor *actor)
 Apply all material, color, opacity, and scalar visibility properties to the given actor. More...
 
- Public Member Functions inherited from mitk::VtkMapper
 mitkClassMacro (VtkMapper, Mapper)
 
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...
 

Static Public Member Functions

static Pointer New ()
 
static void SetDefaultProperties (mitk::DataNode *node, mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
 Set default properties for 3D surface rendering on the given DataNode. More...
 
static void ApplyMitkPropertiesToVtkProperty (mitk::DataNode *node, vtkProperty *property, mitk::BaseRenderer *renderer)
 Apply MITK material properties from a DataNode to a vtkProperty. More...
 
static void SetDefaultPropertiesForVtkProperty (mitk::DataNode *node, mitk::BaseRenderer *renderer, bool overwrite)
 Set default material properties for vtkProperty-based rendering. More...
 
- 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...
 

Public Attributes

mitk::LocalStorageHandler< LocalStorage > m_LSH
 Handler managing per-renderer LocalStorage instances. More...
 

Protected Member Functions

 SurfaceVtkMapper3D ()
 
 ~SurfaceVtkMapper3D () override
 
void GenerateDataForRenderer (mitk::BaseRenderer *renderer) override
 Generate the data needed for rendering into renderer. More...
 
void ResetMapper (mitk::BaseRenderer *renderer) override
 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...
 
virtual void CheckForClippingProperty (mitk::BaseRenderer *renderer, mitk::BaseProperty *property)
 
- Protected Member Functions inherited from mitk::VtkMapper
 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 CalculateTimeStep (BaseRenderer *renderer)
 Updates the time step, which is sometimes needed in subclasses. More...
 

Protected Attributes

bool m_GenerateNormals
 
- Protected Attributes inherited from mitk::Mapper
mitk::DataNode * m_DataNode
 

Detailed Description

Vtk-based mapper for Surfaces.

The mapper renders a surface in 3D. The actor is adapted according to the geometry in the base class in mitk::VtkMapper::UpdateVtkTransform().

Properties that can be set for surfaces and influence the surfaceVTKMapper3D are:

  • "Backface Culling": True enables backface culling, which means only front-facing polygons will be visualized. False/disabled by default.
  • "color": (ColorProperty) Diffuse color of the surface object (this property will be read when material.diffuseColor is not defined)
  • "Opacity": (FloatProperty) Opacity of the surface object
  • "material.ambientColor": (ColorProperty) Ambient color of the surface object
  • "material.ambientCoefficient": ( FloatProperty) Ambient coefficient of the surface object
  • "material.diffuseColor": ( ColorProperty) Diffuse color of the surface object
  • "material.diffuseCoefficient": (FloatProperty) Diffuse coefficient of the surface object
  • "material.specularColor": (ColorProperty) Specular Color of the surface object
  • "material.specularCoefficient": (FloatProperty) Specular coefficient of the surface object
  • "material.specularPower": (FloatProperty) Specular power of the surface object
  • "material.interpolation": (VtkInterpolationProperty) Interpolation
  • "material.representation": (VtkRepresentationProperty*) Representation
  • "material.wireframeLineWidth": (FloatProperty) Width in pixels of the lines drawn.
  • "material.pointSize": (FloatProperty) Size in pixels of the points drawn.
  • "scalar visibility": (BoolProperty) If the scarlars of the surface are visible
  • "Surface.TransferFunction (TransferFunctionProperty) Set a transferfunction for coloring the surface - \b "LookupTable (LookupTableProperty) LookupTable

Properties to look for are:

  • "scalar visibility": if set to on, scalars assigned to the data are shown Turn this on if using a lookup table.
  • "ScalarsRangeMinimum": Optional. Can be used to store the scalar min, e.g. for the level window settings.
  • "ScalarsRangeMaximum": Optional. See above.

There might be still some other, deprecated properties. These will not be documented anymore. Please check the source if you really need them.

Definition at line 74 of file mitkSurfaceVtkMapper3D.h.

Constructor & Destructor Documentation

◆ SurfaceVtkMapper3D()

mitk::SurfaceVtkMapper3D::SurfaceVtkMapper3D ( )
protected

◆ ~SurfaceVtkMapper3D()

mitk::SurfaceVtkMapper3D::~SurfaceVtkMapper3D ( )
overrideprotected

Member Function Documentation

◆ ApplyAllProperties()

virtual void mitk::SurfaceVtkMapper3D::ApplyAllProperties ( mitk::BaseRenderer *  renderer,
vtkActor *  actor 
)
virtual

Apply all material, color, opacity, and scalar visibility properties to the given actor.

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

◆ ApplyMitkPropertiesToVtkProperty()

static void mitk::SurfaceVtkMapper3D::ApplyMitkPropertiesToVtkProperty ( mitk::DataNode *  node,
vtkProperty *  property,
mitk::BaseRenderer *  renderer 
)
static

Apply MITK material properties from a DataNode to a vtkProperty.

Reads color, ambient, diffuse, specular, interpolation, representation, and other properties from the DataNode and applies them to the given vtkProperty.

Parameters
[in]nodeThe DataNode providing the properties.
[in]propertyThe vtkProperty to configure.
[in]rendererThe renderer context for renderer-specific properties.

◆ CheckForClippingProperty()

virtual void mitk::SurfaceVtkMapper3D::CheckForClippingProperty ( mitk::BaseRenderer *  renderer,
mitk::BaseProperty *  property 
)
protectedvirtual

Checks whether the specified property is a ClippingProperty and if yes, adds it to m_ClippingPlaneCollection (internal method).

◆ Clone()

Pointer mitk::SurfaceVtkMapper3D::Clone ( ) const

◆ GenerateDataForRenderer()

void mitk::SurfaceVtkMapper3D::GenerateDataForRenderer ( mitk::BaseRenderer *  )
overrideprotectedvirtual

Generate the data needed for rendering into renderer.

Reimplemented from mitk::Mapper.

◆ GetGenerateNormals()

virtual bool mitk::SurfaceVtkMapper3D::GetGenerateNormals ( )
virtual

Get whether automatic surface normal generation is enabled.

Returns
True if normal generation is enabled.

◆ GetInput()

virtual const mitk::Surface* mitk::SurfaceVtkMapper3D::GetInput ( )
virtual

Get the input Surface from the associated DataNode.

Returns
Const pointer to the input mitk::Surface.

◆ GetVtkProp()

vtkProp* mitk::SurfaceVtkMapper3D::GetVtkProp ( mitk::BaseRenderer *  renderer)
overridevirtual

Get the VTK prop (actor) for the given renderer.

Parameters
[in]rendererThe renderer for which the prop is requested.
Returns
Pointer to the vtkProp (vtkActor) used for 3D rendering.

Implements mitk::VtkMapper.

◆ mitkClassMacro()

mitk::SurfaceVtkMapper3D::mitkClassMacro ( SurfaceVtkMapper3D  ,
VtkMapper   
)

◆ New()

static Pointer mitk::SurfaceVtkMapper3D::New ( )
static

◆ ResetMapper()

void mitk::SurfaceVtkMapper3D::ResetMapper ( mitk::BaseRenderer *  )
overrideprotectedvirtual

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)

To be implemented in sub-classes.

Reimplemented from mitk::Mapper.

◆ SetDefaultProperties()

static void mitk::SurfaceVtkMapper3D::SetDefaultProperties ( mitk::DataNode *  node,
mitk::BaseRenderer *  renderer = nullptr,
bool  overwrite = false 
)
static

Set default properties for 3D surface rendering on the given DataNode.

Initializes material properties (ambient, diffuse, specular), color, opacity, scalar visibility, and related rendering options.

Parameters
[in]nodeThe DataNode on which to set the properties.
[in]rendererThe renderer context (nullptr for default property list).
[in]overwriteIf true, overwrite existing properties.

◆ SetDefaultPropertiesForVtkProperty()

static void mitk::SurfaceVtkMapper3D::SetDefaultPropertiesForVtkProperty ( mitk::DataNode *  node,
mitk::BaseRenderer *  renderer,
bool  overwrite 
)
static

Set default material properties for vtkProperty-based rendering.

Parameters
[in]nodeThe DataNode on which to set the properties.
[in]rendererThe renderer context.
[in]overwriteIf true, overwrite existing properties.

◆ SetGenerateNormals()

virtual void mitk::SurfaceVtkMapper3D::SetGenerateNormals ( bool  _arg)
virtual

Enable or disable automatic surface normal generation.

Parameters
[in]_argTrue to generate normals, false otherwise.

Member Data Documentation

◆ m_GenerateNormals

bool mitk::SurfaceVtkMapper3D::m_GenerateNormals
protected

Definition at line 138 of file mitkSurfaceVtkMapper3D.h.

◆ m_LSH

mitk::LocalStorageHandler<LocalStorage> mitk::SurfaceVtkMapper3D::m_LSH

Handler managing per-renderer LocalStorage instances.

Definition at line 176 of file mitkSurfaceVtkMapper3D.h.


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