Page MenuHomePhabricator

[Segmentation] Is QmitkDataSelectionWidget needed anymore?
Closed, ResolvedPublic


Introducing T23751 specific widgets have been implemented to establish a new selection concept. We need to find out if the QmitkDataSelectionWidget (which exists two times, inside the MultilabelSegmentation-plugin and the Segmentation-plugin) is needed anymore.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision

Event Timeline

kalali triaged this task as Normal priority.Feb 14 2020, 7:35 PM
kalali created this task.
kalali renamed this task from Is QmitkDataSelectionWidget needed anymore? to [Segmentation] Is QmitkDataSelectionWidget needed anymore?.Jun 10 2021, 2:11 PM
kalali edited projects, added MITK (v2021.10); removed MITK.
kalali moved this task from Backlog to Segmentation on the MITK (v2021.10) board.

The QmitkDataSelectionWidget uses the new selection concept widget SingleNodeSelectionWidget. So it is not redundant per se.
But it is right that it makes no sense to dublicate the widget in the plugins. It should be in MitkSegmentationUI and only one time.

I agree. But I think (and you also stated this in the merged task T27131):

Further the question arised, if we should refactor QmitkDataSelectionWidget or completly deprecate it and use NodeSelectionWidgets directly.

I'm not saying that it is redundant - but is it needed for anything? It certainly is not necessary; it seems more like a convenience class to setup a QmitkSingleNodeSelectionWidget with predefined QmitkDataSelectionWidget::Predicates, which automatically writes a nice string on the selection widget / hint for a more user-friendly usage.

Also it seems as if a single QmitkDataSelectionWidget is able to handle / provide multiple QmitkSingleNodeSelectionWidgets, which might be a nice thing to have.

The more I look at it the more I think it is nice to have and since we have it, we could leave it there. But then again I think we could also use it in other occasions , e.g. inside the segmentation plugin view (currently it is only used inside the (multi label) segmentation utilities view). Maybe this is something to consider for T28142.

But it is right that it makes no sense to dublicate the widget in the plugins. It should be in MitkSegmentationUI and only one time.

Obviously the QmitkDataSelectionWidget is dependent on the QmitkSingleNodeSelectionWidget which is located inside a plugin, thus it is not possible to move it to the module layer. We could put it into the org.mitk.gui.qt.common plugin, where the QmitkSingleNodeSelectionWidget and other node-selection related classes are located.

I looked into moving this class but for the predefined predicates some classes are required that are only available inside the Segmentation module. So if we move this e.g. to org.mitk.gui.qt.common plugin we would add an additional module dependency to that plugin, which is unfortunate, I guess.

However, I remember that we talked about something similar in relation to T27090: How can we use node predicates with data types, if the data types are declared inside specific modules? Does it make sense e.g. to move the LabelSetImage to the core module? (Also: ContourModel is required).

I created D525 (which failed, because I created a local branch on top of another local branch). However, you can have a look at it.
The way I solved the mentioned problem is by using strings for the data type specification instead of using the data type / class as a template.
I think it would be better to find a different solution. One way to solve this would also be to wait until your segmentation-refactoring is finished and the redundancy of the segmentation / multi label segmentation plugins has been resolved. Then we can put the QmitkDataSelectionWidget back into this single plugin. However, it would still be beneficial to have the QmitkDataSelectionWidget available for other plugins so I guess something general like the org.mitk.gui.qt.common plugin would be nice.
Maybe we can discuss the problem of templated node predicates in the mentioned task T27090: Provide standard NodePredicates.

kalali lowered the priority of this task from Normal to Low.
kalali moved this task from Cycle to Segmentation on the MITK (v2021.10) board.

We postpone this since currently we do not want to introduce new dependency or change the templated predicates to string-based predicates.

kalali added a revision: Restricted Differential Revision.Aug 11 2021, 9:50 AM
floca added a revision: Restricted Differential Revision.Mon, Apr 22, 4:29 PM