| 341 | } |
| 342 | |
| 343 | void QmitkMxNMultiWidget::SetSelectedPosition(const mitk::Point3D& newPosition, const QString& widgetName) |
| 344 | { |
| 345 | QSet< RenderWindowWidgetPointer > renderWindowWidgets; |
| 346 | if (widgetName.isNull() || widgetName.isEmpty()) |
| 347 | { |
| 348 | for (const auto& [windowName, renderWindowWidget] : this->GetRenderWindowWidgets()) |
| 349 | { |
| 350 | renderWindowWidgets.insert(renderWindowWidget); |
| 351 | } |
| 352 | } |
| 353 | else |
| 354 | { |
| 355 | renderWindowWidgets = { GetRenderWindowWidget(widgetName) }; |
| 356 | } |
| 357 | |
| 358 | if (renderWindowWidgets.isEmpty()) |
| 359 | { |
| 360 | MITK_ERROR << "Position can not be set for an unknown render window widget."; |
| 361 | return; |
| 362 | } |
| 363 | |
| 364 | for (auto renderWindowWidget : renderWindowWidgets) |
| 365 | { |
| 366 | renderWindowWidget->GetSliceNavigationController()->SelectSliceByPoint(newPosition); |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | const mitk::Point3D QmitkMxNMultiWidget::GetSelectedPosition(const QString& widgetName) const |
| 371 | { |
no test coverage detected