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

Abstract base class for OpenGL-based 2D contour mappers. More...

#include <mitkContourModelMapper2DBase.h>

Inheritance diagram for mitk::ContourModelMapper2DBase:
Collaboration diagram for mitk::ContourModelMapper2DBase:

Public Member Functions

 mitkClassMacro (ContourModelMapper2DBase, Mapper)
 
void ApplyColorAndOpacityProperties (mitk::BaseRenderer *renderer, vtkActor *actor=nullptr) override
 Apply color and opacity properties from the data node to the rendering context. 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...
 
virtual void MitkRender (mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type)=0
 Responsible for calling the appropriate render functions. 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...
 

Protected Types

typedef TextAnnotation2D::Pointer TextAnnotationPointerType
 
typedef std::vector< BaseRenderer * > RendererListType
 

Protected Member Functions

 ContourModelMapper2DBase ()
 
 ~ContourModelMapper2DBase () override
 
void DrawContour (mitk::ContourModel *contour, mitk::BaseRenderer *renderer)
 
void WriteTextWithAnnotation (TextAnnotationPointerType textAnnotation, const char *text, float rgb[3], Point2D pt2d, mitk::BaseRenderer *)
 
virtual void InternalDrawContour (mitk::ContourModel *renderingContour, mitk::BaseRenderer *renderer)
 
- 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 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

TextAnnotationPointerType m_PointNumbersAnnotation
 
TextAnnotationPointerType m_ControlPointNumbersAnnotation
 
RendererListType m_RendererList
 
- Protected Attributes inherited from mitk::Mapper
mitk::DataNode * m_DataNode
 

Additional Inherited Members

- 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...
 

Detailed Description

Abstract base class for OpenGL-based 2D contour mappers.

Provides shared functionality for drawing contour models in 2D render windows using OpenGL. Subclasses such as ContourModelMapper2D and ContourModelSetMapper2D implement the MitkRender method to handle specific data types.

See also
ContourModelMapper2D, ContourModelSetMapper2D, ContourModel

Definition at line 41 of file mitkContourModelMapper2DBase.h.

Member Typedef Documentation

◆ RendererListType

Definition at line 69 of file mitkContourModelMapper2DBase.h.

◆ TextAnnotationPointerType

typedef TextAnnotation2D::Pointer mitk::ContourModelMapper2DBase::TextAnnotationPointerType
protected

Definition at line 53 of file mitkContourModelMapper2DBase.h.

Constructor & Destructor Documentation

◆ ContourModelMapper2DBase()

mitk::ContourModelMapper2DBase::ContourModelMapper2DBase ( )
protected

◆ ~ContourModelMapper2DBase()

mitk::ContourModelMapper2DBase::~ContourModelMapper2DBase ( )
overrideprotected

Member Function Documentation

◆ ApplyColorAndOpacityProperties()

void mitk::ContourModelMapper2DBase::ApplyColorAndOpacityProperties ( mitk::BaseRenderer *  renderer,
vtkActor *  actor = nullptr 
)
overridevirtual

Apply color and opacity properties from the data node to the rendering context.

Parameters
[in]rendererThe base renderer providing the rendering context.
[in]actorOptional VTK actor (unused in OpenGL rendering). Default is nullptr.

Implements mitk::Mapper.

◆ DrawContour()

void mitk::ContourModelMapper2DBase::DrawContour ( mitk::ContourModel *  contour,
mitk::BaseRenderer *  renderer 
)
protected

◆ InternalDrawContour()

virtual void mitk::ContourModelMapper2DBase::InternalDrawContour ( mitk::ContourModel *  renderingContour,
mitk::BaseRenderer *  renderer 
)
protectedvirtual

◆ mitkClassMacro()

mitk::ContourModelMapper2DBase::mitkClassMacro ( ContourModelMapper2DBase  ,
Mapper   
)

◆ WriteTextWithAnnotation()

void mitk::ContourModelMapper2DBase::WriteTextWithAnnotation ( TextAnnotationPointerType  textAnnotation,
const char *  text,
float  rgb[3],
Point2D  pt2d,
mitk::BaseRenderer *   
)
protected

Member Data Documentation

◆ m_ControlPointNumbersAnnotation

TextAnnotationPointerType mitk::ContourModelMapper2DBase::m_ControlPointNumbersAnnotation
protected

Definition at line 67 of file mitkContourModelMapper2DBase.h.

◆ m_PointNumbersAnnotation

TextAnnotationPointerType mitk::ContourModelMapper2DBase::m_PointNumbersAnnotation
protected

Definition at line 66 of file mitkContourModelMapper2DBase.h.

◆ m_RendererList

RendererListType mitk::ContourModelMapper2DBase::m_RendererList
protected

Definition at line 70 of file mitkContourModelMapper2DBase.h.


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