Page MenuHomePhabricator

Use the new data node context menu for data storage inspectors
Closed, WontfixPublic

Description

The decoupled new data node context menu (T25056) can be used in different data storage inspectors.

One point has to be discussed, though:
The data storage models are equipped with a NodePredicate (from their base class QmitkAbstractDataStorageModel). This node predicate can be used to define which data nodes should be visible in the current data storage inspector / model (e.g. only show segmentation nodes). This was not possible with the original data manager.

The question now arises how certain actions should act:

  • "Show only selected nodes" hides all nodes except for the selected nodes. If we have a node predicate, should it also hide the nodes which are not represented by the current data storage inspector? If not, the actions need to be aware of the current node predicate.
  • "Hide all nodes" has the same issue
  • should a "Global Reinit" include all nodes in the data storage or only those that are currently represented by the data storage inspector?

Related task:
T25176

Event Timeline

kalali triaged this task as Normal priority.Aug 2 2018, 6:39 PM
kalali created this task.

We could provide a node predicate for each action that can be used to filter the nodes on which an action should work.

Question:

  • how can each view / widget that uses the context menu specify the node predicates for each action?
    • the specific action is not known since only the context menu retrieves all known actions and adds them to its menu
    • use microservice-approach and cast to desired action? use microservice-interface to provide function to set a node predicate

The problem was that the actions were defined inside the data manager and thus had access to the node tree.
Now the new context menu holds all actions and the data manager only knows the context menu. The actions don't know the data manager anymore and therefore can not access the model of the data manager view (or the model of the new data storage inspectors).

One could provide the context menu and the actions with the data storage inspector model, which only holds the nodes that are valid with the given node predicate. However, this is similar to just providing the node predicate. It will not solve the problem that some actions should work on node-predicate-filtered nodes whereas others should work on the whole data storage.

Different node levels:

  • all data nodes (whole data storage)
  • only the currently shown data nodes
  • node-predicate-filtered nodes with the new data storage inspectors
  • only the currently selected nodes
kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

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