Page MenuHomePhabricator

[Segmentation] Remove plugin redundancy with MultiLabelSegmentation
Open, Unbreak Now!Public

Description

MITK offers two fundamental plugins, the org.mitk.gui.qt.segmentation-plugin and the org.mitk.gui.qt.multilabelsegmentation-plugin.
Both plugins provide two views, one for the segmentation-functionality (tools etc.) and one for the utilities. Both also provide a definition of a properties page. A lot of the code inside the multilabelsegmentation-plugin was just copied from the segmentation-plugin.
The multilabelsegmentation-plugin also uses many UI-elements from the SegmentationUI-module.

Maintaining two plugins that are similar reveals a faulty design decision. We already experience to do twice the work to get both plugins working. I suggest to discuss this, talk about the (dis-)advantages and define next steps to remove code redundancy for these two plugins.

It might make sense to also keep {T23602}, {T26506}, T27807: [MultiLabel Segmentation] Inspection of module and plugin and T28118: Refactoring of SegTool2D in mind.

Revisions and Commits

Event Timeline

kalali triaged this task as Normal priority.Jan 4 2021, 12:29 PM
kalali created this task.

@kalali Aren't you already working on that topic? I thought, i just reviewed something in that direction?!?

@kalali Aren't you already working on that topic? I thought, i just reviewed something in that direction?!?

Not that I'm aware of :)
However, together with @kleina, @s434n and @a178n we will now find a way to work on that issue in parallel.

oops, sorry. than I have mixed something up.

I refactored both views massively. What I did was to somehow bring both plugins in line with each other to see the differences and the similarities. This simplifies to understand how things are implemented and what needs to be done to remove redundancy. I will highlight some points that I find striking:

  • the multilabel plugin view did not compare the world geometry to the selected segmentation node
    • I was able to draw a mask which was then positioned somewhere else (jumped) because of this (e.g. using brain.nrrd)
  • hiding the selected segmentation node disables the tools for the segmentation plugin but not for the multilabel segmentation plugin
  • the auto selection mode for showing / hiding the selected / not selected nodes in the data manager / render windows if the node selection is changed does not work anymore for the segmentation plugin (was already mentioned in T28256: Auto-selection preference for Segmentation View was hijacked for something else)
  • the multilabel segmentation plugin did not listen to render window part changes (no subclass of IRenderWindowPartListener)
  • the multilabel segmentation plugin lists some segmentation tools that don't even exist (FastMarching2D, Two Thresholds Auto Threshold Multiple Otsu)
  • the multilabel segmentation view plugin is not able to accept binary images as a segmentation
kalali moved this task from Segmentation to Cycle on the MITK (v2021.10) board.
kalali added a revision: Restricted Differential Revision.