Page MenuHomePhabricator

[Segmentation] Refactor functions to create new (empty) segmentations
Open, WishlistPublic

Description

More and more use cases are defined, where a new (possibly empty) segmentation is needed without using the (MultiLabel-)Segmentation plugins / tools.
In order to guarantee a consistent way of generating segmentation data and segmentation nodes, I propose to gather the different methods of creating a segmentation and put them in a separate file.

Current status:

  • QmitkNewSegmentationDialog is used in
    • QmitkCreateMultiLabelSegmentationAction, QmitkMultiLabelSegmentationView and QmitkSegmentationView to generate a new segmentation on user click
    • QmitkLabelSetWidget to rename an existing segmentation

In the MultiLabel classes a plain new DataNode and LabelSetImage are initialized, filled with required information and added to the data storage. In the simple Segmentation class mitkTool is used to create a new empty segmentation.
Here, much more information (properties) are generated by default and a different way of segmentation-initialization is used.
However, I can't seem to find a reason for the functions CreateEmptySegmentationNode and CreateSegmentationNode being put into the mitkTool-class.

So I'd like to create a new file that contains the Create... functions and clean the process of creating new segmentations (including checking relevant properties).

Edit: The mitk::LabelSetImageHelper has been added with D601.

Event Timeline

kislinsk triaged this task as Wishlist priority.Jul 19 2019, 9:35 AM
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

kalali edited projects, added Next Milestone; removed MITK (v2022.04), Restricted Project.Mar 22 2022, 1:27 PM

The QmitkMultiLabelSegmentationView was removed with D601.
Additionally, the differential added the mitk::LabelSetImageHelper with b2f602ab37d5, which allows to create a new empty segmentation node and a new label for a label set image with a predefined name and label color.
This new class is used in QmitkCreateMultiLabelSegmentationAction, QmitkSegmentationView and in QmitkLabelsWidget.
The QmitkLabelSetWidget only uses the QmitkNewSegmentationDialog for renaming labels using the context menu in the list of labels.

The mitk::Tool::CreateEmptySegmentationNode-function is still used in

  • mitk::AutoSegmentationTool::GetTargetSegmentationNode

which in turn uses the mitk::Tool::CreateSegmentationNode-function.

We can discuss, if we want to keep those two functions or replace them with the functions of the new mitk::LabelSetImageHelper.

kalali renamed this task from Refactor functions to create new (empty) segmentations to [Segmentation] Refactor functions to create new (empty) segmentations.Mar 22 2022, 1:30 PM
kalali updated the task description. (Show Details)