Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::BaseRenderer Class Referenceabstract

Organizes the rendering process. More...

#include <mitkBaseRenderer.h>

Inheritance diagram for mitk::BaseRenderer:
Collaboration diagram for mitk::BaseRenderer:

Public Types

enum  StandardMapperSlot { Standard2D , Standard3D }
 Defines which kind of mapper (e.g. 2D or 3D) should be used. More...
 
typedef std::map< vtkRenderWindow *, BaseRenderer * > BaseRendererMapType
 Map type associating vtkRenderWindow pointers with BaseRenderer pointers. More...
 

Public Member Functions

 mitkClassMacroItkParent (BaseRenderer, itk::Object)
 
 BaseRenderer (const char *name=nullptr, vtkRenderWindow *renderWindow=nullptr)
 Construct a BaseRenderer with an optional name and vtkRenderWindow. More...
 
void RemoveAllLocalStorages ()
 Remove all registered local storages and notify observers via RendererResetEvent. More...
 
void RegisterLocalStorageHandler (BaseLocalStorageHandler *lsh)
 Register a local storage handler with this renderer. More...
 
void UnregisterLocalStorageHandler (BaseLocalStorageHandler *lsh)
 Unregister a previously registered local storage handler. More...
 
virtual void SetDataStorage (DataStorage *storage)
 Set the DataStorage used by this renderer. More...
 
virtual DataStorage::Pointer GetDataStorage () const
 Get the DataStorage used by this renderer. More...
 
vtkRenderWindow * GetRenderWindow () const
 Get the vtkRenderWindow associated with this renderer. More...
 
vtkRenderer * GetVtkRenderer () const
 Get the underlying vtkRenderer used for VTK rendering. More...
 
Dispatcher::Pointer GetDispatcher () const
 Get the dispatcher, which handles events for this base renderer. More...
 
virtual void Resize (int w, int h)
 Set a new size for the render window. More...
 
virtual void InitRenderer (vtkRenderWindow *renderwindow)
 Initialize the base renderer with a vtk render window. More...
 
virtual void InitSize (int w, int h)
 Set the initial size for the render window. More...
 
virtual void DrawOverlayMouse (Point2D &)
 Draw an overlay mouse cursor at the given position. More...
 
virtual void SetWorldTimeGeometry (const TimeGeometry *geometry)
 Set the world time geometry using the given TimeGeometry. More...
 
virtual const TimeGeometry * GetWorldTimeGeometry ()
 
virtual void SetInteractionReferenceGeometry (const TimeGeometry *geometry)
 Set the interaction reference world time geometry using the given TimeGeometry. More...
 
virtual const TimeGeometry * GetInteractionReferenceGeometry ()
 Get the current interaction reference geometry. More...
 
virtual bool GetReferenceGeometryAligned ()
 Return if the reference geometry aligns with the base renderer's world geometry. If true, the interaction reference geometry aligns with the base renderer's current world geometry. False otherwise. More...
 
virtual const BaseGeometry * GetCurrentWorldGeometry ()
 Get the current time-extracted 3D-geometry. More...
 
virtual const PlaneGeometry * GetCurrentWorldPlaneGeometry ()
 Get the current slice-extracted 2D-geometry. More...
 
virtual bool SetWorldGeometryToDataStorageBounds ()
 Set the world geometry so that it encompasses all objects in the DataStorage. More...
 
virtual void SetSlice (unsigned int slice)
 Set the slice that should be used for geometry extraction. More...
 
virtual unsigned int GetSlice () const
 
virtual void SetTimeStep (unsigned int timeStep)
 Set the timestep that should be used for geometry extraction. More...
 
virtual unsigned int GetTimeStep () const
 
TimeStepType GetTimeStep (const BaseData *data) const
 Get the timestep of a BaseData object which exists at the time of the currently displayed content. More...
 
ScalarType GetTime () const
 Get the time in ms of the currently display content (geometry). More...
 
virtual void SetGeometry (const itk::EventObject &geometrySliceEvent)
 Set the world time geometry using the geometry of the given event. More...
 
virtual void UpdateGeometry (const itk::EventObject &geometrySliceEvent)
 Set the current world plane geometry using the existing current world geometry. More...
 
virtual void SetGeometrySlice (const itk::EventObject &geometrySliceEvent)
 Set the current slice using "SetSlice" and update the current world geometry and the current world plane geometry. More...
 
virtual void SetGeometryTime (const itk::EventObject &geometryTimeEvent)
 Set the current time using "SetTimeStep" and update the current world geometry and the current world plane geometry. More...
 
virtual DataNode * GetCurrentWorldPlaneGeometryNode ()
 
void SendUpdateSlice ()
 Modify the update time of the current world plane geometry and force reslicing. More...
 
virtual unsigned long GetCurrentWorldPlaneGeometryUpdateTime ()
 Get timestamp of the update time of the current world plane geometry. More...
 
virtual unsigned long GetTimeStepUpdateTime ()
 Get timestamp of the update time of the current timestep. More...
 
virtual void PickWorldPoint (const Point2D &diplayPosition, Point3D &worldPosition) const =0
 Pick a world coordinate (x,y,z) given a display coordinate (x,y). More...
 
virtual DataNode * PickObject (const Point2D &, Point3D &) const
 Determines the object (mitk::DataNode) closest to the current position by means of picking. More...
 
virtual MapperSlotId GetMapperID ()
 Get the currently used mapperID. More...
 
virtual MapperSlotId GetMapperID () const
 
virtual void SetMapperID (MapperSlotId id)
 Set the used mapperID. More...
 
virtual int * GetSize () const
 Get the size of the render window in pixels. More...
 
virtual int * GetViewportSize () const
 Get the size of the VTK viewport in pixels. More...
 
void SetSliceNavigationController (SliceNavigationController *SlicenavigationController)
 Replace the current SliceNavigationController. More...
 
virtual CameraController * GetCameraController ()
 Get the CameraController for this renderer. More...
 
virtual SliceNavigationController * GetSliceNavigationController ()
 Get the SliceNavigationController for this renderer. More...
 
virtual CameraRotationController * GetCameraRotationController ()
 Get the CameraRotationController for this renderer. More...
 
virtual bool GetEmptyWorldGeometry ()
 Return whether the current world geometry is empty (has zero extent). More...
 
virtual bool GetKeepDisplayedRegion ()
 Getter/Setter for defining if the displayed region should be shifted or rescaled if the render window is resized. More...
 
virtual void SetKeepDisplayedRegion (bool _arg)
 
const char * GetName () const
 Return the name of the base renderer. More...
 
int GetSizeX () const
 Return the size in x-direction of the base renderer. More...
 
int GetSizeY () const
 Return the size in y-direction of the base renderer. More...
 
const double * GetBounds () const
 Return the bounds of the bounding box of the current world geometry (time-extracted 3D-geometry). More...
 
void RequestUpdate ()
 Request an asynchronous rendering update for this render window via the RenderingManager. More...
 
void ForceImmediateUpdate ()
 Force an immediate synchronous rendering update for this render window. More...
 
unsigned int GetNumberOfVisibleLODEnabledMappers () const
 Return the number of mappers which are visible and have level-of-detail rendering enabled. More...
 
void DisplayToWorld (const Point2D &displayPoint, Point3D &worldIndex) const
 Convert a display point to a 3D world coordinate. More...
 
void DisplayToPlane (const Point2D &displayPoint, Point2D &planePointInMM) const
 Convert a display point to a 2D plane coordinate in millimeters. More...
 
void WorldToDisplay (const Point3D &worldIndex, Point2D &displayPoint) const
 Convert a 3D world coordinate to a 2D display point. More...
 
void WorldToView (const Point3D &worldIndex, Point2D &viewPoint) const
 Convert a 3D world coordinate to a 2D viewport point. More...
 
void PlaneToDisplay (const Point2D &planePointInMM, Point2D &displayPoint) const
 Convert a 2D plane coordinate in millimeters to a 2D display point. More...
 
void PlaneToView (const Point2D &planePointInMM, Point2D &viewPoint) const
 Convert a 2D plane coordinate in millimeters to a 2D viewport point. More...
 
double GetScaleFactorMMPerDisplayUnit () const
 Get the scale factor relating millimeters to display pixels. More...
 
Point2D GetDisplaySizeInMM () const
 Get the size of the render window in millimeters. More...
 
Point2D GetViewportSizeInMM () const
 Get the size of the VTK viewport in millimeters. More...
 
Point2D GetOriginInMM () const
 Get the origin of the viewport in plane coordinates (millimeters). More...
 
virtual bool GetConstrainZoomingAndPanning () const
 Get whether zooming and panning are constrained to the displayed geometry. More...
 
virtual void SetConstrainZoomingAndPanning (bool constrain)
 Enable or disable constraining of zooming and panning. More...
 

Static Public Member Functions

static BaseRenderer * GetInstance (vtkRenderWindow *renderWindow)
 Get the BaseRenderer instance associated with the given vtkRenderWindow. More...
 
static void AddInstance (vtkRenderWindow *renderWindow, BaseRenderer *baseRenderer)
 Register a BaseRenderer instance for the given vtkRenderWindow. More...
 
static void RemoveInstance (vtkRenderWindow *renderWindow)
 Remove the BaseRenderer registration for the given vtkRenderWindow. More...
 
static BaseRenderer * GetByName (const std::string &name)
 Find a BaseRenderer by its name. More...
 
static vtkRenderWindow * GetRenderWindowByName (const std::string &name)
 Find a vtkRenderWindow by the name of its associated BaseRenderer. More...
 
static BaseRendererMapType GetSpecificRenderWindows (MapperSlotId mapper)
 Get a map of all BaseRenderers that use the specified mapper type. More...
 
static BaseRendererMapType GetAll2DRenderWindows ()
 Convenience function: Get a map of all 2D RenderWindows. More...
 
static BaseRendererMapType GetAll3DRenderWindows ()
 Convenience function: Get a map of all 3D RenderWindows. More...
 

Static Public Attributes

static BaseRendererMapType baseRendererMap
 Static map holding all registered BaseRenderer instances, keyed by their vtkRenderWindow. More...
 

Protected Types

typedef std::set< Mapper * > LODEnabledMappersType
 

Protected Member Functions

 ~BaseRenderer () override
 
virtual void Update ()=0
 
void UpdateCurrentGeometries ()
 
virtual void SetCurrentWorldPlaneGeometry (const PlaneGeometry *geometry2d)
 
virtual void SetCurrentWorldGeometry (const BaseGeometry *geometry)
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Protected Attributes

vtkRenderWindow * m_RenderWindow
 
vtkRenderer * m_VtkRenderer
 
MapperSlotId m_MapperID
 
DataStorage::Pointer m_DataStorage
 
unsigned long m_LastUpdateTime
 
CameraController::Pointer m_CameraController
 
CameraRotationController::Pointer m_CameraRotationController
 
SliceNavigationController::Pointer m_SliceNavigationController
 
PlaneGeometryData::Pointer m_CurrentWorldPlaneGeometryData
 
DataNode::Pointer m_CurrentWorldPlaneGeometryNode
 
unsigned long m_CurrentWorldPlaneGeometryTransformTime
 
std::string m_Name
 
double m_Bounds [6]
 
bool m_EmptyWorldGeometry
 
unsigned int m_NumberOfVisibleLODEnabledMappers
 
std::list< BaseLocalStorageHandler * > m_RegisteredLocalStorageHandlers
 
bool m_ConstrainZoomingAndPanning
 

Detailed Description

Organizes the rendering process.

A BaseRenderer contains a reference to a given vtkRenderWindow and a corresponding vtkRenderer. It manages geometry extraction (world time geometry, current world geometry, current world plane geometry), coordinate conversions between display and world space, and the mapper type (2D / 3D) used for rendering.

All existing BaseRenderer instances are stored in a static map that can be accessed / modified via the static functions. VtkPropRenderer is the concrete implementation of a BaseRenderer.

See also
VtkPropRenderer
RenderingManager
SliceNavigationController
Mapper

Definition at line 66 of file mitkBaseRenderer.h.

Member Typedef Documentation

◆ BaseRendererMapType

typedef std::map<vtkRenderWindow*, BaseRenderer*> mitk::BaseRenderer::BaseRendererMapType

Map type associating vtkRenderWindow pointers with BaseRenderer pointers.

Definition at line 71 of file mitkBaseRenderer.h.

◆ LODEnabledMappersType

typedef std::set<Mapper*> mitk::BaseRenderer::LODEnabledMappersType
protected

Definition at line 680 of file mitkBaseRenderer.h.

Member Enumeration Documentation

◆ StandardMapperSlot

Defines which kind of mapper (e.g. 2D or 3D) should be used.

Enumerator
Standard2D 

Use 2D mappers for rendering.

Standard3D 

Use 3D mappers for rendering.

Definition at line 79 of file mitkBaseRenderer.h.

Constructor & Destructor Documentation

◆ BaseRenderer()

mitk::BaseRenderer::BaseRenderer ( const char *  name = nullptr,
vtkRenderWindow *  renderWindow = nullptr 
)

Construct a BaseRenderer with an optional name and vtkRenderWindow.

Parameters
[in]nameThe name of the renderer. If nullptr, an unnamed renderer is created.
[in]renderWindowThe vtkRenderWindow to associate with this renderer. Can be nullptr.

◆ ~BaseRenderer()

mitk::BaseRenderer::~BaseRenderer ( )
overrideprotected

Member Function Documentation

◆ AddInstance()

static void mitk::BaseRenderer::AddInstance ( vtkRenderWindow *  renderWindow,
BaseRenderer *  baseRenderer 
)
static

Register a BaseRenderer instance for the given vtkRenderWindow.

If a BaseRenderer is already registered for this render window, it is removed first.

Parameters
[in]renderWindowThe vtkRenderWindow to associate with the renderer.
[in]baseRendererThe BaseRenderer instance to register.

◆ DisplayToPlane()

void mitk::BaseRenderer::DisplayToPlane ( const Point2D &  displayPoint,
Point2D &  planePointInMM 
) const

Convert a display point to a 2D plane coordinate in millimeters.

Only meaningful for 2D renderers. Logs a warning for 3D renderers.

Parameters
[in]displayPoint2D display coordinate in pixels.
[out]planePointInMMThe resulting 2D coordinate on the current world plane in mm.

◆ DisplayToWorld()

void mitk::BaseRenderer::DisplayToWorld ( const Point2D &  displayPoint,
Point3D &  worldIndex 
) const

Convert a display point to a 3D world coordinate.

For 2D renderers, the z-depth is obtained from the camera focal point. For 3D renderers, PickWorldPoint() is used.

Parameters
[in]displayPoint2D display coordinate in pixels.
[out]worldIndexThe resulting 3D world coordinate.

◆ DrawOverlayMouse()

virtual void mitk::BaseRenderer::DrawOverlayMouse ( Point2D &  )
inlinevirtual

Draw an overlay mouse cursor at the given position.

Note
This is a stub; the actual implementation must be provided in concrete subclasses.

Definition at line 238 of file mitkBaseRenderer.h.

References MITK_INFO.

◆ ForceImmediateUpdate()

void mitk::BaseRenderer::ForceImmediateUpdate ( )

Force an immediate synchronous rendering update for this render window.

◆ GetAll2DRenderWindows()

static BaseRendererMapType mitk::BaseRenderer::GetAll2DRenderWindows ( )
static

Convenience function: Get a map of all 2D RenderWindows.

Returns
A map of all BaseRenderers using Standard2D mappers.

◆ GetAll3DRenderWindows()

static BaseRendererMapType mitk::BaseRenderer::GetAll3DRenderWindows ( )
static

Convenience function: Get a map of all 3D RenderWindows.

Returns
A map of all BaseRenderers using Standard3D mappers.

◆ GetBounds()

const double* mitk::BaseRenderer::GetBounds ( ) const

Return the bounds of the bounding box of the current world geometry (time-extracted 3D-geometry).

If the geometry is empty, the bounds are set to zero.

◆ GetByName()

static BaseRenderer* mitk::BaseRenderer::GetByName ( const std::string &  name)
static

Find a BaseRenderer by its name.

Parameters
[in]nameThe name of the renderer to search for.
Returns
Pointer to the matching BaseRenderer, or nullptr if not found.

◆ GetCameraController()

virtual CameraController* mitk::BaseRenderer::GetCameraController ( )
virtual

Get the CameraController for this renderer.

◆ GetCameraRotationController()

virtual CameraRotationController* mitk::BaseRenderer::GetCameraRotationController ( )
virtual

Get the CameraRotationController for this renderer.

◆ GetConstrainZoomingAndPanning()

virtual bool mitk::BaseRenderer::GetConstrainZoomingAndPanning ( ) const
virtual

Get whether zooming and panning are constrained to the displayed geometry.

◆ GetCurrentWorldGeometry()

virtual const BaseGeometry* mitk::BaseRenderer::GetCurrentWorldGeometry ( )
virtual

Get the current time-extracted 3D-geometry.

◆ GetCurrentWorldPlaneGeometry()

virtual const PlaneGeometry* mitk::BaseRenderer::GetCurrentWorldPlaneGeometry ( )
virtual

Get the current slice-extracted 2D-geometry.

◆ GetCurrentWorldPlaneGeometryNode()

virtual DataNode* mitk::BaseRenderer::GetCurrentWorldPlaneGeometryNode ( )
virtual

◆ GetCurrentWorldPlaneGeometryUpdateTime()

virtual unsigned long mitk::BaseRenderer::GetCurrentWorldPlaneGeometryUpdateTime ( )
virtual

Get timestamp of the update time of the current world plane geometry.

◆ GetDataStorage()

virtual DataStorage::Pointer mitk::BaseRenderer::GetDataStorage ( ) const
inlinevirtual

Get the DataStorage used by this renderer.

Returns
Pointer to the current DataStorage.

Definition at line 181 of file mitkBaseRenderer.h.

◆ GetDispatcher()

Dispatcher::Pointer mitk::BaseRenderer::GetDispatcher ( ) const

Get the dispatcher, which handles events for this base renderer.

◆ GetDisplaySizeInMM()

Point2D mitk::BaseRenderer::GetDisplaySizeInMM ( ) const

Get the size of the render window in millimeters.

Returns
A Point2D with (width_mm, height_mm).

◆ GetEmptyWorldGeometry()

virtual bool mitk::BaseRenderer::GetEmptyWorldGeometry ( )
virtual

Return whether the current world geometry is empty (has zero extent).

◆ GetInstance()

static BaseRenderer* mitk::BaseRenderer::GetInstance ( vtkRenderWindow *  renderWindow)
static

Get the BaseRenderer instance associated with the given vtkRenderWindow.

Parameters
[in]renderWindowThe vtkRenderWindow to look up.
Returns
Pointer to the associated BaseRenderer, or nullptr if not found.

◆ GetInteractionReferenceGeometry()

virtual const TimeGeometry* mitk::BaseRenderer::GetInteractionReferenceGeometry ( )
virtual

Get the current interaction reference geometry.

◆ GetKeepDisplayedRegion()

virtual bool mitk::BaseRenderer::GetKeepDisplayedRegion ( )
virtual

Getter/Setter for defining if the displayed region should be shifted or rescaled if the render window is resized.

◆ GetMapperID() [1/2]

virtual MapperSlotId mitk::BaseRenderer::GetMapperID ( )
virtual

Get the currently used mapperID.

◆ GetMapperID() [2/2]

virtual MapperSlotId mitk::BaseRenderer::GetMapperID ( ) const
virtual

◆ GetName()

const char* mitk::BaseRenderer::GetName ( ) const
inline

Return the name of the base renderer.

Definition at line 455 of file mitkBaseRenderer.h.

◆ GetNumberOfVisibleLODEnabledMappers()

unsigned int mitk::BaseRenderer::GetNumberOfVisibleLODEnabledMappers ( ) const

Return the number of mappers which are visible and have level-of-detail rendering enabled.

◆ GetOriginInMM()

Point2D mitk::BaseRenderer::GetOriginInMM ( ) const

Get the origin of the viewport in plane coordinates (millimeters).

Returns
A Point2D representing the top-left corner of the render window in plane mm.

◆ GetReferenceGeometryAligned()

virtual bool mitk::BaseRenderer::GetReferenceGeometryAligned ( )
virtual

Return if the reference geometry aligns with the base renderer's world geometry. If true, the interaction reference geometry aligns with the base renderer's current world geometry. False otherwise.

◆ GetRenderWindow()

vtkRenderWindow* mitk::BaseRenderer::GetRenderWindow ( ) const
inline

Get the vtkRenderWindow associated with this renderer.

Returns
Pointer to the vtkRenderWindow.

Definition at line 190 of file mitkBaseRenderer.h.

◆ GetRenderWindowByName()

static vtkRenderWindow* mitk::BaseRenderer::GetRenderWindowByName ( const std::string &  name)
static

Find a vtkRenderWindow by the name of its associated BaseRenderer.

Parameters
[in]nameThe name of the renderer whose render window is requested.
Returns
Pointer to the matching vtkRenderWindow, or nullptr if not found.

◆ GetScaleFactorMMPerDisplayUnit()

double mitk::BaseRenderer::GetScaleFactorMMPerDisplayUnit ( ) const

Get the scale factor relating millimeters to display pixels.

For 2D renderers this is computed from the camera's parallel scale and the viewport height. For 3D renderers, returns 1.0.

Returns
The number of millimeters per display pixel.

◆ GetSize()

virtual int* mitk::BaseRenderer::GetSize ( ) const
virtual

Get the size of the render window in pixels.

Returns
Pointer to an array of two integers [width, height].

◆ GetSizeX()

int mitk::BaseRenderer::GetSizeX ( ) const
inline

Return the size in x-direction of the base renderer.

Definition at line 463 of file mitkBaseRenderer.h.

◆ GetSizeY()

int mitk::BaseRenderer::GetSizeY ( ) const
inline

Return the size in y-direction of the base renderer.

Definition at line 471 of file mitkBaseRenderer.h.

◆ GetSlice()

virtual unsigned int mitk::BaseRenderer::GetSlice ( ) const
virtual

◆ GetSliceNavigationController()

virtual SliceNavigationController* mitk::BaseRenderer::GetSliceNavigationController ( )
virtual

Get the SliceNavigationController for this renderer.

◆ GetSpecificRenderWindows()

static BaseRendererMapType mitk::BaseRenderer::GetSpecificRenderWindows ( MapperSlotId  mapper)
static

Get a map of all BaseRenderers that use the specified mapper type.

Parameters
[in]mapperThe MapperSlotId (Standard2D or Standard3D) to filter by.
Returns
A map of matching vtkRenderWindow-to-BaseRenderer pairs.

◆ GetTime()

ScalarType mitk::BaseRenderer::GetTime ( ) const

Get the time in ms of the currently display content (geometry).

◆ GetTimeStep() [1/2]

virtual unsigned int mitk::BaseRenderer::GetTimeStep ( ) const
virtual

◆ GetTimeStep() [2/2]

TimeStepType mitk::BaseRenderer::GetTimeStep ( const BaseData *  data) const

Get the timestep of a BaseData object which exists at the time of the currently displayed content.

Returns -1 if there is no data at the current time.

◆ GetTimeStepUpdateTime()

virtual unsigned long mitk::BaseRenderer::GetTimeStepUpdateTime ( )
virtual

Get timestamp of the update time of the current timestep.

◆ GetViewportSize()

virtual int* mitk::BaseRenderer::GetViewportSize ( ) const
virtual

Get the size of the VTK viewport in pixels.

Returns
Pointer to an array of two integers [width, height].
Note
This may differ from GetSize() when multiple viewports share a render window.

◆ GetViewportSizeInMM()

Point2D mitk::BaseRenderer::GetViewportSizeInMM ( ) const

Get the size of the VTK viewport in millimeters.

Returns
A Point2D with (width_mm, height_mm).

◆ GetVtkRenderer()

vtkRenderer* mitk::BaseRenderer::GetVtkRenderer ( ) const
inline

Get the underlying vtkRenderer used for VTK rendering.

Returns
Pointer to the vtkRenderer.

Definition at line 199 of file mitkBaseRenderer.h.

◆ GetWorldTimeGeometry()

virtual const TimeGeometry* mitk::BaseRenderer::GetWorldTimeGeometry ( )
virtual

◆ InitRenderer()

virtual void mitk::BaseRenderer::InitRenderer ( vtkRenderWindow *  renderwindow)
virtual

Initialize the base renderer with a vtk render window.

Replaces the current render window, removes all local storages, and re-initializes the camera controller.

Parameters
[in]renderwindowThe new vtkRenderWindow to use.

Reimplemented in mitk::VtkPropRenderer.

◆ InitSize()

virtual void mitk::BaseRenderer::InitSize ( int  w,
int  h 
)
virtual

Set the initial size for the render window.

Parameters
[in]wWidth in pixels.
[in]hHeight in pixels.

Reimplemented in mitk::VtkPropRenderer.

◆ mitkClassMacroItkParent()

mitk::BaseRenderer::mitkClassMacroItkParent ( BaseRenderer  ,
itk::Object   
)

◆ PickObject()

virtual DataNode* mitk::BaseRenderer::PickObject ( const Point2D &  ,
Point3D &   
) const
inlinevirtual

Determines the object (mitk::DataNode) closest to the current position by means of picking.

Warning
Implementation currently empty for 2D rendering; intended to be implemented for 3D renderers.

Reimplemented in mitk::VtkPropRenderer.

Definition at line 394 of file mitkBaseRenderer.h.

◆ PickWorldPoint()

virtual void mitk::BaseRenderer::PickWorldPoint ( const Point2D &  diplayPosition,
Point3D &  worldPosition 
) const
pure virtual

Pick a world coordinate (x,y,z) given a display coordinate (x,y).

Warning
Not implemented; has to be overwritten in subclasses.

Implemented in mitk::VtkPropRenderer.

◆ PlaneToDisplay()

void mitk::BaseRenderer::PlaneToDisplay ( const Point2D &  planePointInMM,
Point2D &  displayPoint 
) const

Convert a 2D plane coordinate in millimeters to a 2D display point.

Parameters
[in]planePointInMM2D coordinate on the current world plane in mm.
[out]displayPointThe resulting 2D display coordinate in pixels.

◆ PlaneToView()

void mitk::BaseRenderer::PlaneToView ( const Point2D &  planePointInMM,
Point2D &  viewPoint 
) const

Convert a 2D plane coordinate in millimeters to a 2D viewport point.

Parameters
[in]planePointInMM2D coordinate on the current world plane in mm.
[out]viewPointThe resulting 2D viewport coordinate in pixels.

◆ PrintSelf()

void mitk::BaseRenderer::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

◆ RegisterLocalStorageHandler()

void mitk::BaseRenderer::RegisterLocalStorageHandler ( BaseLocalStorageHandler *  lsh)

Register a local storage handler with this renderer.

Parameters
[in]lshThe local storage handler to register.

Referenced by mitk::LocalStorageHandler< L >::GetLocalStorage().

◆ RemoveAllLocalStorages()

void mitk::BaseRenderer::RemoveAllLocalStorages ( )

Remove all registered local storages and notify observers via RendererResetEvent.

◆ RemoveInstance()

static void mitk::BaseRenderer::RemoveInstance ( vtkRenderWindow *  renderWindow)
static

Remove the BaseRenderer registration for the given vtkRenderWindow.

Parameters
[in]renderWindowThe vtkRenderWindow whose registration should be removed.

◆ RequestUpdate()

void mitk::BaseRenderer::RequestUpdate ( )

Request an asynchronous rendering update for this render window via the RenderingManager.

Also constrains zooming and panning before requesting the update.

◆ Resize()

virtual void mitk::BaseRenderer::Resize ( int  w,
int  h 
)
virtual

Set a new size for the render window.

Parameters
[in]wWidth in pixels.
[in]hHeight in pixels.

Reimplemented in mitk::VtkPropRenderer.

◆ SendUpdateSlice()

void mitk::BaseRenderer::SendUpdateSlice ( )

Modify the update time of the current world plane geometry and force reslicing.

◆ SetConstrainZoomingAndPanning()

virtual void mitk::BaseRenderer::SetConstrainZoomingAndPanning ( bool  constrain)
virtual

Enable or disable constraining of zooming and panning.

When enabled, the camera controller is adjusted to fit the plane.

Parameters
[in]constrainTrue to constrain zooming and panning, false to allow free navigation.

◆ SetCurrentWorldGeometry()

virtual void mitk::BaseRenderer::SetCurrentWorldGeometry ( const BaseGeometry *  geometry)
protectedvirtual

◆ SetCurrentWorldPlaneGeometry()

virtual void mitk::BaseRenderer::SetCurrentWorldPlaneGeometry ( const PlaneGeometry *  geometry2d)
protectedvirtual

◆ SetDataStorage()

virtual void mitk::BaseRenderer::SetDataStorage ( DataStorage *  storage)
virtual

Set the DataStorage used by this renderer.

The DataStorage provides the data nodes whose contents are rendered. Also updates the dispatcher's data storage reference.

Parameters
[in]storageThe DataStorage to use. If nullptr, no change is made.

Reimplemented in mitk::VtkPropRenderer.

◆ SetGeometry()

virtual void mitk::BaseRenderer::SetGeometry ( const itk::EventObject &  geometrySliceEvent)
virtual

Set the world time geometry using the geometry of the given event.

The function is triggered by a SliceNavigationController::GeometrySendEvent.

◆ SetGeometrySlice()

virtual void mitk::BaseRenderer::SetGeometrySlice ( const itk::EventObject &  geometrySliceEvent)
virtual

Set the current slice using "SetSlice" and update the current world geometry and the current world plane geometry.

The function is triggered by a SliceNavigationController::GeometrySliceEvent.

◆ SetGeometryTime()

virtual void mitk::BaseRenderer::SetGeometryTime ( const itk::EventObject &  geometryTimeEvent)
virtual

Set the current time using "SetTimeStep" and update the current world geometry and the current world plane geometry.

The function is triggered by a TimeNavigationController::TimeEvent.

◆ SetInteractionReferenceGeometry()

virtual void mitk::BaseRenderer::SetInteractionReferenceGeometry ( const TimeGeometry *  geometry)
virtual

Set the interaction reference world time geometry using the given TimeGeometry.

Setting a new interaction reference world time geometry also updates the alignment status of the reference geometry, which can be retrieved using 'GetReferenceGeometryAligned'. Using a nullptr as the interaction reference geomertry implies that no requirements on the geometry exist, thus in this case any check will result in 'ReferenceGeometryAligned' being true.

Parameters
geometryThe reference geometry used for render window interaction.

◆ SetKeepDisplayedRegion()

virtual void mitk::BaseRenderer::SetKeepDisplayedRegion ( bool  _arg)
virtual

◆ SetMapperID()

virtual void mitk::BaseRenderer::SetMapperID ( MapperSlotId  id)
virtual

Set the used mapperID.

Reimplemented in mitk::VtkPropRenderer.

◆ SetSlice()

virtual void mitk::BaseRenderer::SetSlice ( unsigned int  slice)
virtual

Set the slice that should be used for geometry extraction.

The slice defines the current slice-extracted 2D-geometry (CurrentWorldPlaneGeometry). Setting a new slice will update the current world geometry and the current world plane geometry.

◆ SetSliceNavigationController()

void mitk::BaseRenderer::SetSliceNavigationController ( SliceNavigationController *  SlicenavigationController)

Replace the current SliceNavigationController.

Copies the world geometry from the new controller, connects geometry events, and sets the renderer reference on the new controller.

Parameters
[in]SlicenavigationControllerThe new SliceNavigationController. Ignored if nullptr.

◆ SetTimeStep()

virtual void mitk::BaseRenderer::SetTimeStep ( unsigned int  timeStep)
virtual

Set the timestep that should be used for geometry extraction.

The timestep defines the current time-extracted 3D-geometry (CurrentWorldGeometry). Setting a new timestep will update the current world geometry and the current world plane geometry.

◆ SetWorldGeometryToDataStorageBounds()

virtual bool mitk::BaseRenderer::SetWorldGeometryToDataStorageBounds ( )
inlinevirtual

Set the world geometry so that it encompasses all objects in the DataStorage.

Returns
true if the geometry was successfully updated, false otherwise.
Note
Default implementation returns false; subclasses may override.

Reimplemented in mitk::VtkPropRenderer.

Definition at line 293 of file mitkBaseRenderer.h.

◆ SetWorldTimeGeometry()

virtual void mitk::BaseRenderer::SetWorldTimeGeometry ( const TimeGeometry *  geometry)
virtual

Set the world time geometry using the given TimeGeometry.

Setting a new world time geometry updates the current world geometry and the current world plane geometry, using the currently selected slice and timestep.

◆ UnregisterLocalStorageHandler()

void mitk::BaseRenderer::UnregisterLocalStorageHandler ( BaseLocalStorageHandler *  lsh)

Unregister a previously registered local storage handler.

Parameters
[in]lshThe local storage handler to unregister.

Referenced by mitk::LocalStorageHandler< L >::ClearLocalStorage().

◆ Update()

virtual void mitk::BaseRenderer::Update ( )
protectedpure virtual

Implemented in mitk::VtkPropRenderer.

◆ UpdateCurrentGeometries()

void mitk::BaseRenderer::UpdateCurrentGeometries ( )
protected

◆ UpdateGeometry()

virtual void mitk::BaseRenderer::UpdateGeometry ( const itk::EventObject &  geometrySliceEvent)
virtual

Set the current world plane geometry using the existing current world geometry.

The function is triggered by a SliceNavigationController::GeometryUpdateEvent.

◆ WorldToDisplay()

void mitk::BaseRenderer::WorldToDisplay ( const Point3D &  worldIndex,
Point2D &  displayPoint 
) const

Convert a 3D world coordinate to a 2D display point.

Parameters
[in]worldIndex3D world coordinate.
[out]displayPointThe resulting 2D display coordinate in pixels.

◆ WorldToView()

void mitk::BaseRenderer::WorldToView ( const Point3D &  worldIndex,
Point2D &  viewPoint 
) const

Convert a 3D world coordinate to a 2D viewport point.

The viewport point is in pixels relative to the VTK viewport origin.

Parameters
[in]worldIndex3D world coordinate.
[out]viewPointThe resulting 2D viewport coordinate in pixels.

Member Data Documentation

◆ baseRendererMap

BaseRendererMapType mitk::BaseRenderer::baseRendererMap
static

Static map holding all registered BaseRenderer instances, keyed by their vtkRenderWindow.

Definition at line 74 of file mitkBaseRenderer.h.

◆ m_Bounds

double mitk::BaseRenderer::m_Bounds[6]
protected

Definition at line 676 of file mitkBaseRenderer.h.

◆ m_CameraController

CameraController::Pointer mitk::BaseRenderer::m_CameraController
protected

Definition at line 607 of file mitkBaseRenderer.h.

◆ m_CameraRotationController

CameraRotationController::Pointer mitk::BaseRenderer::m_CameraRotationController
protected

Definition at line 608 of file mitkBaseRenderer.h.

◆ m_ConstrainZoomingAndPanning

bool mitk::BaseRenderer::m_ConstrainZoomingAndPanning
protected

Definition at line 686 of file mitkBaseRenderer.h.

◆ m_CurrentWorldPlaneGeometryData

PlaneGeometryData::Pointer mitk::BaseRenderer::m_CurrentWorldPlaneGeometryData
protected

Definition at line 670 of file mitkBaseRenderer.h.

◆ m_CurrentWorldPlaneGeometryNode

DataNode::Pointer mitk::BaseRenderer::m_CurrentWorldPlaneGeometryNode
protected

Definition at line 671 of file mitkBaseRenderer.h.

◆ m_CurrentWorldPlaneGeometryTransformTime

unsigned long mitk::BaseRenderer::m_CurrentWorldPlaneGeometryTransformTime
protected

Definition at line 672 of file mitkBaseRenderer.h.

◆ m_DataStorage

DataStorage::Pointer mitk::BaseRenderer::m_DataStorage
protected

Definition at line 604 of file mitkBaseRenderer.h.

◆ m_EmptyWorldGeometry

bool mitk::BaseRenderer::m_EmptyWorldGeometry
protected

Definition at line 678 of file mitkBaseRenderer.h.

◆ m_LastUpdateTime

unsigned long mitk::BaseRenderer::m_LastUpdateTime
protected

Definition at line 605 of file mitkBaseRenderer.h.

◆ m_MapperID

MapperSlotId mitk::BaseRenderer::m_MapperID
protected

Definition at line 603 of file mitkBaseRenderer.h.

◆ m_Name

std::string mitk::BaseRenderer::m_Name
protected

Definition at line 674 of file mitkBaseRenderer.h.

◆ m_NumberOfVisibleLODEnabledMappers

unsigned int mitk::BaseRenderer::m_NumberOfVisibleLODEnabledMappers
protected

Definition at line 682 of file mitkBaseRenderer.h.

◆ m_RegisteredLocalStorageHandlers

std::list<BaseLocalStorageHandler*> mitk::BaseRenderer::m_RegisteredLocalStorageHandlers
protected

Definition at line 684 of file mitkBaseRenderer.h.

◆ m_RenderWindow

vtkRenderWindow* mitk::BaseRenderer::m_RenderWindow
protected

Definition at line 600 of file mitkBaseRenderer.h.

◆ m_SliceNavigationController

SliceNavigationController::Pointer mitk::BaseRenderer::m_SliceNavigationController
protected

Definition at line 609 of file mitkBaseRenderer.h.

◆ m_VtkRenderer

vtkRenderer* mitk::BaseRenderer::m_VtkRenderer
protected

Definition at line 601 of file mitkBaseRenderer.h.


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