| 242 | } |
| 243 | |
| 244 | void 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 | |
| 271 | void QmitkRenderWindowWidget::SetCrosshairPosition(const mitk::Point3D& newPosition) |
| 272 | { |
nothing calls this directly
no test coverage detected