Medical Imaging Interaction Toolkit  2016.11.0
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 ressources. 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 =0
 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...
 
int 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...
 
virtual ~Mapper ()
 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...
 
virtual OverlayManagerGetOverlayManager () const
 

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 54 of file mitkMapper.h.

Member Typedef Documentation

Definition at line 57 of file mitkMapper.h.

Definition at line 57 of file mitkMapper.h.

Definition at line 57 of file mitkMapper.h.

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

Definition at line 57 of file mitkMapper.h.

Constructor & Destructor Documentation

mitk::Mapper::Mapper ( )
explicitprotected

explicit constructor which disallows implicit conversions

Definition at line 23 of file mitkMapper.cpp.

mitk::Mapper::~Mapper ( )
protectedvirtual

virtual destructor in order to derive from this class

Definition at line 27 of file mitkMapper.cpp.

Member Function Documentation

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::VtkMapper, mitk::EnhancedPointSetVtkMapper3D, mitk::BoundingShapeVtkMapper2D, mitk::GLMapper, mitk::VtkGLMapperWrapper, mitk::SimulationVtkMapper2D, mitk::SimulationVtkMapper3D, mitk::PlanarFigureVtkMapper3D, and mitk::BoundingShapeVtkMapper3D.

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

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

Definition at line 84 of file mitkMapper.cpp.

References mitk::BaseRenderer::GetTimeStep().

Referenced by mitk::SurfaceVtkMapper2D::Update().

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 167 of file mitkMapper.h.

virtual std::vector<std::string> mitk::Mapper::GetClassHierarchy ( ) const
inlinevirtual
bool mitk::Mapper::GetColor ( float  rgb[3],
mitk::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

Definition at line 41 of file mitkMapper.cpp.

References mitk::DataNode::GetColor().

mitk::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

Definition at line 31 of file mitkMapper.cpp.

bool mitk::Mapper::GetLevelWindow ( mitk::LevelWindow levelWindow,
mitk::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

Definition at line 68 of file mitkMapper.cpp.

References mitk::DataNode::GetLevelWindow().

bool mitk::Mapper::GetOpacity ( float &  opacity,
mitk::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

Definition at line 59 of file mitkMapper.cpp.

References mitk::DataNode::GetOpacity().

mitk::OverlayManager * mitk::Mapper::GetOverlayManager ( ) const
protectedvirtual

Definition at line 160 of file mitkMapper.cpp.

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

Definition at line 57 of file mitkMapper.h.

int mitk::Mapper::GetTimestep ( ) const
inline
bool mitk::Mapper::GetVisibility ( bool &  visible,
mitk::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

Definition at line 50 of file mitkMapper.cpp.

References mitk::DataNode::GetVisibility().

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.

Reimplemented in mitk::CompositeMapper, mitk::OdfVtkMapper2D< TPixelType, NrOdfDirections >, mitk::OdfVtkMapper2D< float, QBALL_ODFSIZE >, and mitk::GPUVolumeMapper3D.

Definition at line 156 of file mitkMapper.h.

bool mitk::Mapper::IsVisible ( mitk::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

Definition at line 77 of file mitkMapper.cpp.

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

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

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

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::VtkMapper, mitk::GLMapper, and mitk::VtkGLMapperWrapper.

Referenced by mitk::VtkPropRenderer::Render().

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

Definition at line 179 of file mitkMapper.h.

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

Set the DataNode containing the data to map.

Reimplemented in mitk::CompositeMapper, and mitk::VtkGLMapperWrapper.

Referenced by mitk::CoreObjectFactory::CreateMapper(), and mitk::DataNode::SetMapper().

void mitk::Mapper::SetDefaultProperties ( mitk::DataNode node,
mitk::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: NULL, i.e. default property list)

Definition at line 153 of file mitkMapper.cpp.

References mitk::DataNode::AddProperty(), mitk::BoolProperty::New(), mitk::IntProperty::New(), and mitk::StringProperty::New().

Referenced by mitk::TubeGraphObjectFactory::SetDefaultProperties(), and mitk::SurfaceVtkMapper2D::SetDefaultProperties().

Member Data Documentation

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

Definition at line 182 of file mitkMapper.h.

Referenced by mitk::CompositeMapper::SetDataNode().


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