Page MenuHomePhabricator

Automatically add external tools to segmentation tool selection box
Closed, ResolvedPublic

Description

While the segmentation tools are already queried at runtime by the tool manager through an ITK factory mechanism, the segmentation views statically choose the tools to display.

Implement an easy way for external developers to add their segmentation tools without touching the MITK source code.

Event Timeline

kislinsk triaged this task as Wishlist priority.Dec 18 2018, 4:31 PM
kislinsk created this task.

Here's the solution: We extend the segmentation views to also add all tools to the appropriate category by regex-matching their class name to either SegTool2D$ or SegTool3D$ (for example, their class name ends in either SegTool2D or SegTool3D like MyAwesomeSegTool2D).

While not the cleanest and most sophisticated solution, I think this is fair enough for a quick and easy extensibility.

  • Theme-adaptive SVG icons are now supported as tool icons
  • Tool state machines external to the MitkSegmentation module are now supported

I created a branch with the same name in rMPT MITK-ProjectTemplate. It provides an example segmentation tool with a styled icon and a custom state machine. It does not yet come with a tool GUI, which I will add tomorrow.

Tool GUIs work as well now. Merged into releases/2018-04. I documented the feature in the example tool of the project template and wrote the Nvidia guys.