Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::VtkLayerController Class Reference

#include <mitkVtkLayerController.h>

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 43 of file mitkVtkLayerController.h.

Constructor & Destructor Documentation

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

Definition at line 60 of file mitkVtkLayerController.cpp.

mitk::VtkLayerController::~VtkLayerController ( )
virtual

Definition at line 69 of file mitkVtkLayerController.cpp.

Member Function Documentation

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

Definition at line 37 of file mitkVtkLayerController.cpp.

References InsertSceneRenderer(), and RemoveInstance().

Referenced by mitk::BaseRenderer::BaseRenderer().

unsigned int mitk::VtkLayerController::GetNumberOfRenderers ( )

Returns the number of renderers in the renderwindow.

Definition at line 318 of file mitkVtkLayerController.cpp.

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

Returns the current vtkRenderer of the Scene

Returns the Scene Renderer

Definition at line 128 of file mitkVtkLayerController.cpp.

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.

Definition at line 82 of file mitkVtkLayerController.cpp.

Referenced by mitk::GradientBackground::Enable(), and QmitkVideoBackground::Modified().

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.

Definition at line 105 of file mitkVtkLayerController.cpp.

Referenced by mitk::RenderWindowFrame::Enable(), mitk::VtkWidgetRendering::Enable(), mitk::ManufacturerLogo::Enable(), QmitkToFPointSetWidget::InitializeWidget(), and mitkVtkPropRendererTest().

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.

Definition at line 142 of file mitkVtkLayerController.cpp.

Referenced by AddInstance(), and mitk::BaseRenderer::BaseRenderer().

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

Returns true if a renderer has been inserted

Definition at line 225 of file mitkVtkLayerController.cpp.

Referenced by QmitkVideoBackground::Modified().

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

Definition at line 50 of file mitkVtkLayerController.cpp.

Referenced by AddInstance(), and mitk::BaseRenderer::~BaseRenderer().

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

Definition at line 324 of file mitkVtkLayerController.cpp.

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

Connects a VtkRenderWindow with the layer controller.

Definition at line 197 of file mitkVtkLayerController.cpp.

Member Data Documentation

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

Definition at line 102 of file mitkVtkLayerController.h.


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