Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::VtkLayerController Class Reference

#include <mitkVtkLayerController.h>

Collaboration diagram for mitk::VtkLayerController:

Public Member Functions

 VtkLayerController (vtkSmartPointer< vtkRenderWindow > renderWindow)
 
virtual ~VtkLayerController ()
 
vtkSmartPointer< vtkRenderer > GetSceneRenderer ()
 
void InsertBackgroundRenderer (vtkSmartPointer< vtkRenderer > renderer, bool forceAbsoluteBackground)
 
void InsertForegroundRenderer (vtkSmartPointer< vtkRenderer > renderer, bool forceAbsoluteForeground)
 
void InsertSceneRenderer (vtkSmartPointer< vtkRenderer > renderer)
 
void SetRenderWindow (vtkSmartPointer< vtkRenderWindow > renwin)
 
void RemoveRenderer (vtkSmartPointer< vtkRenderer > renderer)
 
bool IsRendererInserted (vtkSmartPointer< vtkRenderer > renderer)
 
unsigned int GetNumberOfRenderers ()
 
void SetEraseForAllRenderers (int i)
 

Static Public Member Functions

static VtkLayerControllerGetInstance (vtkSmartPointer< vtkRenderWindow > renWin)
 
static void AddInstance (vtkSmartPointer< vtkRenderWindow > renWin, vtkSmartPointer< vtkRenderer > mitkSceneRenderer)
 
static void RemoveInstance (vtkSmartPointer< vtkRenderWindow > renWin)
 

Protected Attributes

vtkSmartPointer< vtkRenderWindow > m_RenderWindow
 

Detailed Description

Manages the VTK layer hierarchy of a vtkRenderWindow. For simple access the layers are divided into three main groups: background, scene and foreground layers. Renderers can be registered via the insert... functions and removed via the RemoveRenderer function.

Definition at line 34 of file mitkVtkLayerController.h.

Constructor & Destructor Documentation

◆ VtkLayerController()

mitk::VtkLayerController::VtkLayerController ( vtkSmartPointer< vtkRenderWindow >  renderWindow)

◆ ~VtkLayerController()

virtual mitk::VtkLayerController::~VtkLayerController ( )
virtual

Member Function Documentation

◆ AddInstance()

static void mitk::VtkLayerController::AddInstance ( vtkSmartPointer< vtkRenderWindow >  renWin,
vtkSmartPointer< vtkRenderer >  mitkSceneRenderer 
)
static

◆ GetInstance()

static VtkLayerController* mitk::VtkLayerController::GetInstance ( vtkSmartPointer< vtkRenderWindow >  renWin)
static

◆ GetNumberOfRenderers()

unsigned int mitk::VtkLayerController::GetNumberOfRenderers ( )

Returns the number of renderers in the renderwindow.

◆ GetSceneRenderer()

vtkSmartPointer<vtkRenderer> mitk::VtkLayerController::GetSceneRenderer ( )

Returns the current vtkRenderer of the Scene

◆ InsertBackgroundRenderer()

void mitk::VtkLayerController::InsertBackgroundRenderer ( vtkSmartPointer< vtkRenderer >  renderer,
bool  forceAbsoluteBackground 
)

Connects a VTK renderer with a vtk renderwindow. The renderer will be rendered in the background. With forceAbsoluteBackground set true a renderer can be placed at the absolute background of the scene. Multiple calls with forceAbsoluteBackground set true will set the latest registered renderer as background.

◆ InsertForegroundRenderer()

void mitk::VtkLayerController::InsertForegroundRenderer ( vtkSmartPointer< vtkRenderer >  renderer,
bool  forceAbsoluteForeground 
)

Connects a VTK renderer with a vtk renderwindow. The renderer will be rendered in the foreground. With forceAbsoluteBackground set true a renderer can be placed at the absolute foreground of the scene. Multiple calls with forceAbsoluteForeground set true will set the latest registered renderer as foreground.

◆ InsertSceneRenderer()

void mitk::VtkLayerController::InsertSceneRenderer ( vtkSmartPointer< vtkRenderer >  renderer)

Connects a VTK renderer with a vtk renderwindow. The renderer will be rendered between background renderers and foreground renderers.

◆ IsRendererInserted()

bool mitk::VtkLayerController::IsRendererInserted ( vtkSmartPointer< vtkRenderer >  renderer)

Returns true if a renderer has been inserted

◆ RemoveInstance()

static void mitk::VtkLayerController::RemoveInstance ( vtkSmartPointer< vtkRenderWindow >  renWin)
static

◆ RemoveRenderer()

void mitk::VtkLayerController::RemoveRenderer ( vtkSmartPointer< vtkRenderer >  renderer)

A renderer which has been inserted via a insert... function can be removed from the vtkRenderWindow with RemoveRenderer.

◆ SetEraseForAllRenderers()

void mitk::VtkLayerController::SetEraseForAllRenderers ( int  i)

◆ SetRenderWindow()

void mitk::VtkLayerController::SetRenderWindow ( vtkSmartPointer< vtkRenderWindow >  renwin)

Connects a VtkRenderWindow with the layer controller.

Member Data Documentation

◆ m_RenderWindow

vtkSmartPointer<vtkRenderWindow> mitk::VtkLayerController::m_RenderWindow
protected

Definition at line 93 of file mitkVtkLayerController.h.


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