Medical Imaging Interaction Toolkit  2018.4.99-ae21cdc4
Medical Imaging Interaction Toolkit

Organizes the rendering process. More...

#include <mitkBaseRenderer.h>

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

Public Types

enum  StandardMapperSlot { Standard2D, Standard3D }
 
enum  ViewDirection { ViewDirection::AXIAL, ViewDirection::SAGITTAL, ViewDirection::CORONAL, ViewDirection::THREE_D }
 Possible view directions for render windows. More...
 
typedef std::map< vtkRenderWindow *, BaseRenderer * > BaseRendererMapType
 
typedef BaseRenderer Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef int MapperSlotId
 MapperSlotId defines which kind of mapper (e.g. 2D or 3D) should be used. More...
 

Public Member Functions

 itkEventMacro (RendererResetEvent, itk::AnyEvent)
 
virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
 BaseRenderer (const char *name=nullptr, vtkRenderWindow *renWin=nullptr)
 
virtual void SetDataStorage (DataStorage *storage)
 set the datastorage that will be used for rendering More...
 
virtual DataStorage::Pointer GetDataStorage () const
 
vtkRenderWindow * GetRenderWindow () const
 Access the RenderWindow into which this renderer renders. More...
 
vtkRenderer * GetVtkRenderer () const
 
Dispatcher::Pointer GetDispatcher () const
 Returns the Dispatcher which handles Events for this BaseRenderer. More...
 
virtual void Paint ()
 Do the rendering and flush the result. More...
 
virtual void Initialize ()
 Initialize the RenderWindow. Should only be called from RenderWindow. More...
 
virtual void Resize (int w, int h)
 Called to inform the renderer that the RenderWindow has been resized. More...
 
virtual void InitRenderer (vtkRenderWindow *renderwindow)
 Initialize the renderer with a RenderWindow (renderwindow). More...
 
virtual void InitSize (int w, int h)
 Set the initial size. Called by RenderWindow after it has become visible for the first time. More...
 
virtual void DrawOverlayMouse (Point2D &p2d)
 Draws a point on the widget. Should be used during conferences to show the position of the remote mouse. More...
 
virtual void SetWorldGeometry3D (const BaseGeometry *geometry)
 Set/Get the WorldGeometry (m_WorldGeometry) for 3D and 2D rendering, that describing the (maximal) area to be rendered. More...
 
virtual void SetWorldTimeGeometry (const mitk::TimeGeometry *geometry)
 
void SetWorldGeometry3D (TimeSlicedGeometry *geometry)
 
virtual const TimeGeometryGetWorldTimeGeometry ()
 
virtual const BaseGeometryGetCurrentWorldGeometry ()
 Get the current 3D-worldgeometry (m_CurrentWorldGeometry) used for 3D-rendering. More...
 
virtual const PlaneGeometryGetCurrentWorldPlaneGeometry ()
 Get the current 2D-worldgeometry (m_CurrentWorldPlaneGeometry) used for 2D-rendering. More...
 
const PlaneGeometryGetCurrentWorldGeometry2D ()
 
virtual bool SetWorldGeometryToDataStorageBounds ()
 
virtual void SetSlice (unsigned int slice)
 Set/Get m_Slice which defines together with m_TimeStep the 2D geometry stored in m_WorldTimeGeometry used as m_CurrentWorldPlaneGeometry. More...
 
virtual unsigned int GetSlice () const
 
virtual void SetTimeStep (unsigned int timeStep)
 Set/Get m_TimeStep which defines together with m_Slice the 2D geometry stored in m_WorldTimeGeometry used as m_CurrentWorldPlaneGeometry. More...
 
virtual unsigned int GetTimeStep () const
 
int GetTimeStep (const BaseData *data) const
 Get the time-step 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 displayed content. More...
 
virtual void SetGeometry (const itk::EventObject &geometrySliceEvent)
 SetWorldGeometry is called according to the geometrySliceEvent, which is supposed to be a SliceNavigationController::GeometrySendEvent. More...
 
virtual void UpdateGeometry (const itk::EventObject &geometrySliceEvent)
 UpdateWorldGeometry is called to re-read the 2D geometry from the slice navigation controller. More...
 
virtual void SetGeometrySlice (const itk::EventObject &geometrySliceEvent)
 SetSlice is called according to the geometrySliceEvent, which is supposed to be a SliceNavigationController::GeometrySliceEvent. More...
 
virtual void SetGeometryTime (const itk::EventObject &geometryTimeEvent)
 SetTimeStep is called according to the geometrySliceEvent, which is supposed to be a SliceNavigationController::GeometryTimeEvent. More...
 
virtual DataNodeGetCurrentWorldPlaneGeometryNode ()
 Get a DataNode pointing to a data object containing the current 2D-worldgeometry. More...
 
DataNodeGetCurrentWorldGeometry2DNode ()
 
void SendUpdateSlice ()
 Sets timestamp of CurrentWorldPlaneGeometry and forces so reslicing in that renderwindow. More...
 
unsigned long GetCurrentWorldPlaneGeometryUpdateTime ()
 Get timestamp of last call of SetCurrentWorldPlaneGeometry. More...
 
unsigned long GetCurrentWorldGeometry2DUpdateTime ()
 
unsigned long GetTimeStepUpdateTime ()
 Get timestamp of last change of current TimeStep. More...
 
virtual void PickWorldPoint (const Point2D &diplayPosition, Point3D &worldPosition) const =0
 Perform a picking: find the x,y,z world coordinate of a display x,y coordinate. More...
 
virtual DataNodePickObject (const Point2D &, Point3D &) const
 Determines the object (mitk::DataNode) closest to the current position by means of picking. More...
 
virtual MapperSlotId GetMapperID ()
 Get the MapperSlotId to use. More...
 
virtual MapperSlotId GetMapperID () const
 
virtual void SetMapperID (MapperSlotId id)
 Set the MapperSlotId to use. More...
 
virtual int * GetSize () const
 
virtual int * GetViewportSize () const
 
void SetSliceNavigationController (SliceNavigationController *SlicenavigationController)
 
virtual CameraControllerGetCameraController ()
 
virtual SliceNavigationControllerGetSliceNavigationController ()
 
virtual CameraRotationControllerGetCameraRotationController ()
 
virtual bool GetEmptyWorldGeometry ()
 
virtual bool GetKeepDisplayedRegion ()
 Tells if the displayed region is shifted and rescaled if the render window is resized. More...
 
virtual void SetKeepDisplayedRegion (bool _arg)
 Tells if the displayed region should be shifted and rescaled if the render window is resized. More...
 
const char * GetName () const
 get the name of the Renderer More...
 
int GetSizeX () const
 get the x_size of the RendererWindow More...
 
int GetSizeY () const
 get the y_size of the RendererWindow More...
 
const double * GetBounds () const
 
void RequestUpdate ()
 
void ForceImmediateUpdate ()
 
unsigned int GetNumberOfVisibleLODEnabledMappers () const
 
void DisplayToWorld (const Point2D &displayPoint, Point3D &worldIndex) const
 This method converts a display point to the 3D world index using the geometry of the renderWindow. More...
 
void DisplayToPlane (const Point2D &displayPoint, Point2D &planePointInMM) const
 This method converts a display point to the 2D world index, mapped onto the display plane using the geometry of the renderWindow. More...
 
void WorldToDisplay (const Point3D &worldIndex, Point2D &displayPoint) const
 This method converts a 3D world index to the display point using the geometry of the renderWindow. More...
 
void WorldToView (const Point3D &worldIndex, Point2D &viewPoint) const
 This method converts a 3D world index to the point on the viewport using the geometry of the renderWindow. More...
 
void PlaneToDisplay (const Point2D &planePointInMM, Point2D &displayPoint) const
 This method converts a 2D plane coordinate to the display point using the geometry of the renderWindow. More...
 
void PlaneToView (const Point2D &planePointInMM, Point2D &viewPoint) const
 This method converts a 2D plane coordinate to the point on the viewport using the geometry of the renderWindow. More...
 
double GetScaleFactorMMPerDisplayUnit () const
 
Point2D GetDisplaySizeInMM () const
 
Point2D GetViewportSizeInMM () const
 
Point2D GetOriginInMM () const
 
virtual bool GetConstrainZoomingAndPanning () const
 
virtual void SetConstrainZoomingAndPanning (bool constrain)
 
virtual Point3D Map2DRendererPositionTo3DWorldPosition (const Point2D &mousePosition) const
 Provides (1) world coordinates for a given mouse position and (2) translates mousePosition to Display coordinates. More...
 
void RemoveAllLocalStorages ()
 
void RegisterLocalStorageHandler (mitk::BaseLocalStorageHandler *lsh)
 
void UnregisterLocalStorageHandler (mitk::BaseLocalStorageHandler *lsh)
 

Static Public Member Functions

static BaseRendererGetInstance (vtkRenderWindow *renWin)
 
static void AddInstance (vtkRenderWindow *renWin, BaseRenderer *baseRenderer)
 
static void RemoveInstance (vtkRenderWindow *renWin)
 
static BaseRendererGetByName (const std::string &name)
 
static vtkRenderWindow * GetRenderWindowByName (const std::string &name)
 
static const char * GetStaticNameOfClass ()
 

Static Public Attributes

static BaseRendererMapType baseRendererMap
 
static const MapperSlotId defaultMapper
 Default mapper id to use. More...
 

Protected Types

typedef std::set< Mapper * > LODEnabledMappersType
 

Protected Member Functions

 ~BaseRenderer () override
 
virtual void Update ()=0
 Call update of all mappers. To be implemented in subclasses. More...
 
virtual void SetCurrentWorldPlaneGeometry (const PlaneGeometry *geometry2d)
 Sets m_CurrentWorldPlaneGeometry. More...
 
void SetCurrentWorldGeometry2D (PlaneGeometry *geometry2d)
 
virtual void SetCurrentWorldGeometry (const BaseGeometry *geometry)
 Sets m_CurrentWorldGeometry. More...
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Protected Attributes

vtkRenderWindow * m_RenderWindow
 
vtkRenderer * m_VtkRenderer
 
MapperSlotId m_MapperID
 MapperSlotId to use. Defines which kind of mapper (e.g., 2D or 3D) shoud be used. More...
 
DataStorage::Pointer m_DataStorage
 The DataStorage that is used for rendering. More...
 
unsigned long m_LastUpdateTime
 Timestamp of last call of Update(). More...
 
itk::SmartPointer< CameraControllerm_CameraController
 CameraController for 3D rendering. More...
 
SliceNavigationController::Pointer m_SliceNavigationController
 
CameraRotationController::Pointer m_CameraRotationController
 
PlaneGeometryData::Pointer m_CurrentWorldPlaneGeometryData
 
DataNode::Pointer m_CurrentWorldPlaneGeometryNode
 
unsigned long m_CurrentWorldPlaneGeometryTransformTime
 test only More...
 
std::string m_Name
 
double m_Bounds [6]
 
bool m_EmptyWorldGeometry
 
unsigned int m_NumberOfVisibleLODEnabledMappers
 
std::list< mitk::BaseLocalStorageHandler * > m_RegisteredLocalStorageHandlers
 
bool m_ConstrainZoomingAndPanning
 

Detailed Description

Organizes the rendering process.

Organizes the rendering process. A Renderer contains a reference to a DataStorage and asks the mappers of the data objects to render the data into the renderwindow it is associated to.

#Render() checks if rendering is currently allowed by calling RenderWindow::PrepareRendering(). Initialization of a rendering context can also be performed in this method.

The actual rendering code has been moved to #Repaint() Both #Repaint() and #Update() are declared protected now.

Note: Separation of the Repaint and Update processes (rendering vs creating a vtk prop tree) still needs to be worked on. The whole rendering process also should be reworked to use VTK based classes for both 2D and 3D rendering.

Definition at line 65 of file mitkBaseRenderer.h.

Member Typedef Documentation

◆ BaseRendererMapType

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

Definition at line 68 of file mitkBaseRenderer.h.

◆ ConstPointer

Definition at line 83 of file mitkBaseRenderer.h.

◆ LODEnabledMappersType

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

Definition at line 512 of file mitkBaseRenderer.h.

◆ MapperSlotId

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

Definition at line 89 of file mitkBaseRenderer.h.

◆ Pointer

◆ Self

Standard class typedefs.

Definition at line 83 of file mitkBaseRenderer.h.

◆ Superclass

typedef itk::Object mitk::BaseRenderer::Superclass

Definition at line 83 of file mitkBaseRenderer.h.

Member Enumeration Documentation

◆ StandardMapperSlot

Enumerator
Standard2D 
Standard3D 

Definition at line 91 of file mitkBaseRenderer.h.

◆ ViewDirection

Possible view directions for render windows.

Enumerator
AXIAL 
SAGITTAL 
CORONAL 
THREE_D 

Definition at line 99 of file mitkBaseRenderer.h.

Constructor & Destructor Documentation

◆ BaseRenderer()

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

◆ ~BaseRenderer()

mitk::BaseRenderer::~BaseRenderer ( )
overrideprotected

Member Function Documentation

◆ AddInstance()

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

◆ DisplayToPlane()

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

This method converts a display point to the 2D world index, mapped onto the display plane using the geometry of the renderWindow.

◆ DisplayToWorld()

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

This method converts a display point to the 3D world index using the geometry of the renderWindow.

◆ DrawOverlayMouse()

virtual void mitk::BaseRenderer::DrawOverlayMouse ( Point2D p2d)
virtual

Draws a point on the widget. Should be used during conferences to show the position of the remote mouse.

◆ ForceImmediateUpdate()

void mitk::BaseRenderer::ForceImmediateUpdate ( )

◆ GetBounds()

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

◆ GetByName()

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

◆ GetCameraController()

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

◆ GetCameraRotationController()

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

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::BaseRenderer::GetClassHierarchy ( ) const
inlinevirtual

Reimplemented in mitk::VtkPropRenderer.

Definition at line 83 of file mitkBaseRenderer.h.

◆ GetClassName()

virtual const char* mitk::BaseRenderer::GetClassName ( ) const
virtual

Reimplemented in mitk::VtkPropRenderer.

◆ GetConstrainZoomingAndPanning()

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

◆ GetCurrentWorldGeometry()

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

Get the current 3D-worldgeometry (m_CurrentWorldGeometry) used for 3D-rendering.

◆ GetCurrentWorldGeometry2D()

const PlaneGeometry* mitk::BaseRenderer::GetCurrentWorldGeometry2D ( )
inline
Deprecated:
(as of 2014_10) Please use GetCurrentWorldPlaneGeometry

Definition at line 190 of file mitkBaseRenderer.h.

◆ GetCurrentWorldGeometry2DNode()

DataNode* mitk::BaseRenderer::GetCurrentWorldGeometry2DNode ( )
inline
Deprecated:
(as of 2014_10) Please use GetCurrentWorldPlaneGeometryNode

Definition at line 264 of file mitkBaseRenderer.h.

◆ GetCurrentWorldGeometry2DUpdateTime()

unsigned long mitk::BaseRenderer::GetCurrentWorldGeometry2DUpdateTime ( )
inline
Deprecated:
(as of 2014_10) Please use GetCurrentWorldPlaneGeometryUpdateTime

Definition at line 279 of file mitkBaseRenderer.h.

◆ GetCurrentWorldPlaneGeometry()

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

Get the current 2D-worldgeometry (m_CurrentWorldPlaneGeometry) used for 2D-rendering.

◆ GetCurrentWorldPlaneGeometryNode()

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

Get a DataNode pointing to a data object containing the current 2D-worldgeometry.

◆ GetCurrentWorldPlaneGeometryUpdateTime()

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

Get timestamp of last call of SetCurrentWorldPlaneGeometry.

Definition at line 275 of file mitkBaseRenderer.h.

◆ GetDataStorage()

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

return the DataStorage that is used for rendering

Definition at line 111 of file mitkBaseRenderer.h.

◆ GetDispatcher()

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

Returns the Dispatcher which handles Events for this BaseRenderer.

◆ GetDisplaySizeInMM()

Point2D mitk::BaseRenderer::GetDisplaySizeInMM ( ) const

◆ GetEmptyWorldGeometry()

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

◆ GetInstance()

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

◆ GetKeepDisplayedRegion()

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

Tells if the displayed region is shifted and rescaled if the render window is resized.

◆ GetMapperID() [1/2]

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

Get the MapperSlotId to use.

◆ GetMapperID() [2/2]

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

◆ GetName()

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

get the name of the Renderer

Note

Definition at line 332 of file mitkBaseRenderer.h.

◆ GetNumberOfVisibleLODEnabledMappers()

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

Returns number of mappers which are visible and have level-of-detail rendering enabled

◆ GetOriginInMM()

Point2D mitk::BaseRenderer::GetOriginInMM ( ) const

◆ GetRenderWindow()

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

Access the RenderWindow into which this renderer renders.

Definition at line 114 of file mitkBaseRenderer.h.

◆ GetRenderWindowByName()

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

◆ GetScaleFactorMMPerDisplayUnit()

double mitk::BaseRenderer::GetScaleFactorMMPerDisplayUnit ( ) const

◆ GetSize()

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

◆ GetSizeX()

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

get the x_size of the RendererWindow

Note

Definition at line 340 of file mitkBaseRenderer.h.

◆ GetSizeY()

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

get the y_size of the RendererWindow

Note

Definition at line 344 of file mitkBaseRenderer.h.

References DEPRECATED.

◆ GetSlice()

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

◆ GetSliceNavigationController()

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

◆ GetStaticNameOfClass()

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

Definition at line 83 of file mitkBaseRenderer.h.

◆ GetTime()

ScalarType mitk::BaseRenderer::GetTime ( ) const

Get the time in ms of the currently displayed content.

See also
GetTimeStep, m_TimeStep

◆ GetTimeStep() [1/2]

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

◆ GetTimeStep() [2/2]

int mitk::BaseRenderer::GetTimeStep ( const BaseData data) const

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

Returns -1 or mitk::BaseData::m_TimeSteps if there is no data at the current time.

See also
GetTimeStep, m_TimeStep

◆ GetTimeStepUpdateTime()

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

Get timestamp of last change of current TimeStep.

Definition at line 285 of file mitkBaseRenderer.h.

◆ GetViewportSize()

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

◆ GetViewportSizeInMM()

Point2D mitk::BaseRenderer::GetViewportSizeInMM ( ) const

◆ GetVtkRenderer()

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

Definition at line 115 of file mitkBaseRenderer.h.

◆ GetWorldTimeGeometry()

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

◆ Initialize()

virtual void mitk::BaseRenderer::Initialize ( )
virtual

Initialize the RenderWindow. Should only be called from RenderWindow.

◆ InitRenderer()

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

Initialize the renderer with a RenderWindow (renderwindow).

Reimplemented in mitk::VtkPropRenderer.

◆ InitSize()

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

Set the initial size. Called by RenderWindow after it has become visible for the first time.

Reimplemented in mitk::VtkPropRenderer.

◆ itkEventMacro()

mitk::BaseRenderer::itkEventMacro ( RendererResetEvent  ,
itk::AnyEvent   
)

◆ Map2DRendererPositionTo3DWorldPosition()

virtual Point3D mitk::BaseRenderer::Map2DRendererPositionTo3DWorldPosition ( const Point2D mousePosition) const
virtual

Provides (1) world coordinates for a given mouse position and (2) translates mousePosition to Display coordinates.

Deprecated:
Map2DRendererPositionTo3DWorldPosition is deprecated. Please use DisplayToWorld instead.

◆ Paint()

virtual void mitk::BaseRenderer::Paint ( )
virtual

Do the rendering and flush the result.

◆ 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 299 of file mitkBaseRenderer.h.

◆ PickWorldPoint()

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

Perform a picking: find the x,y,z world coordinate of a display x,y coordinate.

Warning
Has to be overwritten in subclasses for the 3D-case.

Implemented here only for 2D-rendering

Implemented in mitk::VtkPropRenderer.

◆ PlaneToDisplay()

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

This method converts a 2D plane coordinate to the display point using the geometry of the renderWindow.

◆ PlaneToView()

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

This method converts a 2D plane coordinate to the point on the viewport using the geometry of the renderWindow.

◆ PrintSelf()

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

◆ RegisterLocalStorageHandler()

◆ RemoveAllLocalStorages()

void mitk::BaseRenderer::RemoveAllLocalStorages ( )

◆ RemoveInstance()

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

◆ RequestUpdate()

void mitk::BaseRenderer::RequestUpdate ( )

◆ Resize()

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

Called to inform the renderer that the RenderWindow has been resized.

Reimplemented in mitk::VtkPropRenderer.

◆ SendUpdateSlice()

void mitk::BaseRenderer::SendUpdateSlice ( )

Sets timestamp of CurrentWorldPlaneGeometry and forces so reslicing in that renderwindow.

◆ SetConstrainZoomingAndPanning()

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

◆ SetCurrentWorldGeometry()

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

Sets m_CurrentWorldGeometry.

◆ SetCurrentWorldGeometry2D()

void mitk::BaseRenderer::SetCurrentWorldGeometry2D ( PlaneGeometry geometry2d)
inlineprotected
Deprecated:
(as of 2014_10) Please use SetCurrentWorldPlaneGeometry

Definition at line 436 of file mitkBaseRenderer.h.

◆ SetCurrentWorldPlaneGeometry()

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

Sets m_CurrentWorldPlaneGeometry.

◆ SetDataStorage()

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

set the datastorage that will be used for rendering

Reimplemented in mitk::VtkPropRenderer.

◆ SetGeometry()

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

SetWorldGeometry is called according to the geometrySliceEvent, which is supposed to be a SliceNavigationController::GeometrySendEvent.

◆ SetGeometrySlice()

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

SetSlice is called according to the geometrySliceEvent, which is supposed to be a SliceNavigationController::GeometrySliceEvent.

◆ SetGeometryTime()

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

SetTimeStep is called according to the geometrySliceEvent, which is supposed to be a SliceNavigationController::GeometryTimeEvent.

◆ SetKeepDisplayedRegion()

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

Tells if the displayed region should be shifted and rescaled if the render window is resized.

◆ SetMapperID()

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

Set the MapperSlotId to use.

Reimplemented in mitk::VtkPropRenderer.

◆ SetSlice()

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

Set/Get m_Slice which defines together with m_TimeStep the 2D geometry stored in m_WorldTimeGeometry used as m_CurrentWorldPlaneGeometry.

See also
m_Slice

◆ SetSliceNavigationController()

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

◆ SetTimeStep()

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

Set/Get m_TimeStep which defines together with m_Slice the 2D geometry stored in m_WorldTimeGeometry used as m_CurrentWorldPlaneGeometry.

See also
m_TimeStep

◆ SetWorldGeometry3D() [1/2]

virtual void mitk::BaseRenderer::SetWorldGeometry3D ( const BaseGeometry geometry)
virtual

Set/Get the WorldGeometry (m_WorldGeometry) for 3D and 2D rendering, that describing the (maximal) area to be rendered.

Depending of the type of the passed BaseGeometry more or less information can be extracted:

  • if it is a PlaneGeometry (which is a sub-class of BaseGeometry), m_CurrentWorldPlaneGeometry is also set to point to it. m_WorldTimeGeometry is set to nullptr.
  • if it is a TimeGeometry, m_WorldTimeGeometry is also set to point to it. If m_WorldTimeGeometry contains instances of SlicedGeometry3D, m_CurrentWorldPlaneGeometry is set to one of geometries stored in the SlicedGeometry3D according to the value of m_Slice; otherwise a PlaneGeometry describing the top of the bounding-box of the BaseGeometry is set as the m_CurrentWorldPlaneGeometry.
  • otherwise a PlaneGeometry describing the top of the bounding-box of the BaseGeometry is set as the m_CurrentWorldPlaneGeometry. m_WorldTimeGeometry is set to nullptr.
    See also
    m_WorldGeometry
    m_WorldTimeGeometry
    m_CurrentWorldPlaneGeometry

◆ SetWorldGeometry3D() [2/2]

void mitk::BaseRenderer::SetWorldGeometry3D ( TimeSlicedGeometry geometry)

◆ SetWorldGeometryToDataStorageBounds()

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

Calculates the bounds of the DataStorage (if it contains any valid data), creates a geometry from these bounds and sets it as world geometry of the renderer.

Call this method to re-initialize the renderer to the current DataStorage (e.g. after loading an additional dataset), to ensure that the view is aligned correctly. This is not implemented yet.

Reimplemented in mitk::VtkPropRenderer.

Definition at line 203 of file mitkBaseRenderer.h.

◆ SetWorldTimeGeometry()

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

◆ UnregisterLocalStorageHandler()

◆ Update()

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

Call update of all mappers. To be implemented in subclasses.

Implemented in mitk::VtkPropRenderer.

◆ UpdateGeometry()

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

UpdateWorldGeometry is called to re-read the 2D geometry from the slice navigation controller.

◆ WorldToDisplay()

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

This method converts a 3D world index to the display point using the geometry of the renderWindow.

◆ WorldToView()

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

This method converts a 3D world index to the point on the viewport using the geometry of the renderWindow.

Member Data Documentation

◆ baseRendererMap

BaseRendererMapType mitk::BaseRenderer::baseRendererMap
static

Definition at line 69 of file mitkBaseRenderer.h.

◆ defaultMapper

const MapperSlotId mitk::BaseRenderer::defaultMapper
static

Default mapper id to use.

Definition at line 122 of file mitkBaseRenderer.h.

◆ m_Bounds

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

Definition at line 508 of file mitkBaseRenderer.h.

◆ m_CameraController

itk::SmartPointer<CameraController> mitk::BaseRenderer::m_CameraController
protected

CameraController for 3D rendering.

Note
preliminary.

Definition at line 426 of file mitkBaseRenderer.h.

◆ m_CameraRotationController

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

Definition at line 428 of file mitkBaseRenderer.h.

◆ m_ConstrainZoomingAndPanning

bool mitk::BaseRenderer::m_ConstrainZoomingAndPanning
protected

Definition at line 523 of file mitkBaseRenderer.h.

◆ m_CurrentWorldPlaneGeometryData

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

Data object containing the m_CurrentWorldPlaneGeometry defined above.

Definition at line 496 of file mitkBaseRenderer.h.

◆ m_CurrentWorldPlaneGeometryNode

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

DataNode objects containing the m_CurrentWorldPlaneGeometryData defined above.

Definition at line 500 of file mitkBaseRenderer.h.

◆ m_CurrentWorldPlaneGeometryTransformTime

unsigned long mitk::BaseRenderer::m_CurrentWorldPlaneGeometryTransformTime
protected

test only

Definition at line 504 of file mitkBaseRenderer.h.

◆ m_DataStorage

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

The DataStorage that is used for rendering.

Definition at line 417 of file mitkBaseRenderer.h.

◆ m_EmptyWorldGeometry

bool mitk::BaseRenderer::m_EmptyWorldGeometry
protected

Definition at line 510 of file mitkBaseRenderer.h.

◆ m_LastUpdateTime

unsigned long mitk::BaseRenderer::m_LastUpdateTime
protected

Timestamp of last call of Update().

Definition at line 421 of file mitkBaseRenderer.h.

◆ m_MapperID

MapperSlotId mitk::BaseRenderer::m_MapperID
protected

MapperSlotId to use. Defines which kind of mapper (e.g., 2D or 3D) shoud be used.

Definition at line 413 of file mitkBaseRenderer.h.

◆ m_Name

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

Definition at line 506 of file mitkBaseRenderer.h.

◆ m_NumberOfVisibleLODEnabledMappers

unsigned int mitk::BaseRenderer::m_NumberOfVisibleLODEnabledMappers
protected

Number of mappers which are visible and have level-of-detail rendering enabled

Definition at line 516 of file mitkBaseRenderer.h.

◆ m_RegisteredLocalStorageHandlers

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

Definition at line 521 of file mitkBaseRenderer.h.

◆ m_RenderWindow

vtkRenderWindow* mitk::BaseRenderer::m_RenderWindow
protected

Definition at line 408 of file mitkBaseRenderer.h.

◆ m_SliceNavigationController

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

Definition at line 427 of file mitkBaseRenderer.h.

◆ m_VtkRenderer

vtkRenderer* mitk::BaseRenderer::m_VtkRenderer
protected

Definition at line 409 of file mitkBaseRenderer.h.


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