MCPcopy Create free account
hub / github.com/MITK/MITK / InsertBackgroundRenderer

Method InsertBackgroundRenderer

Modules/Core/src/Controllers/mitkVtkLayerController.cpp:78–95  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

76 * Multiple calls with forceAbsoluteBackground set true will set the latest registered renderer as background.
77 */
78void mitk::VtkLayerController::InsertBackgroundRenderer(vtkSmartPointer<vtkRenderer> renderer,
79 bool forceAbsoluteBackground)
80{
81 if (renderer == nullptr)
82 return;
83
84 // Remove renderer if it already exists
85 RemoveRenderer(renderer);
86
87 if (forceAbsoluteBackground)
88 {
89 auto it = m_BackgroundRenderers.begin();
90 m_BackgroundRenderers.insert(it, renderer);
91 }
92 else
93 m_BackgroundRenderers.push_back(renderer);
94 UpdateLayers();
95}
96/**
97 * Connects a VTK renderer with a vtk renderwindow. The renderer will be rendered in the foreground.
98 * With forceAbsoluteBackground set true a renderer can be placed at the absolute foreground of the scene.

Callers 1

ModifiedMethod · 0.80

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected