Page MenuHomePhabricator

Extending the Segmentation plugin with a multi-region threshold-based tool
Closed, WontfixPublic

Description

I'd like to add a new general tool to the 3D segmentation module, similar to combining the Binary Threshold and Picking tools, but allowing for multiple selected regions, and having the option of eliminating holes and leakages in the volume. I see this project as accomplishing two goals: 1) streamlining the 3D segmentation of a multi-part object (which currently requires multiple segmentations to be run and union'ed), and 2) adding optional morphological operations to allow for the smoothing of segmentations, all while sensitive to user adjustments (being able to refine parameters after getting a preview).

Event Timeline

I've sent a pull request adding the extensions I was planning. The summary of changes is:

-New tool "Threshold Components" under the 3D segmentation tab. It allows connected threshold segmenting over multiple seed points, and assorted UI improvements to streamline the process (compared to 3DRegionGrow).

-New tool "Pruning" under Segmentation Utilities -> Morphological Operations tab. This incorporates the itkBinaryPruningImageFilter to help clean up segmentations.

-New feature added to Deformable Clipping Plane View, which lets you extract a clipped piece of a segmentation and save it as a new segmentation. (Before, you could calculate volumes but not actually use the tool to edit the segmentation). Now, the Clipping Plane View functions as a 3D eraser tool where you can clip off unwanted pieces from a segmentation.

-Documentation added to Doxygen for how to use these features, including updated screenshots.

Added another commit that fixes a minor bug in segmenting for Deformable Clipping Plane View; the item number in QListWidgets does not always match the label number in the Clipped Image if there are empty clipping regions (items not equal to 2^n, where n is the number of clipping planes). However, the label number is always monotonic increasing with the item number, so this fix uses Histogram to map the item number onto the label number.

For reference the pull request:
https://github.com/MITK/MITK/pull/187

(For internal testers)
During testing please also check for labelset images:

  • That have several labels and possibly even merged/deleted labels in between
  • Check whether it works on 3D+t images or at least catches any errors and informs the user
  • Check whether it works on layers other than the first

I had a look at the new tools today. There was a compile error that I resolved and some issues:

  1. The threshold component did not work as I intuitively expected. At least during the quick test I did with some random images I had lying around I did not find an advantage over regular region growing.
  2. The Pruning seems to do nothing for me. I might be using it wrong, but given a segmentation with a little protuberance I had assumed it would remove the protuberance?

Hi,

  1. The main advantages of Threshold Components is to allow placing multiple seed points, and adjusting the locations of the seed points during the process. The underlying algorithm is otherwise similar to Region Growing. I created a new tool because I didn't want to interfere with existing tools, but it is certainly feasible to add these features into the existing tool (if you think they would be useful).
  2. Pruning removes protuberances only of width 1 pixel. The rationale for pruning is that Morphological Opening, even at the smallest radius, ends up deleting much of my segmentations. Pruning cleans up the noise slightly without affecting the wanted regions. (I agree that the effect of Pruning is small - it is meant to be coupled with Thinning to skeletonize the object first, but that would be even more destructive.) There is much room for a middle-ground that is gentler than Opening and more forceful than Pruning.

I've only been working with segmenting glioblastoma MRIs (which are often multifocal), so it's possible that the features I've felt are important are not generalizable to others. Feel free to pull as much or as little as you think best - I'm happy to split up the commits to only the ones you want.

I think you are right, that they are too specifically tailored to your use case to reasonably include in the as-is very general purpose segmentation plug-in. We might reconsider if we encounter those specfic use cases ourselves in the future and want an adapted segmentation for that. However we are grateful for you sharing your tool and making it available for others who might indeed have the same requirements.

kislinsk added a subscriber: kislinsk.

FYI: Nvidia used the new MITK extension mechanism to integrate their segmentation tools into MITK without touching the MITK source code.
https://github.com/NVIDIA/ai-assisted-annotation-client/tree/master/mitk-plugin

Deleted branch T22654-threshold-components-tool.