Page MenuHomePhabricator

Apply level window to multiple selected images
Closed, ResolvedPublic

Description

Currently the level window slider can be used to set the level window of the topmost visible image (in the datamanager). It is also possible to use the context-menu of the level window slider and set the level window for a different data node. However, there is a scenario, where users want to apply the same level window to a set of data nodes, e.g. a set of CT-images. This could be simplified by introducing an option to set the level window for a set of selected nodes.

Revisions and Commits

Event Timeline

kalali triaged this task as Normal priority.Sep 28 2018, 5:36 PM
kalali created this task.
kalali added a project: Restricted Project.
kalali added a subscriber: isensee.

Has been proposed before in T18200

Edit: Only for a single selected node

I suggest to set the AutoTopmost mode to off as default.

Currently the level window slider is not designed to affect multiple nodes.
The level window manager holds a member m_CurrentImage that denotes the current image on which the level window should work. Need to investigate a little further what will happen if we use a set / list of current images.

A first draft is implemented with a single selected image and it works quite well.

The level window can now be applied to a set of selected data nodes (if using the new option "Use selected images" in the level window slider context menu).
The 'selected' property of a data node has to be set, though. This is done e.g. in the data manager.
Using the new selection concept the selected property is currently not maintained and therefore using the new selection widgets will not allow to use selected nodes for the level window slider (see T25804).

Using the new option "Use selected images", the mitk::LevelWindowManager::SetSelectedImages-function defines a set of selected images (according to the 'selected'-property) but uses the last image of the set of selected images as the 'currentImage'.
Please note that QmitkLevelWindowWidgetContextMenu::OnUseAllGreyvaluesFromImage() and QmitkLevelWindowWidgetContextMenu::OnUseOptimizedLevelWindow() use the mitk::LevelWindowManager::GetCurrentImage()-function and will therefore adjust the level window according to the current image.

kalali added a revision: Restricted Differential Revision.Jan 7 2019, 11:22 AM
NOTE: API change: RecaluclateLevelWindowForSelectedComponent was renamed to RecalculateLevelWindowForSelectedComponent