# Use Mesh to Mask a Segmentation

**URL:** <https://discourse.slicer.org/t/use-mesh-to-mask-a-segmentation/24819>\
**Category:** Development\
**Tags:** segmentation, masking\
**Created:** [August 18, 2022, 1:34pm UTC](https://discourse.slicer.org/t/use-mesh-to-mask-a-segmentation/24819 "2022-08-18T13:34:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![connorh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/connorh/32/79802_2.png) [@connorh](https://discourse.slicer.org/u/connorh)\
**Post date:** [August 18, 2022, 1:34pm UTC](https://discourse.slicer.org/t/use-mesh-to-mask-a-segmentation/24819/1 "2022-08-18T13:34:01Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/b/eb3c686346e9410c9f7145f14537a9e3b9aae283.jpeg)

---

<div class="post-metadata">

**Author:** ![connorh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/connorh/32/79802_2.png) [@connorh](https://discourse.slicer.org/u/connorh)\
**Post date:** [August 18, 2022, 5:36pm UTC](https://discourse.slicer.org/t/use-mesh-to-mask-a-segmentation/24819/2 "2022-08-18T17:36:43Z")

</div>

Resolved - was able to find this:

[https://slicer.readthedocs.io/en/latest/developer\_guide/script\_repository.html#create-segmentation-from-a-model-node](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#create-segmentation-from-a-model-node)
