Page MenuHomePhabricator

[Selection widgets] Define default for auto selection / listening mechanism
Closed, ResolvedPublic

Description

While refactoring many plugin views to include the new selection concept (single / multi selection widgets with selection service connection) we often had to make the decision if we want to

  • activate auto selection
    • which means that a selection widgets automatically selects a fitting data node if existent
  • listen to selection changes
    • which means that each selection changed event (e.g. inside the data manager) modifies the current selection of the widget

Before introducing the new selection concept, some plugins listened to every selection change (e.g. properties view, pointset view) whereas others needed to be explicitly set to a certain selection (e.g. segmentation, if auto-select was off).

We want to discuss the best default while keeping an eye on the advantages and disadvantages of the two different approaches.

Revisions and Commits

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

Event Timeline

kalali triaged this task as Normal priority.Jun 23 2020, 1:37 PM
kalali created this task.
kalali renamed this task from [Selection widgetes] Define default for auto selection / listening mechanism to [Selection widgets] Define default for auto selection / listening mechanism.Jun 23 2020, 5:17 PM
kalali moved this task from Backlog to MITK Meeting on the Request for Discussion board.

Result of the discussion:
We will "activate auto selection" mode as default. The user has to select a node anyway. Either the selection slot is empty or already contains an automatically selected node. In both cases the user has to manually select a node. But in the latter case there might be a chance that the automatically selected node is the required one.

We will not "listen to selection changes" as default. The idea of the new selection concept was to have a "local selection concept". We will only enable listening to global selections for specific simple plugins, e.g. PropertiesView, that do not allow any action except displaying some data information.

floca edited projects, added MITK (v2021.02), Restricted Project; removed MITK.Jul 30 2020, 10:47 AM

To finish this task, one should check/verify that all release relevant plugins follow the discussion result.

Plugins from T24775: Refactor plugins to use the new node selection widgets that do not follow the discussion result and need to be refactored:
No auto selection (SetAutoSelectNewNodes(true))

  • Dicom Inspector
  • Segmentation
  • Segmentation Utilities (QmitkDataSelectionWidget) --> Leave it as it is for now
  • MultiLabel Segmentation Utilities (QmitkDataSelectionWidget) --> Leave it as it is for now
  • Image Cropper (will be fixed in D375)
  • Image Statistics (uses MultiNodeSelectionWidget)
  • Measurement (will be fixed in D372)
  • MatchPoint --> T28192
  • Properties
  • Semantic Relations --> T28226
  • Semantic Relations Statistics --> T28226
  • Volume Visualization

Listen to selection changes

  • Dicom Inspector (but on purpose)
  • Properties (but on purpose)

Just a comment: Image Statistcs uses the MultiNodeSelectionWidget which offers no AutoSelect feature (on purpose, because it could be a lot selections at once...).

I started fixing some plugins. How do we proceed with (ML)Segmentation and MatchPoint?

How do we proceed with (ML)Segmentation

Segmentation already uses AutoSelection as default (can be configured via preferences, default is true)

and MatchPoint?

More tricky, depending on the plugin.

  • Executor: We could autoselect, we don't have a possibility to detect which should be target or moving. Currently I would not do something before we have a good usability concept there.
  • Mapper: We could introduce a auto select for the registration widget. The others to auto select already depending on the registration.
  • visualizer: Autoselect for registration makes sense
  • Evaluator/Manipulator: Autoselect for registratoin makes sense, the image slots have there own implementation for Autoselect already and do not need a change.

How do we proceed with (ML)Segmentation

Segmentation already uses AutoSelection as default (can be configured via preferences, default is true)

Looking at my observed behavior (see comment above) the auto selection feature does not really work in my case with segmentation, segmentation utilities and ml segmentation utilities.
Maybe someone else has time to double-check this, e.g. @thomass?

@kalali It seems that you work at this task and already have some branch. But the task is not claimed by you. Is it on purpose?

Looking at my observed behavior (see comment above) the auto selection feature does not really work in my case with segmentation, segmentation utilities and ml segmentation utilities.
Maybe someone else has time to double-check this, e.g. @thomass?

Just double checked it. As I said the segmentation and ML segmentation view already use auto select and work as they should.
The utility view do currently not autoselect.
I see 2 options:

  1. keep it as is: user has to select manually
  2. activate auto select, where we can ensure sensible selections:
    • Boolean operator: here we would need to ensure that the second slot never containes the same seg then the first slot, so we have to dynamically alter the predicates. But this would lead to a behavior where the user cannot easily swap the slots (because he cannot deselect a slot and he cannot select a data in the other 2nd slot if already selected in the first) -> For now I would not activate autoselect here.
    • Contour To Image: this is a save one for autoselect as both slots have no overlapp
    • Image Masking: same like contour to image
    • Morphological operations: same like contour to image
    • SurfaceToImage: same like contour to image

For ML utilities it is the same.

I just realized that the auto-selection mode of the Data node selection mode in the preferences pages of the Segmentation and MultiLabel Segmentation does not work anymore. I did not look into it but it might be related to the new selection concept.

This comment was removed by kalali.

Just double checked it. As I said the segmentation and ML segmentation view already use auto select and work as they should.

I just came across this again:
For me the following happens:

  1. I open the MITK workbench
  2. open the Segementation View
  3. below the image selectors a warning Please select an image is shown
  4. both image selectors show a red warning
  5. I open an image e.g. US4DCyl.nrrd
  6. the warning below the image selectors changes to Select or create a segmentation
  7. both image selectors still show a red warning
  8. the image is not automatically selected

This is different to the behavior of the ML Segmentation view, where the loaded image is directly selected in the patient image selector
However, if the Segmentation view is opened after the image has been loaded, it is automatically selected

I just came across this again:
For me the following happens:

  1. I open the MITK workbench
  2. open the Segementation View
  3. below the image selectors a warning Please select an image is shown
  4. both image selectors show a red warning
  5. I open an image e.g. US4DCyl.nrrd
  6. the warning below the image selectors changes to Select or create a segmentation
  7. both image selectors still show a red warning
  8. the image is not automatically selected

@kalali That is strange. Are you at the develop or master? I cannot confirm the descirbed behavior. For me everything works fine... ?!?

  1. I open the MITK workbench
  2. open the Segementation View
  3. below the image selectors a warning Please select an image is shown
  4. both selectors show a red warning
  5. I open an image e.g. US4DCyl.nrrd
  6. the warning below the image selectors changes to Select or create a segmentation
  7. the patient image selector is now set to the image.
  8. the segmentation selector is still not set

What is your setup?

I'm currently on the latest develop (rMITK15ecdf8d92aa). Only a small set of plugins enabled (datastorageviewertest, (ML)segmentation, imagenavigator).
I'm doing this in Debug mode.

I recorded a short video to show my procedure: (Problem shown at 0:13). At the end I show how it works with the ML segmentation view.

Something strange happened:
I wanted to test some GUI functionality for your open diff but somehow I was not able to load data anymore: Clicking on Open File did not open a window.
Then I removed the DKFZ AppData folder to have a fresh MITK workbench. Now clicking on Open File opened a window but while I was scrolling inside this window to find the desired data, the window stopped working (did not scroll anymore - whole application was frozen).
So I did a Windows restart and opened MITK again. Now I am able to load data again and Voila: The segmentation view now automatically selects the newly added data node (patient image selector).
...
...
Tbh, I have no clue what's going on.

Hm, interesting... I say we but it under the category experience and close that chapter. If it reoccures we see how to handle it. Thanks for investigating it.

Ok, I modified T27498#208164 to update the missing views. I say, for the release we leave the utilities the way they are (your option 1. keep it as is: user has to select manually). We keep an eye on it if this leads to some confusion.
SemanticRelations is not relevant for the release so I'll put this in another task.

Which leaves us only with MatchPoint.
So if you don't have any time left to do this for the upcoming release I would also move this to a separate task, so that we can close this one. What do you think?

@kalali We postpone it as it is not trivial (see T28192; generated a dedicated task for that) but also not critical. Thanks for pointing it out again. I think you could close this task here.

kalali moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jun 25 2021, 9:47 AM
kalali added a revision: Restricted Differential Revision.Jun 25 2021, 9:59 AM
kalali added a revision: Restricted Differential Revision.Jun 25 2021, 11:02 AM

Deleted branch from rMITK MITK: T27498-Set-selection-mode-to-auto-selection.