Page MenuHomePhabricator | MITK

Use the new data node context menu for data storage inspectors
Open, NormalPublic

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.
kalali updated the task description. (Show Details)Aug 2 2018, 6:42 PM
kalali updated the task description. (Show Details)Aug 3 2018, 3:44 PM
kalali added a comment.Aug 3 2018, 3:56 PM

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
kalali added a comment.Aug 3 2018, 3:59 PM

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
kalali removed kalali as the assignee of this task.Oct 26 2018, 12:50 PM