2D/3D fill tool

`yes I meant STL file.

Yes, you can load an STL file into Slicer, import it into a segmentation node in Segmentations module, and edit it in Segment editor module. You need to select a reference volume that defines resolution and axis direction of the edited binary labelmap in the segmentation.

Hi @lassoan ,

I am reviving this topic because I found your suggested method of inverting, keeping largest island, then inverting again very helpful.

I have a case where I have several interior holes in the segmentation that I would like to fill.

I see I can make segments from islands, but then they show up as separate segments.

Is there an existing way to add all of the islands together or would I need to write my own code to loop through all of the segments and add each one using logical operators:add?

I tried surface wrap solidify but this shrink wraps over some concave regions on the surface so I prefer using the islands approach.

UPDATE: I notice if I add islands as segments with the setting “overwrite all” they islands are not only created as new segments but also included in segment_1 (the original). This is unexpected behaviour to me, but works for my use case. But I am confused why it is happening

Thank you very much,
Eva

You can use Logical operations → Fill, with masking option to editable region within visible segments.

You can adjust effect parameters to carve out concave regions.

Thanks Andras for the quick reply!

You can use Logical operations → Fill, with masking option to editable region within visible segments

Thank you for the suggestion. I just realized that splitting into segments doesn’t add them all to the initial mask, just the first one, which would be expected with my settings:
image

I guess I will go with a loop of adding all of the separate islands back in in the case where there is more than 1 island.

You can adjust effect parameters to carve out concave regions
Thank you, but I worry the variation in bony anatomy will prevent automation for all patients.

Thanks again!
Eva

Hi @andras13

Just to update you, the code looping through all segments and adding them together with logical operations works well.
Thanks again for the tip on using the inversion and island selection to fill the interior of a segmentation.

Best,
Eva

1 Like