# Fill inside a closed curve

**URL:** <https://discourse.slicer.org/t/fill-inside-a-closed-curve/27335>\
**Category:** Support\
**Tags:** markups\
**Created:** [January 18, 2023, 11:38pm UTC](https://discourse.slicer.org/t/fill-inside-a-closed-curve/27335 "2023-01-18T23:38:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [January 18, 2023, 11:38pm UTC](https://discourse.slicer.org/t/fill-inside-a-closed-curve/27335/1 "2023-01-18T23:38:53Z")

</div>

When creating anatomical teaching materials, it would be nice to highlight different structures with different colors. Obviously this is best done with segmentation, but that’s quite a lot of work; especially when all you want to is highlight an external surface. Closed curve in this situation would work really well, but it needs to also cover the inside of the polygon (but with about 50% opacity), not just the boundary.

Is there a piece of python code to do that? Or better yet, can this be a property of the closed curves?

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

---

<div class="post-metadata">

**Author:** ![RafaelPalomar](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rafaelpalomar/32/1436_2.png) [@RafaelPalomar](https://discourse.slicer.org/u/RafaelPalomar)\
**Post date:** [January 19, 2023, 6:08am UTC](https://discourse.slicer.org/t/fill-inside-a-closed-curve/27335/2 "2023-01-19T06:08:40Z")

</div>

@muratmaga, maybe you could use the Baffle planner functionality in the Slicer Heart extension: [SlicerHeart/BafflePlanner.md at master · SlicerHeart/SlicerHeart · GitHub](https://github.com/SlicerHeart/SlicerHeart/blob/master/Docs/BafflePlanner.md). This would add a new object to the scene rather than modifying the visual properties of the underlying volume.

This is extracted from the documentation:

 ![baffleplanner](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/c/9c67ca7edc1bf4943c052fd223a994c8efc48d00.jpeg)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [January 19, 2023, 4:36pm UTC](https://discourse.slicer.org/t/fill-inside-a-closed-curve/27335/3 "2023-01-19T16:36:37Z")

</div>

Thanks @RafaelPalomar that would definitely work for starters.
