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

Method OnTimeChanged

Modules/SegmentationUI/src/QmitkSlicesInterpolator.cpp:576–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void 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
615void QmitkSlicesInterpolator::OnSliceChanged(itk::Object *sender, const itk::EventObject &e)
616{

Callers

nothing calls this directly

Calls 6

GetSelectedTimePointMethod · 0.45
isRunningMethod · 0.45
SetDataMethod · 0.45
ModifiedMethod · 0.45
RequestUpdateMethod · 0.45
GetRendererMethod · 0.45

Tested by

no test coverage detected