| 574 | } |
| 575 | |
| 576 | void QmitkSlicesInterpolator::OnTimeChanged(itk::Object *sender, const itk::EventObject &e) |
| 577 | { |
| 578 | if (!dynamic_cast<const mitk::TimeNavigationController::TimeEvent*>(&e)) |
| 579 | { |
| 580 | return; |
| 581 | } |
| 582 | |
| 583 | const auto* timeNavigationController = dynamic_cast<mitk::TimeNavigationController*>(sender); |
| 584 | if (nullptr == timeNavigationController) |
| 585 | { |
| 586 | return; |
| 587 | } |
| 588 | |
| 589 | bool timeChanged = m_TimePoint != timeNavigationController->GetSelectedTimePoint(); |
| 590 | m_TimePoint = timeNavigationController->GetSelectedTimePoint(); |
| 591 | |
| 592 | if (m_Watcher.isRunning()) |
| 593 | m_Watcher.waitForFinished(); |
| 594 | |
| 595 | if (timeChanged) |
| 596 | { |
| 597 | if (m_3DInterpolationEnabled) |
| 598 | { |
| 599 | m_InterpolatedSurfaceNode->SetData(nullptr); |
| 600 | } |
| 601 | m_SurfaceInterpolator->Modified(); |
| 602 | } |
| 603 | |
| 604 | if (nullptr == m_LastSNC) |
| 605 | { |
| 606 | return; |
| 607 | } |
| 608 | |
| 609 | if (TranslateAndInterpolateChangedSlice(m_LastSNC->GetCreatedWorldGeometry())) |
| 610 | { |
| 611 | m_LastSNC->GetRenderer()->RequestUpdate(); |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | void QmitkSlicesInterpolator::OnSliceChanged(itk::Object *sender, const itk::EventObject &e) |
| 616 | { |
nothing calls this directly
no test coverage detected