13 #ifndef mitkCrosshairVtkMapper2D_h
14 #define mitkCrosshairVtkMapper2D_h
22 #include <vtkSmartPointer.h>
26 class vtkPropAssembly;
27 class vtkPolyDataMapper2D;
48 itkFactorylessNewMacro(Self);
Organizes the rendering process.
Data class that stores the 3D position for a crosshair.
Internal class holding the mapper, actor, etc. for each of the 2D render windows.
~LocalStorage() override
Destructor.
vtkSmartPointer< vtkPolyDataMapper2D > m_Mapper
The poly data mapper.
vtkSmartPointer< vtkActor2D > m_CrosshairActor
The crosshair line actor.
LocalStorage()
Constructor. Creates the VTK actor, mapper, and assembly.
vtkSmartPointer< vtkPropAssembly > m_CrosshairAssembly
The prop assembly grouping actors.
VTK-based 2D mapper for rendering a crosshair.
void ApplyColorAndOpacityProperties2D(BaseRenderer *renderer, vtkActor2D *actor)
Apply color and opacity properties to a 2D actor.
LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the 2D render windows.
const int defaultGapSize
The default gap size in pixels for the crosshair center.
void Update(mitk::BaseRenderer *renderer) override
Check whether this mapper needs to update itself and generate data.
void GenerateDataForRenderer(BaseRenderer *renderer) override
Apply color and opacity properties and create the VTK crosshair geometry.
mitkClassMacro(CrosshairVtkMapper2D, VtkMapper)
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.
~CrosshairVtkMapper2D() override
Destructor.
void CreateVtkCrosshair(BaseRenderer *renderer)
Create the VTK crosshair poly data for the given renderer.
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
Set default properties for the crosshair data node.
vtkProp * GetVtkProp(BaseRenderer *renderer) override
Get the VTK prop assembly for the given renderer.
void ApplyAllProperties(BaseRenderer *renderer)
Apply all visual properties (color, opacity, line width) to the crosshair actor.
CrosshairVtkMapper2D()
Constructor. Initializes the default gap size.
const CrosshairData * GetInput() const
Get the input CrosshairData from the data node.
Central node class of the MITK data tree, associating a data object with properties and mappers.
Base class for mapper-specific rendering resources.
Base class of all VTK-based Mappers for displaying primitives using VTK functionality.
Find image slices visible on a given plane.