Segmentation smoothing operation on multiple segments

Hi guys
I would like to apply smoothing operations, such as opening or closing to multiple segments. I can select multiple segments in the “segmentation” module, but not in “segment editor”.

Also, when importing segments as a binary labelmap, after a certain number of segments, the name of the segment becomes “invalid” instead of a number. Is there a limit on the number?

I have been using 3D Slicer for annotating and segmenting microscopy data. Its interface is quite intuitive, easy to navigate, and I plan to use it to generate ground truth data for machine learning purposes for image segmentation.

Cheers
Pradeep

You can apply smoothing to all visible segments by using “Joint smoothing” method in Smoothing effect. All the others may modify other segments and the result could depend on the order of segments, so they are not intended to be applied to many segments at once.

Please try latest Slicer Preview Release and let us know if you still find issues with importing labelmaps. Note that you can load a labelmap volume directly as segmentation (from nrrd and nifti formats) by choosing “Segmentation” in Description column in Add data dialog.

Hi @lassoan
Thanks for your reply. I do use “Joint Smoothing” but was wondering if thre are ways to apply smoothing for each segment. Is this possible via scripting?

Thanks, I’ll give this a try. I may get segmentation files which are already binary labelmaps which I subsequently correct or edit using 3D Slicer hence the reason to import labelmaps as “Segmentation”.

Cheers
Pradeep

Yes, of course, you can automate this. See lots of examples here: Documentation/Nightly/ScriptRepository - Slicer Wiki

1 Like

Awesome!
Thank you…