Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::GizmoMapper2D Class Reference

2D mapper for mitk::Gizmo. More...

#include <mitkGizmoMapper2D.h>

Inheritance diagram for mitk::GizmoMapper2D:
Collaboration diagram for mitk::GizmoMapper2D:

Public Member Functions

 mitkClassMacro (GizmoMapper2D, VtkMapper)
 
Pointer Clone () const
 
vtkProp * GetVtkProp (mitk::BaseRenderer *renderer) override
 Return the vtkProp that represents the rendering result. More...
 
void ResetMapper (mitk::BaseRenderer *renderer) override
 Reset the mapper, setting its result to invisible. More...
 
vtkPolyData * GetVtkPolyData (mitk::BaseRenderer *renderer)
 Return the internal vtkPolyData for the given renderer. 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)
 Provides the given node with a set of default properties. 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...
 

Additional Inherited Members

- 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 inherited from mitk::Mapper
mitk::DataNode * m_DataNode
 

Detailed Description

2D mapper for mitk::Gizmo.

Paints a similar representation as for 3D (see mitk::Gizmo itself). The three axes of the manipulated object are visualized as arrows. They are pickable and will report "move along axis" or "scale" when clicked at the arrow shafts or the arrow tips, respectively.

For usability, the circles for rotation are omitted in 2D because they would most often coincide with the arrows, making distinction difficult.

See also
Gizmo, GizmoInteractor

Definition at line 38 of file mitkGizmoMapper2D.h.

Member Function Documentation

◆ Clone()

Pointer mitk::GizmoMapper2D::Clone ( ) const

◆ GetVtkPolyData()

vtkPolyData* mitk::GizmoMapper2D::GetVtkPolyData ( mitk::BaseRenderer *  renderer)

Return the internal vtkPolyData for the given renderer.

This serves for picking by the associated GizmoInteractor class. The poly data contains scalar values that encode the handle type (e.g., Gizmo::MoveAlongAxisX, Gizmo::ScaleX).

Parameters
rendererThe renderer for which to retrieve the poly data.
Returns
The vtkPolyData used as mapper input for the given renderer.

◆ GetVtkProp()

vtkProp* mitk::GizmoMapper2D::GetVtkProp ( mitk::BaseRenderer *  renderer)
inlineoverridevirtual

Return the vtkProp that represents the rendering result.

Parameters
rendererThe renderer for which to retrieve the vtkProp.
Returns
The vtkActor used for rendering this gizmo in the given renderer.

Implements mitk::VtkMapper.

Definition at line 65 of file mitkGizmoMapper2D.h.

References mitk::LocalStorageHandler< L >::GetLocalStorage().

◆ mitkClassMacro()

mitk::GizmoMapper2D::mitkClassMacro ( GizmoMapper2D  ,
VtkMapper   
)

◆ New()

static Pointer mitk::GizmoMapper2D::New ( )
static

◆ ResetMapper()

void mitk::GizmoMapper2D::ResetMapper ( mitk::BaseRenderer *  renderer)
overridevirtual

Reset the mapper, setting its result to invisible.

Parameters
rendererThe renderer whose local storage should be reset.

Reimplemented from mitk::Mapper.

◆ SetDefaultProperties()

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

Provides the given node with a set of default properties.

Configures color, scalar visibility, lookup table for axis coloring, and visibility properties for the gizmo rendering.

Parameters
nodeThe DataNode to decorate with default properties.
rendererWhen not nullptr, generate renderer-specific properties.
overwriteWhether already existing properties shall be overwritten.

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