Page MenuHomePhabricator

Enum for AXIAL, SAGITTAL, CORONAL 3D/ORIGINAL/NONE is provided at many different locations
Closed, ResolvedPublic

Description

The different view planes / view modes are used at many different locations. It might make sense to move them to a single specific location to have a consistent naming and to allow the use of this enums as arguments for different functions.

Where such enums are defined:

  • QmitkRenderWindowMenu.h (has been removed in dd6d221ed26b)
  • mitkPlaneGeometry.h
  • QmitkStdMultiWidget.h (has been moved to mitkBaseRenderer.h in a0b88fbab45c)
  • mitkSliceNavigationController.h
  • mitkNavigationDataSliceVisualization.h (kind of)
  • mitkCLUtil.h (kind of)
API breaking changes

Remove the ViewDirection enum from the BaseRenderer
and use the new AnatomicalPlane enum class for the
different directions / planes.
Remove the ViewDirection enum from the SliceNavigationController
and use the new AnatomicalPlane enum class for the
different directions / planes.
Remove the PlaneOrientation enum from the PlaneGeometry
and use the new AnatomicalPlane enum class for the
different orientations / planes.

Migration should be easy, since the different directions / planes /
orientations are the same and in the same order as before.
"ViewDirection::THREE_D" is now "AnatomicalPlane::Original".
"PlaneOrientation::None" is now "AnatomicalPlane::Original".

Revisions and Commits

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

Event Timeline

mitkBaseRenderer.h already contains the enum for Standard2D and Standard3D, which is needed if one wants to switch between 2D and 3D view.
The file is part of MITK Core so that could be a good location to put the view direction enum.

This will further allow to remove the string query (e.g. "axial") for render windows but allow a type-based request.

kislinsk added a subscriber: kislinsk.

This is actually a huge topic with many implications. So we will defer the discussion.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kalali moved this task from Backlog to MITK Meeting on the Request for Discussion board.

It seems as if there is a mapping between the SliceNavigationController::ViewDirection and PlaneGeometry::PlaneOrientation, which makes it unnecessary to keep the direction / orientation in both classes.

I created a first differential for this task removing the SliceNavigationController::ViewDirection` as a first step.

kalali added a revision: Restricted Differential Revision.
kalali raised the priority of this task from Low to Normal.Fri, Nov 18, 12:32 PM
floca added a subscriber: floca.

@kalali please indicate that it has breaking changes in your commit message and how to handle them/migrate. thanks.

@kalali please indicate that it has breaking changes in your commit message and how to handle them/migrate. thanks.

Yes I will indicate this accordingly.