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

Method InitializeDecorations

Modules/QtWidgets/src/QmitkRenderWindowWidget.cpp:244–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244void QmitkRenderWindowWidget::InitializeDecorations()
245{
246 vtkRenderer* vtkRenderer = m_RenderWindow->GetRenderer()->GetVtkRenderer();
247 if (nullptr == vtkRenderer)
248 {
249 return;
250 }
251
252 // initialize background color gradients
253 float black[3] = { 0.0f, 0.0f, 0.0f };
254 SetGradientBackgroundColors(black, black);
255
256 // initialize annotation text and decoration color
257 setFrameStyle(QFrame::Box | QFrame::Plain);
258
259 m_CornerAnnotation = vtkSmartPointer<vtkCornerAnnotation>::New();
260 m_CornerAnnotation->SetText(0, "Sagittal");
261 m_CornerAnnotation->SetMaximumFontSize(12);
262 if (0 == vtkRenderer->HasViewProp(m_CornerAnnotation))
263 {
264 vtkRenderer->AddViewProp(m_CornerAnnotation);
265 }
266
267 float white[3] = { 1.0f, 1.0f, 1.0f };
268 SetDecorationColor(mitk::Color(white));
269}
270
271void QmitkRenderWindowWidget::SetCrosshairPosition(const mitk::Point3D& newPosition)
272{

Callers

nothing calls this directly

Calls 4

NewFunction · 0.50
GetVtkRendererMethod · 0.45
GetRendererMethod · 0.45
SetTextMethod · 0.45

Tested by

no test coverage detected