Three semi-automatic segmentation effects have added to the Segment editor. They are available in the latest nightly build, by installing the new SegmentEditorExtraEffects extension:
They are all semi-automatic methods, which grow segmentation from seeds/points defined by the user.
Watershed: similar to grow from seeds. Advantage: smoothness of the segments can be enforced. Disadvantage: much slower.
Input:
Preview:
Final result:
Fast marching: expands the current segment to regions with similar intensity.
Input:
Output:
Flood filling: clicking in the image adds points around the click position to the current segment. Intensity tolerance is adjustable. Neighborhood size parameter can be used to prevent leakage.
Hi, Perhaps I have some contributions to boost the processing times very much.
I researched about flood-fill recently and implemented an algorythm that was 10^1000000 times more efficient on memory instructions, using 3-4 of them, and multiple times faster than all previous versions that I found described on the web in codes whilst also being able to add codes from them too, and that could be speeded up by the 3D processes of the ones I found on the web. I wrote an account here: http://unity3dmc.blogspot.fr/2017/02/ultimate-3d-floodfill-scanline.html
For us, the main challenge is not computation time, as typically medical images that we work with consists of 100-200 million voxels, but a segmented structure is rarely bigger than a few 10 million voxels. Flood filling time is not noticeable.
Our problem is leaking: we often want to prevent flood filling to propagate through narrow bridges. VTK’s flood fill filter has an option for defining neighborhood size and minimum fill rate, but it’s not perfect, as it also removes small details from the filled region. Maybe it could be fixed easily (e.g., by expanding the final flood fill result by neighborhood size), but maybe a completely different approach would be needed.
If you were interested in exploring flood filling algorithms that don’t leak, and contribute an implementation using BSD-type license, then we would be happy to try it.
I’d love to use these new tools but I can’t get the extension to work. I installed the SegmentEditorExtraEffects extension in the 4/9/2018 nightly build, did the restart, and the icons aren’t available. I uninstalled and reinstalled also, and gave it permission to install the MarkupsToModel dependency. Working in Windows 10. Thanks for any advice.
Ok, I tried it on latest stable (4.8.1) and nightly build from 6/1 with same result. I’ve pasted log from 4.8.1 attempt below. Have tried on 3 different Windows 10 machines with no difference. I don’t have access to OSX or Linux right now. Thanks again for your help.
I’ve just tried the nightly build on a Windows machine and the effects showed up correctly. Could you please post a screenshot of your screen when you switch to the Segment Editor module?
Yeah I’m sure it’s something simple I’m overlooking but can’t figure it out. I rebooted…latest updates installed to Windows 10, otherwise fresh install of Slicer. It’s my impression that the extra tools show up as additional icons in the Segement Editor… Here are screenshots of Segment Editor and my Extensions manager:
Yes, the extra icons should show up in the Segment Editor module, but they don’t. Could you try to uninstall the extension, restart Slicer, and reinstall. When you reinstall, wait 1 minute before restarting Slicer, to make sure the extension is fully downloaded and installed.
If it still does not work then we can set up a meeting with remote desktop sharing during the coming week (just Send me a few timeslots that would work for you in a private message).
Mystery solved: SegmentEditor module was set as startup module, so it was initialized immediately when Slicer started - before SegmentEditorExtraEffects extensions had a chance to register the additional effects.
I’ll push a fix for this soon, but until then the workaround is not to set SegmentEditor as startup module.
Segment Editor initialization has been fixed (r27233), in nightly versions downloaded tomorrow or later, all effects will show up correctly in Segment Editor, even if it is used as startup module.