# Fill or extract cavities in segmentations using the new "Wrap Solidify" effect

**URL:** <https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248>\
**Category:** Support\
**Tags:** feature, segmentation\
**Created:** [April 22, 2020, 11:28am UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248 "2020-04-22T11:28:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 22, 2020, 11:28am UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/1 "2020-04-22T11:28:04Z")

</div>

Making a segment that has fractured, discontinuous boundary and holes inside to be a simple solid object is a quite common task for segmentation. For example it is needed for creating simple solid bone models from CT images, extracting skin surface, segment thin surfaces, such as orbital bone wall, measuring brain volume, or volumes of various cavities.

Slicer now has a tool for all this: “Wrap Solidify” Segment Editor effect, provided by [SurfaceWrapSolidify extension](https://github.com/sebastianandress/Slicer-SurfaceWrapSolidify) and contributed by Sebastien Andress (Ludwig-Maximilians-University of Munich).

The tool can extract outer surface, largest cavity, or a custom region and has option to prevent leaking through small holes. The solidified segment can be also hollowed (converted to shell) out for faster 3D printing. Optionally, surface fractures can be preserved in created shells, which is useful for reproducing thin fractures in the created segmentation.

A short demonstration of cavity extraction feature:

Segmentation recipes are updated to use this tool:

- [Skin surface extraction](https://lassoan.github.io/SlicerSegmentationRecipes/SkinSurface2/)
- [Skull stripping from CT images](https://lassoan.github.io/SlicerSegmentationRecipes/CTSkullStripping/)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 22, 2020, 10:25am UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/2 "2020-04-22T10:25:57Z")

</div>

I just saw the [youtube video about the Wrap Solidify effect](https://www.youtube.com/watch?v=IWo-QlU4J_c), very nice work!

I’d like to ask about its potential usage to fill smaller holes. Looking at this [screenshot](https://github.com/sebastianandress/Slicer-SurfaceWrapSolidify/blob/master/Resources/Screenshots/screenshot4.png), I can see that there is a Custom region mode, which allows selecting one of the segments. Could this be used to segment smaller cavities such as the soft bone area in the mandible, like in this screenshot below?  
Thank you!

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 22, 2020, 12:02pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/3 "2020-04-22T12:02:00Z")

</div>

Yes, this can be very useful for dental applications for bone or teeth segmentation. For example, the result with outer surface extraction with minimum 10mm hole size:

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

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 22, 2020, 1:09pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/4 "2020-04-22T13:09:23Z")

</div>

Solidify effect can be used for automatic removal of table from CT images, too. See [this post](https://discourse.itk.org/t/how-segment-the-board-in-the-red-line-of-the-picture/2973/8?u=lassoan) for details.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/8/38116f8779fde38e74b41a83a1831f71fc6f7a24.jpeg)

If there is interest, we can create a dedicated module for this.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 22, 2020, 1:25pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/5 "2020-04-22T13:25:49Z")

</div>

Thanks! What settings should be used so that the mandible is filled like this?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 22, 2020, 1:33pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/6 "2020-04-22T13:33:19Z")

</div>

Region: “outer surface”, carve holes: enabled, minimum hole size: 10mm. Hole carving is enabled so that concave are segmented accurately. Minimum hole size of 10mm ensures that you don’t carve into the bone through holes smaller than 10mm.

---

<div class="post-metadata">

**Author:** ![avarghes24](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@avarghes24](https://discourse.slicer.org/u/avarghes24)\
**Post date:** [October 13, 2022, 4:33pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/7 "2022-10-13T16:33:04Z")

</div>

Hi!

I am trying to use the SurfaceWrapSolidify extension in Slicer 5.0.3 however, when I search for it using the “Find module” tool, I am unable to find it. I installed the extension conventionally using the Install Slicer Extensions module, searched for the extension, installed it, and then restarted Slicer. To confirm the extension was installed properly I went to Applications \>\> Slicer \>\> Show Package Contents \>\> Contents \>\> Extensions-30893 and I see SurfaceWrapSolidify as one of the folders. Please let me know what I can do to launch this extension.

For reference: Slicer 5.0.3 running on MacOS Monterey 12.4

Thanks in advance!

Anish

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 13, 2022, 4:41pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/8 "2022-10-13T16:41:00Z")

</div>

> [@avarghes24](#):
>
> when I search for it using the “Find module” tool, I am unable to find it.

SurfaceWrapSolidify extension does not add any module that would show up in the module finder, but instead it adds the “Wrap solidify” effect to the Segment Editor module.

---

<div class="post-metadata">

**Author:** ![avarghes24](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@avarghes24](https://discourse.slicer.org/u/avarghes24)\
**Post date:** [October 13, 2022, 4:42pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/9 "2022-10-13T16:42:39Z")

</div>

Ah, i understand. My mistake. Thank you sir

---

<div class="post-metadata">

**Author:** ![avarghes24](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@avarghes24](https://discourse.slicer.org/u/avarghes24)\
**Post date:** [October 13, 2022, 5:54pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/10 "2022-10-13T17:54:00Z")

</div>

This extension is absolutely amazing and saved hours of painting and erasing with a threshold or messing around with level tracing for me! Thank you so much to everyone that developed this

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 13, 2022, 5:58pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/11 "2022-10-13T17:58:30Z")

</div>

Awesome, thanks for the feedback! It would be great if you could share some of the images of what you achieved with the tool (I’m just curious).

---

<div class="post-metadata">

**Author:** ![mangotee](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mangotee](https://discourse.slicer.org/u/mangotee)\
**Post date:** [October 25, 2022, 2:28pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/12 "2022-10-25T14:28:01Z")

</div>

@sandress - you should see this 🙂

---

<div class="post-metadata">

**Author:** ![sandress](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@sandress](https://discourse.slicer.org/u/sandress)\
**Post date:** [October 25, 2022, 2:35pm UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/13 "2022-10-25T14:35:45Z")

</div>

🙂 thangs Ahmad @mangotee  
Also @lassoan for the many contributions!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 29, 2022, 5:57am UTC](https://discourse.slicer.org/t/fill-or-extract-cavities-in-segmentations-using-the-new-wrap-solidify-effect/11248/14 "2022-10-29T05:57:46Z")

</div>

A post was split to a new topic: [WrapSolidify is amazing for preprocessing before volumetric mesh generation](https://discourse.slicer.org/t/wrapsolidify-is-amazing-for-preprocessing-before-volumetric-mesh-generation/25961)
