Use segmentation from Segment Editor as initialization for Level Set Segmentation

From what I can tell, the Level Set Segmentation panel from the Slicer VMTK Extension only allows initialization from scratch using colliding fronts or fast marching. However, I’d like to be able to use Level Set Segmentation to refine a segmentation generated using the Segment Editor. Is there some way to do this?

Also, I noticed that there is a leftover xrange in LevelSetSegmentation.py (line 583) that will raise an error and prevent the code from working properly.

A PR to fix the xrange issue would be welcome, as would any new functionality you want to add. There is no core developer working on this extension right now, so community contributions are needed to help keep it going.

@tossin thanks for reporting. I’ve fixed xrange (changed to range).

This should be no problem. You can just add a segmentation node selector and if the user selects a segmentation node as input then you can export it to a labelmap and use it as input of the level set.