Page MenuHomePhabricator

Adding an image node to the data storage leads to a loss of the current segmentation selection in the segmentation view.
Closed, ResolvedPublic

Description

To reproduce:

  • load an image node into the data storage and select it in the segmentation plugin in the first combo box
  • create a new segmentation and select it in the segmentation plugin in the second combo box
  • load a new image node (not a segmentation) into the data storage and the selection of the segmentation node is lost

This happens because of the "NodeAdded" function: Here the index of the segmentation combo box is always set to the newly added node. Since the segmentation combo box does not acceppt non-segmentation images, the newly added node will not be found as an entry of the segmentation combo box and thus the combo box index is set to -1.

Event Timeline

Receiving a "NodeAdded" call only applies the display options to the added node. It does not change the combo box selection anymore.
The first idea was to check, if the newly added node is a segmentation node and only then set the segmentation combo box to this new node. But as this might be confusing for the user, I decided not to change the combo box selection when new nodes are added to the data storage. This goes along with the discussion we had, that the data manager should not define each and every selection for other plugins.
However, the combo box selection is still changed when a new segmentation is created via the segmentation plugin, assuming that the user wants to directly work on the new segmentation.

kalali removed a project: Restricted Project.