Padding the segmentation geometry

I have a bunch of 3D models that I need to edit (I do not have the original segmentation). I need to run dilation on these models but as imported the geometry of the segmentation is too tight to do any dilation (I end up with straight edges). So this is I have been doing:

  1. Load the model into scene
  2. Convert it to a binary labelmap
  3. Use the crop tool (non-intepolation) to expand the volume dimensions about 50% in each axis and overwrite itself (to keep the scene cleaner).
  4. Go to segmentations, create a blank segmentation, then scroll down to import/export, choose the operation as import, input type as the labelmap, and the input node as the expanded labelmap.

My expectation at this point the segmentation geometry would have been the same as the labelmap, but it is not.

geometry for the labelmap:


geometry for segmentation

Now when I run the dilation, I still get the straight edges indicating the segment geometry is not expanding. What am I missing here?

Turns out the solution to this is to initiate the segmentation first (using the padded labelmap as the source geometry) and then import the contents of the labelmap into that segmentation.

However, I still think the original workflow I presented should be supported. If I am specifying a labelmap to be imported, I expect the geometry of the segmentation to match the extend of the volume, not its contents.

@lassoan @pieper

This behavior is indeed complex, but well documented. Options for expanding segmentation is described here. Let us know if you have any questions or suggestions.

Actually I do: I am following the instructions to paint beyond extends, which says ‘If you want to extend the segmentation to a larger region then you need to modify segmentation’s geometry using “Specify geometry” button.’

Where is that button? Dimension fields are not editable for me?

It seems that you have found it, but in general if you want to find information on a button that is mentioned on a documentation page and it is not a link then you can search for its name on that page, in the search box in the Slicer documentation, or ask an AI chatbot. I’ll make it a link to make it easier.

That section shows what will be the resulting geometry. It would not be user-friendly if the user would need to blindly type some values there. Instead, you can choose an ROI or another node that is larger or smaller to change the size or position. Do you have any suggestions for changing the GUI or documentation to make this more clear for users?