Use Mesh to Mask a Segmentation

Hello,

I have a polydata mesh (currently loaded as a modelNode) that I would like to use the geometry to mask a segmentation of the registered CT scan. I’m looking for a way to convert this mesh to a filled segmentation which I can then use as a mask when segmenting the underlying CT.

Is there a way to fill mesh geometry and convert it to a format that can be used to mask in a segmentation?

Resolved - was able to find this:

https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#create-segmentation-from-a-model-node