The SliceNavigationController holds the following geometries:
BaseGeometry::ConstPointer m_InputWorldGeometry3D- TimeGeometry::ConstPointer m_InputWorldTimeGeometry
- TimeGeometry::Pointer m_CreatedWorldGeometry
They can be accessed via the respective getter-methods.
As stated in T29218, the m_InputWorldGeometry3D-variable can be removed.
The m_InputWorldTimeGeometry is set in SetInputWorldTimeGeometry, which is mainly called inside RenderingManager::InternalViewInitialization, so each time a render update is requested.
The m_InputWorldTimeGeometry is used inside SliceNavigationController::Update to get the geometry of a specific / the current time step. This time-step specific geometry is then used to initialize planes of a SlicedGeometry3D . This sliced geometry is finally used to initialize the m_CreatedWorldGeometry, which can either be a ProportionalTimeGeometry or an ArbitraryTimeGeometry.
The BaseRenderer holds the following geometries:
- TimeGeometry::ConstPointer m_WorldTimeGeometry
- BaseGeometry::ConstPointer m_CurrentWorldGeometry
- PlaneGeometry::Pointer m_CurrentWorldPlaneGeometry
They can be accessed via the respective getter-methods.
As stated in T29212, the GetCurrentWorldGeometry2D-access functions can be removed.
The m_WorldTimeGeometry is set in SetWorldTimeGeometry, which is only called once upon creation, inside VtkPropRenderer::SetWorldGeometryToDataStorageBounds(). Afterwards it is only called via an observed event from the SliceNavigationController, using BaseRenderer::SetGeometry. That means that the m_WorldTimeGeometry is always the same as the m_CreatedWorldGeometry from the SliceNavigationController.
The m_CurrentWorldGeometry is set in SetCurrentWorldGeometry, which is only called from inside the BaseRenderer:
- BaseRenderer::SetSlice
- BaseRenderer::SetTimeStep
- BaseRenderer::SetWorldGeometry3D
The first two functions are called via event-observer from the SiceNavigationController.
The result is that the m_CurrentWorldGeometry is the time-specific SlicedGeometry3D of the m_WorldTimeGeometry. If you look above you'll see that the
mitk::BaseRenderer::m_WorldTimeGeometry is the same as the mitk::SliceNavigationController::m_CreatedWorldGeometry.
BaseRenderer::SetWorldGeometry3D is called from BaseRenderer::SetWorldTimeGeometry (which in turn is called from the SliceNavigationController, as stated above).
That means that again the m_CurrentWorldGeometry is the time-specific SlicedGeometry3D of the m_WorldTimeGeometry
The m_CurrentWorldPlaneGeometry is initialized inside the BaseRenderer-constructor and then only set inside SetCurrentWorldPlaneGeometry, which is only called form inside the BaseRenderer:
- BaseRenderer::SetSlice
- BaseRenderer::SetTimeStep
- BaseRenderer::SetWorldGeometry3D
- BaseRenderer::UpdateGeometry
Again, the first two functions are called via event-observer from the SiceNavigationController.
Looking into the functions shows that SetCurrentWorldPlaneGeometry is always called with a PlaneGeometry (2D), which is the extracted slice of either
- m_WorldTimeGeometry->GetGeometryForTimeStep(m_TimeStep), i.e. a 2D slice of the time specific world-time geometry
- a 2D slice of m_CurrentWorldGeometry
Interestingly only inside UpdateGeometry the m_CurrentWorldGeometry is used to extract the PlaneGeometry. This raises the question, why we need the m_CurrentWorldGeometry at all.
As far as I understand, the following statements are true
- mitk::BaseRenderer::m_WorldTimeGeometry is the same as mitk::SliceNavigationController::m_CreatedWorldGeometry (always a mitk::TimeGeometry with at least a single timestep)
- BaseRenderer::m_CurrentWorldGeometry can be extracted from the mitk::BaseRenderer::m_WorldTimeGeometry on demand