# After threshold-based bone segmentation in CT structure filled with holes

**URL:** <https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983>\
**Category:** Support\
**Tags:** segmentation, dicom\
**Created:** [August 12, 2019, 6:55am UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983 "2019-08-12T06:55:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chad](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chad](https://discourse.slicer.org/u/chad)\
**Post date:** [August 12, 2019, 6:55am UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983/1 "2019-08-12T06:55:56Z")

</div>

Hi all,

I am segmenting the geometries of flatfoot skeleton from a CT scan using Threshold effect.  
What is the better way to fill the holes inside the segmented flatfoot skeleton (see picture below)?  
Thanks!

 ![68319312_1649184915215972_1185341717348352000_n](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/5/456ffdf7ffb030340856baf19762069e3b5161b2.png)

---

<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:** [August 13, 2019, 3:28am UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983/2 "2019-08-13T03:28:55Z")

</div>

You can try dilate and erode same amount (e.g., dilate 5mm and shrink 5mm) each of the segments one by one. This will take care most of the holes inside segments. But for the ones on the surface, you may have to play with your threshold.

---

<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:** [August 15, 2019, 3:25pm UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983/3 "2019-08-15T15:25:24Z")

</div>

There is an excellent extension (that will be available in Slicer within days) to fill holes in cancellous bone: [https://github.com/sebastianandress/Slicer-SegmentEditorSRSFilter](https://github.com/sebastianandress/Slicer-SegmentEditorSRSFilter).

You may also try the approach described in the [Skin surface extraction segmentation recipe](https://lassoan.github.io/SlicerSegmentationRecipes/SkinSurface/).

---

<div class="post-metadata">

**Author:** ![chad](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chad](https://discourse.slicer.org/u/chad)\
**Post date:** [September 5, 2019, 3:58am UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983/5 "2019-09-05T03:58:49Z")

</div>

Hi thank you for the response!

---

<div class="post-metadata">

**Author:** ![chad](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chad](https://discourse.slicer.org/u/chad)\
**Post date:** [September 5, 2019, 8:33am UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983/6 "2019-09-05T08:33:05Z")

</div>

Hello! My computer system is Windows. Can I use the above method to install the extension ?  
Thank you!

---

<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:** [September 5, 2019, 12:45pm UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983/7 "2019-09-05T12:45:36Z")

</div>

The extension has not been added to the index yet due to summer holidays. You can monitor the status of the extension [here](https://github.com/Slicer/ExtensionsIndex/pull/1655). If you prefer not to wait then you can download the [extension](https://github.com/sebastianandress/Slicer-SegmentEditorSRSFilter) and manually install it (by adding the module to additional module paths in Slicer application settings).

---

<div class="post-metadata">

**Author:** ![chad](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@chad](https://discourse.slicer.org/u/chad)\
**Post date:** [September 6, 2019, 6:00am UTC](https://discourse.slicer.org/t/after-threshold-based-bone-segmentation-in-ct-structure-filled-with-holes/7983/8 "2019-09-06T06:00:47Z")

</div>

Hello professor!I added the module to additional module paths in Slicer application settings,but it didn’t work.I’m not sure if my steps are correct.Is there a more detailed installation method?I will be very grateful.

 ![%E8%A8%BB%E8%A7%A3%202019-09-06%20135418](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/9/f9d23aec0ed5a753aa7ad4c6e95654a159de335f.png)
