|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
VTK-based 2D mapper for rendering a crosshair. More...
#include <mitkCrosshairVtkMapper2D.h>


Classes | |
| class | LocalStorage |
| Internal class holding the mapper, actor, etc. for each of the 2D render windows. More... | |
Public Member Functions | |
| mitkClassMacro (CrosshairVtkMapper2D, VtkMapper) | |
| const CrosshairData * | GetInput () const |
| Get the input CrosshairData from the data node. More... | |
| void | Update (mitk::BaseRenderer *renderer) override |
| Check whether this mapper needs to update itself and generate data. More... | |
| vtkProp * | GetVtkProp (BaseRenderer *renderer) override |
| Get the VTK prop assembly 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... | |
| 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 (DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false) |
| Set default properties for the crosshair data node. 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... | |
Protected Member Functions | |
| CrosshairVtkMapper2D () | |
| Constructor. Initializes the default gap size. More... | |
| ~CrosshairVtkMapper2D () override | |
| Destructor. More... | |
| void | GenerateDataForRenderer (BaseRenderer *renderer) override |
| Apply color and opacity properties and create the VTK crosshair geometry. More... | |
| void | CreateVtkCrosshair (BaseRenderer *renderer) |
| Create the VTK crosshair poly data for the given renderer. More... | |
| void | DrawLine (Point3D p0, Point3D p1, vtkCellArray *lines, vtkPoints *points) |
| Draw a line between two 3D points and add it to the given VTK structures. More... | |
| void | ApplyAllProperties (BaseRenderer *renderer) |
| Apply all visual properties (color, opacity, line width) to the crosshair actor. More... | |
| void | ApplyColorAndOpacityProperties2D (BaseRenderer *renderer, vtkActor2D *actor) |
| Apply color and opacity properties to a 2D actor. More... | |
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... | |
| 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... | |
Protected Attributes | |
| LocalStorageHandler< LocalStorage > | m_LSH |
| The LocalStorageHandler holds all LocalStorages for the 2D render windows. More... | |
| const int | defaultGapSize |
| The default gap size in pixels for the crosshair center. More... | |
Protected Attributes inherited from mitk::Mapper | |
| mitk::DataNode * | m_DataNode |
VTK-based 2D mapper for rendering a crosshair.
CrosshairData is used to retrieve the selected position, which is stored in the processed data node. The crosshair is created by drawing lines through the selected position, adding an additional gap in the center of the crosshair, and creating VTK poly data from the created points and lines.
Definition at line 43 of file mitkCrosshairVtkMapper2D.h.
|
protected |
Constructor. Initializes the default gap size.
|
overrideprotected |
Destructor.
|
protected |
Apply all visual properties (color, opacity, line width) to the crosshair actor.
| [in] | renderer | The renderer providing property context. |
|
protected |
Apply color and opacity properties to a 2D actor.
| [in] | renderer | The renderer providing property context. |
| [in,out] | actor | The vtkActor2D to apply properties to. |
|
protected |
Create the VTK crosshair poly data for the given renderer.
Converts the 3D crosshair position to 2D display coordinates, then draws four line segments with a central gap.
| [in] | renderer | The renderer providing coordinate transformations. |
|
protected |
Draw a line between two 3D points and add it to the given VTK structures.
| [in] | p0 | The start point. |
| [in] | p1 | The end point. |
| [in,out] | lines | The cell array to add the line to. |
| [in,out] | points | The points array to add the endpoints to. |
|
overrideprotectedvirtual |
Apply color and opacity properties and create the VTK crosshair geometry.
| [in] | renderer | The renderer to generate data for. |
Reimplemented from mitk::Mapper.
| const CrosshairData* mitk::CrosshairVtkMapper2D::GetInput | ( | ) | const |
Get the input CrosshairData from the data node.
|
overridevirtual |
Get the VTK prop assembly for the given renderer.
| [in] | renderer | The renderer whose local storage provides the prop. |
Implements mitk::VtkMapper.
| mitk::CrosshairVtkMapper2D::mitkClassMacro | ( | CrosshairVtkMapper2D | , |
| VtkMapper | |||
| ) |
|
static |
|
static |
Set default properties for the crosshair data node.
Sets "Line width" and "Crosshair.Gap Size" properties.
| [in] | node | The data node to set properties on. |
| [in] | renderer | The renderer for renderer-specific properties. May be nullptr. |
| [in] | overwrite | If true, existing properties are overwritten. |
|
overridevirtual |
Check whether this mapper needs to update itself and generate data.
Skips rendering if the data node is not visible in the given renderer or if the data is not of type CrosshairData.
| [in] | renderer | The renderer to update for. |
Reimplemented from mitk::Mapper.
|
protected |
The default gap size in pixels for the crosshair center.
Definition at line 157 of file mitkCrosshairVtkMapper2D.h.
|
protected |
The LocalStorageHandler holds all LocalStorages for the 2D render windows.
Definition at line 113 of file mitkCrosshairVtkMapper2D.h.