Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit

Base class of all mappers, Vtk as well as OpenGL mappers. More...

#include <mitkMapper.h>

Inheritance diagram for mitk::Mapper:
Collaboration diagram for mitk::Mapper:

Classes

class  BaseLocalStorage
 Base class for mapper specific rendering resources. More...
 

Public Types

typedef Mapper Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
virtual void SetDataNode (DataNode *_arg)
 Set the DataNode containing the data to map. More...
 
virtual DataNodeGetDataNode () const
 Get the DataNode containing the data to map. Method only returns valid DataNode Pointer if the mapper belongs to a data node. Otherwise, the returned DataNode Pointer might be invalid. More...
 
BaseDataGetData () const
 Get the data to map. More...
 
virtual bool GetColor (float rgb[3], BaseRenderer *renderer, const char *name="color") const
 Convenience access method for color properties (instances of ColorProperty) More...
 
virtual bool GetVisibility (bool &visible, BaseRenderer *renderer, const char *name="visible") const
 Convenience access method for visibility properties (instances of BoolProperty) More...
 
virtual bool GetOpacity (float &opacity, BaseRenderer *renderer, const char *name="opacity") const
 Convenience access method for opacity properties (instances of FloatProperty) More...
 
virtual bool GetLevelWindow (LevelWindow &levelWindow, BaseRenderer *renderer, const char *name="levelwindow") const
 Convenience access method for color properties (instances of LevelWindoProperty) More...
 
virtual bool IsVisible (BaseRenderer *renderer, const char *name="visible") const
 Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found. More...
 
virtual bool IsVtkBased () const
 Returns whether this is an vtk-based mapper. More...
 
virtual void Update (BaseRenderer *renderer)
 Calls the time step of the input data for the specified renderer and checks whether the time step is valid and calls method GenerateDataForRenderer() More...
 
virtual void MitkRender (mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type)=0
 Responsible for calling the appropriate render functions. To be implemented in sub-classes. More...
 
virtual void ApplyColorAndOpacityProperties (mitk::BaseRenderer *renderer, vtkActor *actor=nullptr)=0
 Apply specific color and opacity properties read from the PropertyList. Reimplemented in GLmapper (does not use the actor) and the VtkMapper class. The function is called by the individual mapper (mostly in the ApplyProperties() or ApplyAllProperties() method). More...
 
TimeStepType GetTimestep () const
 Returns the current time step as calculated from the renderer. More...
 
virtual bool IsLODEnabled (BaseRenderer *) const
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static void SetDefaultProperties (DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
 Set default values of properties used by this mapper to node. More...
 

Protected Member Functions

 Mapper ()
 explicit constructor which disallows implicit conversions More...
 
 ~Mapper () override
 virtual destructor in order to derive from this class More...
 
virtual void GenerateData ()
 Generate the data needed for rendering (independent of a specific renderer) 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...
 

Protected Attributes

mitk::DataNodem_DataNode
 

Detailed Description

Base class of all mappers, Vtk as well as OpenGL mappers.

By the help of mappers, the input data is transformed to tangible primitives, such as surfaces, points, lines, etc. This is the base class of all mappers, Vtk as well as OpenGL mappers. Subclasses of mitk::Mapper control the creation of rendering primitives that interface to the graphics library (e.g., OpenGL, vtk).

Definition at line 46 of file mitkMapper.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 49 of file mitkMapper.h.

◆ Pointer

Definition at line 49 of file mitkMapper.h.

◆ Self

Definition at line 49 of file mitkMapper.h.

◆ Superclass

typedef itk::Object mitk::Mapper::Superclass

Definition at line 49 of file mitkMapper.h.

Constructor & Destructor Documentation

◆ Mapper()

mitk::Mapper::Mapper ( )
explicitprotected

explicit constructor which disallows implicit conversions

◆ ~Mapper()

mitk::Mapper::~Mapper ( )
overrideprotected

virtual destructor in order to derive from this class

Member Function Documentation

◆ ApplyColorAndOpacityProperties()

virtual void mitk::Mapper::ApplyColorAndOpacityProperties ( mitk::BaseRenderer renderer,
vtkActor *  actor = nullptr 
)
pure virtual

Apply specific color and opacity properties read from the PropertyList. Reimplemented in GLmapper (does not use the actor) and the VtkMapper class. The function is called by the individual mapper (mostly in the ApplyProperties() or ApplyAllProperties() method).

Implemented in mitk::PlanarFigureMapper2D, mitk::GLMapper, mitk::ContourMapper2D, mitk::ContourSetMapper2D, mitk::ContourModelGLMapper2DBase, mitk::VtkMapper, mitk::EnhancedPointSetVtkMapper3D, mitk::VtkGLMapperWrapper, mitk::ROIMapper2D, mitk::PlanarFigureVtkMapper3D, mitk::ROIMapper3D, mitk::BoundingShapeVtkMapper2D, and mitk::BoundingShapeVtkMapper3D.

◆ CalculateTimeStep()

virtual void mitk::Mapper::CalculateTimeStep ( BaseRenderer renderer)
protectedvirtual

Updates the time step, which is sometimes needed in subclasses.

◆ GenerateData()

virtual void mitk::Mapper::GenerateData ( )
inlineprotectedvirtual

Generate the data needed for rendering (independent of a specific renderer)

Deprecated:
(as of 2013_03) Use GenerateDataForRenderer(BaseRenderer* renderer) instead.

Definition at line 159 of file mitkMapper.h.

◆ GenerateDataForRenderer()

◆ GetClassHierarchy()

◆ GetClassName()

◆ GetColor()

virtual bool mitk::Mapper::GetColor ( float  rgb[3],
BaseRenderer renderer,
const char *  name = "color" 
) const
virtual

Convenience access method for color properties (instances of ColorProperty)

Returns
true property was found
Deprecated:
(as of 2013_03) Use GetDataNode()->GetColor(...) instead to get the color

◆ GetData()

BaseData* mitk::Mapper::GetData ( ) const

Get the data to map.

Returns the mitk::BaseData object associated with this mapper.

Returns
the mitk::BaseData associated with this mapper.
Deprecated:
(as of 2013_03) Use GetDataNode()->GetData() instead to access the data

◆ GetDataNode()

virtual DataNode* mitk::Mapper::GetDataNode ( ) const
virtual

Get the DataNode containing the data to map. Method only returns valid DataNode Pointer if the mapper belongs to a data node. Otherwise, the returned DataNode Pointer might be invalid.

Reimplemented in mitk::VtkGLMapperWrapper.

◆ GetLevelWindow()

virtual bool mitk::Mapper::GetLevelWindow ( LevelWindow levelWindow,
BaseRenderer renderer,
const char *  name = "levelwindow" 
) const
virtual

Convenience access method for color properties (instances of LevelWindoProperty)

Returns
true property was found
Deprecated:
(as of 2013_03) Use GetDataNode->GetLevelWindow(...) instead to get the levelwindow

◆ GetOpacity()

virtual bool mitk::Mapper::GetOpacity ( float &  opacity,
BaseRenderer renderer,
const char *  name = "opacity" 
) const
virtual

Convenience access method for opacity properties (instances of FloatProperty)

Returns
true property was found
Deprecated:
(as of 2013_03) Use GetDataNode()->GetOpacity(...) instead to get the opacity

◆ GetStaticNameOfClass()

static const char* mitk::Mapper::GetStaticNameOfClass ( )
inlinestatic

Definition at line 49 of file mitkMapper.h.

◆ GetTimestep()

TimeStepType mitk::Mapper::GetTimestep ( ) const
inline

Returns the current time step as calculated from the renderer.

Definition at line 144 of file mitkMapper.h.

◆ GetVisibility()

virtual bool mitk::Mapper::GetVisibility ( bool &  visible,
BaseRenderer renderer,
const char *  name = "visible" 
) const
virtual

Convenience access method for visibility properties (instances of BoolProperty)

Returns
true property was found
See also
IsVisible
Deprecated:
(as of 2013_03) Use GetDataNode()->GetVisibility(...) instead to get the visibility

◆ IsLODEnabled()

virtual bool mitk::Mapper::IsLODEnabled ( BaseRenderer ) const
inlinevirtual

Returns true if this Mapper currently allows for Level-of-Detail rendering. This reflects whether this Mapper currently invokes StartEvent, EndEvent, and ProgressEvent on BaseRenderer.

Definition at line 148 of file mitkMapper.h.

◆ IsVisible()

virtual bool mitk::Mapper::IsVisible ( BaseRenderer renderer,
const char *  name = "visible" 
) const
virtual

Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found.

Thus, the return value has a different meaning than in the GetVisibility method!

See also
GetVisibility
Deprecated:
(as of 2013_03) Use GetDataNode()->GetVisibility(...) instead

◆ IsVtkBased()

virtual bool mitk::Mapper::IsVtkBased ( ) const
inlinevirtual

Returns whether this is an vtk-based mapper.

Deprecated:
(as of 2013_03) All mappers of superclass VTKMapper are vtk based, use a dynamic_cast instead

Reimplemented in mitk::GLMapper, and mitk::VtkMapper.

Definition at line 113 of file mitkMapper.h.

◆ MitkRender()

virtual void mitk::Mapper::MitkRender ( mitk::BaseRenderer renderer,
mitk::VtkPropRenderer::RenderType  type 
)
pure virtual

Responsible for calling the appropriate render functions. To be implemented in sub-classes.

Implemented in mitk::PlanarFigureMapper2D, mitk::GLMapper, mitk::VtkMapper, mitk::VtkGLMapperWrapper, mitk::ContourModelSetGLMapper2D, mitk::ContourMapper2D, mitk::ContourSetMapper2D, and mitk::ContourModelGLMapper2D.

◆ ResetMapper()

virtual void mitk::Mapper::ResetMapper ( BaseRenderer )
inlineprotectedvirtual

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 in mitk::SurfaceVtkMapper3D, mitk::GizmoMapper2D, mitk::PointSetVtkMapper2D, mitk::SurfaceVtkMapper2D, mitk::PointSetVtkMapper3D, and mitk::UnstructuredGridVtkMapper3D.

Definition at line 171 of file mitkMapper.h.

◆ SetDataNode()

virtual void mitk::Mapper::SetDataNode ( DataNode _arg)
virtual

Set the DataNode containing the data to map.

Reimplemented in mitk::VtkGLMapperWrapper.

◆ SetDefaultProperties()

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

Set default values of properties used by this mapper to node.

Parameters
nodeThe node for which the properties are set
overwriteoverwrite existing properties (default: false)
rendererdefines which property list of node is used (default: nullptr, i.e. default property list)

◆ Update()

virtual void mitk::Mapper::Update ( BaseRenderer renderer)
virtual

Member Data Documentation

◆ m_DataNode

mitk::DataNode* mitk::Mapper::m_DataNode
protected

Definition at line 172 of file mitkMapper.h.


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