# Fill between slices horizontally

**URL:** <https://discourse.slicer.org/t/fill-between-slices-horizontally/14997>\
**Category:** Support\
**Tags:** segmentation, knee\
**Created:** [December 10, 2020, 9:11pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997 "2020-12-10T21:11:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 10, 2020, 9:11pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/1 "2020-12-10T21:11:28Z")

</div>

Currently I am trying to segment the cartilages and meniscus. I have already created segments horizontally. however when I tried to fill between slices they are not connecting?

Does anyone knows why?

I really need this to work. I did once before it worked just fine but today i try again its not working

---

<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:** [December 10, 2020, 9:22pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/2 "2020-12-10T21:22:09Z")

</div>

You can fill slices only along one axis at a time. If you painted slices in different orientations then you need to fill between them in several steps. In each step, you show only those segments that have the same orientation and hide all the others (that are in a different orientation or already filled), and then apply “Fill between slices”. Make sure to enable overlapping segments to preserve the segments that are hidden.

If doing this in several steps is not convenient then you may also try methods that work with arbitrarily placed seed regions, such as “Grow from seeds”.

Let us know how it works for you.

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 10, 2020, 10:39pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/3 "2020-12-10T22:39:05Z")

</div>

Hi I have only sliced in one direction as shown in the picture

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

The fill between option is not connecting the gaps between each slices for some reason and i do not know why

I even tried to start a new segmentation for testing and I just did 2 slices from the sagittal view. And tried the fill between, however it is still not connecting thoes 2 slices

---

<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:** [December 11, 2020, 3:01am UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/4 "2020-12-11T03:01:52Z")

</div>

Filling only happens between standalone slices (that have completely empty neighbors). Nothing is filled in the image above anymore, because none of the slices look like standalone (there are 2 or more neighbor non-empty slices).

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 11, 2020, 6:57pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/5 "2020-12-11T18:57:21Z")

</div>

Ok got it. So to make the filling happens how many empty slices should be between each slice. I will go try it again and update you

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:** [December 11, 2020, 7:10pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/6 "2020-12-11T19:10:47Z")

</div>

Each slice that you need to fill between has to be a single slice with at least one empty slice on each side.

If two or more neighbor slices are segmented then it will be considered as a complete 3D object and will not be connected to other slices on either side.

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 11, 2020, 10:24pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/7 "2020-12-11T22:24:40Z")

</div>

Hi I have re-segmented as shown (1) . However when i try fill in between slices it is not working and I am not sure why, the gaps between each slices are not connecting

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/6/461524af10317991fbbcd619526cae6aec452bd0.jpeg) (1)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/d/8d5828e9a3694ab31294bfbacc6e4ccaaed7184a.jpeg) (2)

Thank you very much for your help

---

<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:** [December 11, 2020, 11:17pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/8 "2020-12-11T23:17:17Z")

</div>

Sorry for all the troubles. It seems that you segment on oblique slices (you can see that from the warning icon displayed next to the segmentation node selector). This way when you paint on one slice, you actually paint on several slices of the segmentation. Unfortunately, fill between slices algorithm always works on the original slices, cannot work on oblique slices.

You can either try Grow from seeds effect (that does not require this strict slice-by-slice painting), or you can resample the segmentation geometry with rotated axes.

Knee MRI segmentation is hard, but it should be possible to establish a good segmentation workflow.

@carlp I saw some amazingly high quality knee segmentations from you. Could you help with some advice here? Or - it’s soon time for Christmas, so maybe I can ask such things - could you create a screencast video that shows how you segment a knee?

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 11, 2020, 11:23pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/9 "2020-12-11T23:23:34Z")

</div>

Hi Andras,

thank you very much. I will explore the grow from seeds effect options as well as rotated axes. But may I know how does the rotated axes work?

Also the screencast will be insanely helpful as i am trying to obtain a geometry for a FEA analysis, meaning that i would require a a decent quality of the knee segmentation.

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:** [December 11, 2020, 11:28pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/10 "2020-12-11T23:28:41Z")

</div>

See this page for more information on segmentation on oblique slices: [https://lassoan.github.io/SlicerSegmentationRecipes/ObliqueSliceSegmentation/](https://lassoan.github.io/SlicerSegmentationRecipes/ObliqueSliceSegmentation/)

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 11, 2020, 11:30pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/11 "2020-12-11T23:30:00Z")

</div>

Thank you. I will let you know how I get on. Hope you and your family have a nice Christmas

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 14, 2020, 10:15pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/12 "2020-12-14T22:15:00Z")

</div>

Hi currently I am just segmenting each slice as I only need the overall geometry and i will redraw the structure in solidworks. However I ran into a problem where if i paint something in one slice it affects its direct neighbour slice,

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/5/c50063857130f12e6b2aa93527b757a7f11a3a81.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/9/b992c131ccf1d2f47a83cf081b52e0158a171a17.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:** [December 15, 2020, 3:26am UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/13 "2020-12-15T03:26:13Z")

</div>

This is normal when you segment on oblique (non-axis oriented) slices. See this page for more details: [https://lassoan.github.io/SlicerSegmentationRecipes/ObliqueSliceSegmentation/](https://lassoan.github.io/SlicerSegmentationRecipes/ObliqueSliceSegmentation/)

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 19, 2020, 10:54pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/14 "2020-12-19T22:54:48Z")

</div>

HI,  
i have tried the grow from seed it indeed works faster but i want to ask why is my segmentation coarse, as shown below. Thank you

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

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [December 20, 2020, 10:38am UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/15 "2020-12-20T10:38:13Z")

</div>

I think that is because of low resolution.

Few thigns that come to my mind that you can do is,

1. Oversample (from segment editor, specify geometry option)
2. reslice it useing Crop volume (Setting spacing scale to \<1.0x )
3. Apply smoothing

I prefer reslicing because oversample for me takes too much power.

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 20, 2020, 2:37pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/16 "2020-12-20T14:37:31Z")

</div>

ok got it thank you. i will try another CT scan see if it has a better resolution.

---

<div class="post-metadata">

**Author:** ![Chungmh](https://avatars.discourse-cdn.com/v4/letter/c/d2c977/32.png) [@Chungmh](https://discourse.slicer.org/u/Chungmh)\
**Post date:** [December 27, 2020, 1:59pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/17 "2020-12-27T13:59:18Z")

</div>

Hi I am currently trying to use the oversampling option, I want to ask what does it actually achieve?  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/4/74efed07ff5ffac9e81f96e816188d1b7692b9c6.png)  
my model turned like this after

Thank you.

Hope you had a lovely holiday

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [December 27, 2020, 3:14pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/18 "2020-12-27T15:14:06Z")

</div>

You can see in this post.

> [@Oversampling and Spacing in crop](https://discourse.slicer.org/t/oversampling-and-spacing-in-crop/14549/2):
>
> Exactly. We can call oversampling “digital zoom”.
> 
> It does not add new information (the oversampled image should look exactly the same as the original), it just allows representing finer details in the image or segmentation. For example, if you apply a sharpening filter then you can enhance finer details, or if you segment structures, you can represent thinner walls or smaller vessels.

---

<div class="post-metadata">

**Author:** ![Carlp](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carlp/32/8981_2.png) [@Carlp](https://discourse.slicer.org/u/Carlp)\
**Post date:** [March 2, 2021, 12:05pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/19 "2021-03-02T12:05:03Z")

</div>

Greetings and thanks for the kind words =]

You can find several video demonstrations of our knee segmentation software using AI on [nordiccad.com](https://nordiccad.com)

---

<div class="post-metadata">

**Author:** ![radiodid](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@radiodid](https://discourse.slicer.org/u/radiodid)\
**Post date:** [August 30, 2022, 3:04pm UTC](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997/20 "2022-08-30T15:04:54Z")

</div>

Hi  
Maybe someone knows how to solve the same problem for CT only? Fill between slices does not work. Instead, the slices just get thicker but don’t merge. It’s definitely not a problem with a CT scan, because I tried to do it on another PC and everything was fine. It is also not possible to label other CTs, even in different projections.  
I tried to reinstall the application, and reboot the PC - same problem.

[Next page](https://discourse.slicer.org/t/fill-between-slices-horizontally/14997.md?page=2)
