# How to fill inside the holes

**URL:** <https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169>\
**Category:** Support\
**Created:** [June 13, 2018, 3:00pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169 "2018-06-13T15:00:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fang](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@Fang](https://discourse.slicer.org/u/Fang)\
**Post date:** [June 13, 2018, 3:00pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/1 "2018-06-13T15:00:14Z")

</div>

Hi,

I would like to ask how to fill inside the holes  
I have tried on ’ Smoothing ’ \> ’ Closing ’ but it just fills in the small holes and if I using a larger number of a kernel, it does not fill in the area that I desired.

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/4/24557197c5483ece46151c11b1fbd3ac2b1989a6.jpeg)

As the figure above, I desire to fill inside in the middle area.

Thank you for your helping,  
Best regards.

---

<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:** [June 13, 2018, 6:01pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/2 "2018-06-13T18:01:01Z")

</div>

It seems that the resolution of the segmentation is too low (voxel spacing is too high), relative to thickness of the structure that you would like to segment.

One solution is to supersample the input volume before starting segmentation, using Crop volume module (enable isotropic spacing; and set spacing scale to 0.5 or maybe 0.3).

---

<div class="post-metadata">

**Author:** ![Fang](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@Fang](https://discourse.slicer.org/u/Fang)\
**Post date:** [June 24, 2018, 3:01pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/3 "2018-06-24T15:01:00Z")

</div>

I already follow your suggestion but it does not change anything.

---

<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:** [June 24, 2018, 3:37pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/4 "2018-06-24T15:37:54Z")

</div>

You need to supersample the input volume **before** starting segmentation. If you have already started segmentation and have some segments, this will have no effect. We’ll add a new feature in 1-2 weeks that will allow you to easily resample an existing segmentation.

---

<div class="post-metadata">

**Author:** ![Fang](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@Fang](https://discourse.slicer.org/u/Fang)\
**Post date:** [June 24, 2018, 4:23pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/5 "2018-06-24T16:23:48Z")

</div>

I already enable isotropic spacing and set spacing scale to 0.5 and 0.3 from Crop volume module before I do any segmentation but it does not effect. I will waiting for the new feature in order to work on 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:** [June 24, 2018, 6:12pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/6 "2018-06-24T18:12:45Z")

</div>

> [@Fang](#):
>
> but it does not effect

What do you mean? Please describe otherwise we cannot help. What @lassoan is suggesting works. Make sure you select the resampled image for the new segmentation before you add any segments.

---

<div class="post-metadata">

**Author:** ![Fang](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@Fang](https://discourse.slicer.org/u/Fang)\
**Post date:** [June 24, 2018, 6:22pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/7 "2018-06-24T18:22:48Z")

</div>

I not sure that I misunderstood in some step or not.  
So, the steps that I do are performed as a figure below this in sequence.

 ![1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/7/a76bc8f1b74a89654efb0aeb284cc6d3738d2688.jpeg)  
 ![2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/e/ae5fb6855c34f5fac98063edc77dd08c0ac7d9dd.jpeg)  
 ![3](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/2/c28c58b73e89b391ba4e8c4f92eff847c6bc451d.jpeg)  
 ![4](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/e/8ea0e4035fae387375f23bcc476c8ad46732d5de.jpeg)  
 ![5](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/6/26f8f84c71ffc6a656d92b9250380a6c55362c51.jpeg)

---

<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:** [June 24, 2018, 7:05pm UTC](https://discourse.slicer.org/t/how-to-fill-inside-the-holes/3169/8 "2018-06-24T19:05:40Z")

</div>

If you resample an existing segmentation, it won’t contain a finer resolution segmentation afterwards, just a different sampling of the same segmentation. You need to segment the anatomical image that you use for segmenting the tooth. That’s what you need to supersample if you want to achieve higher accuracy segmentation.
