Page MenuHomePhabricator

Decouple TimeNavigation from SliceNavigationController
Closed, ResolvedPublic

Description

Currently the SliceNavigationController takes care of its current slice position and the time position. The time position is a global position and independent from the view direction.
In the MITK workbench typically three SliceNavigationController exist, one for each view direction / plane orientation. Additionally a (global) TimeNavigationController exists, which is only the name of a variable: The time navigation controller is also a SliceNavigationController. The time navigation controller is a global, single instance and can be retrieved via RenderingManager::GetTimeNavigationController().

The problems are the following:

  • the time navigation controller is connected to the three slice navigation controllers, since they can alter the time. The time navigation controller has to be informed about the new time
    • this only happens inside the SliceNavigationController::Update-function, typically after a new WorldTimeGeometry has been set for the slice navigation controller
    • this function is called typically three times, once for each of the three slice navigation controller (e.g. when calling RequestUpdate), which means that the time of the time navigation controller is updated three times
  • the time navigation controller itself can also be updated with a new WorldTimeGeometry and can thus update the time on its own, which will lead to another update of the time
  • if the time is updated via a GeometryTimeEvent (sent by the SliceNavigationController::Update-function), the time of the time navigation controller is updated but the time geometry of the TimeNavigationController is not - which means that the new time (position) does not fit to the time geometry
    • currently this does not happen probably because we explicitly call `GetTimeNavigationController()->SetInputWorldTimeGeometry(newGeometry) if we update the three slice navigation controller
    • but if we need to set the input world time geometry anyway, we might update the time then as well and don't need to rely on the event send by the three slice navigation controller

I propose to decouple the time variable from the slice navigation controller and subclass the controller to create a single instance of a time navigation controller.
This will allow us to have a clear separation of the geometric information and the time information and helps understanding the slice navigation controller and the events sent.

It does not make sense to keep the time in three SliceNavigationControllers, when their purpose is to keep track of the slice-position of their view direction / dimension.

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

kalali added a revision: Restricted Differential Revision.Sep 1 2022, 4:30 PM

The Diff should be landed after the 2023 spring release. We decided to go that way, as it is not necessary for the release and we are already shaking up a lot of things.

I pushed my local branch to remote for others to continue working on it. The related differential {D705} has been updated and will remain open.

s434n claimed this task.

Deleted branch from rMITK MITK: feature/T29273-Decouple-TimeNavigationController-from-SliceNavigationController.