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

Method UpdateCurrentGeometries

Modules/Core/src/Rendering/mitkBaseRenderer.cpp:681–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681void mitk::BaseRenderer::UpdateCurrentGeometries()
682{
683 m_ReferenceGeometryAligned = true;
684
685 if (m_WorldTimeGeometry.IsNull())
686 {
687 // simply mark the base renderer as modified
688 Modified();
689 return;
690 }
691
692 if (m_TimeStep >= m_WorldTimeGeometry->CountTimeSteps())
693 {
694 m_TimeStep = m_WorldTimeGeometry->CountTimeSteps() - 1;
695 }
696
697 auto slicedWorldGeometry =
698 dynamic_cast<SlicedGeometry3D*>(m_WorldTimeGeometry->GetGeometryForTimeStep(m_TimeStep).GetPointer());
699 if (slicedWorldGeometry != nullptr)
700 {
701 if (m_Slice >= slicedWorldGeometry->GetSlices())
702 {
703 m_Slice = slicedWorldGeometry->GetSlices() - 1;
704 }
705
706 SetCurrentWorldGeometry(slicedWorldGeometry);
707 SetCurrentWorldPlaneGeometry(slicedWorldGeometry->GetPlaneGeometry(m_Slice));
708 m_ReferenceGeometryAligned = BaseRendererHelper::IsRendererGeometryAlignedWithGeometry(this, m_InteractionReferenceGeometry);
709 }
710}
711
712void mitk::BaseRenderer::SetCurrentWorldPlaneGeometry(const mitk::PlaneGeometry* geometry2d)
713{

Callers 4

SetWorldTimeGeometryMethod · 0.95
SetSliceMethod · 0.95
SetTimeStepMethod · 0.95

Calls 6

ModifiedFunction · 0.85
GetPointerMethod · 0.80
IsNullMethod · 0.45
CountTimeStepsMethod · 0.45
GetPlaneGeometryMethod · 0.45

Tested by

no test coverage detected