# Help - "Fill between slices" - function not working properly

**URL:** <https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [April 14, 2023, 6:36pm UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923 "2023-04-14T18:36:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![FPRO](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fpro/32/65623_2.png) [@FPRO](https://discourse.slicer.org/u/FPRO)\
**Post date:** [April 14, 2023, 6:36pm UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/1 "2023-04-14T18:36:36Z")

</div>

Since I am working with the 3D-Slicer there is a problem with the function “fill between slices”. I am marking muscle frames (not the whole muscle, only the frame around) and using the “fill between slices”, so i do not have to mark it in every segment, but the longer i am using the function, the bigger the frames are getting. I think it is related to the number of fillings the function is doing on it´s own, in the beginning it was fine but after round about 50 slices, the frames became bigger and bigger, so the frame is not very useful anymore.

Maybe there is someone who had a similar problem and found a solution to it.

Best regards

Operating system: Windows 11  
Slicer version: 5.2.2.  
Expected behavior:  
Actual behavior:

---

<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 15, 2023, 3:04am UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/2 "2023-04-15T03:04:55Z")

</div>

Can you attach a screenshot that shows what you mean by muscle frames?

Do you press “Apply” in

> [@FPRO](#):
>
> frames became bigger and bigger,

Getting bigger in what sense? Can you attach a few screenshots?

---

<div class="post-metadata">

**Author:** ![FPRO](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fpro/32/65623_2.png) [@FPRO](https://discourse.slicer.org/u/FPRO)\
**Post date:** [April 15, 2023, 10:55am UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/3 "2023-04-15T10:55:56Z")

</div>

Thank you for the quick reply!

I was pressing “initialize” and then apply. Maybe about 5-10 times while segmentating the data. In the attachment are the screenshots, I hope it becomes clear what I meant by “muscleframes”.  
these enlarged outlines came especially when I marked other structures. I suspect that with each use of the function, the outlines of the muscle have become slightly larger.

![3D - before](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/a/3a270c52318bd13f00cfb06b454f67eeb59743df.png)  
 ![3D - after](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/b/ab77a36ab6a51f3456fb3978ca42adb718b75954.png)  
 ![axial - before](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/b/1b03863f2ef5737878939a9e4bd03579dd41ed07.png)

I send the last screenshot in an extra post, because as a new member I am only allowed to attach a maximum of three pictures.

Best regards

---

<div class="post-metadata">

**Author:** ![FPRO](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fpro/32/65623_2.png) [@FPRO](https://discourse.slicer.org/u/FPRO)\
**Post date:** [April 15, 2023, 10:57am UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/4 "2023-04-15T10:57:59Z")

</div>

![axial - after](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/a/aac424fdfa8d4972937a63f217cb249f1501efc3.png)

The first two images are of the 3D model at an earlier and later stage of the work. The 3rd and 4th images are the corresponding axial sections.

---

<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 16, 2023, 12:52pm UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/5 "2023-04-16T12:52:00Z")

</div>

Fill between slices needs to find correspondence between points on different slices, which is very hard if you have thin, hollow structures.

However, you may not need to segment hollow structures. Instead, you can segment the muscle using `Fill between slices` and then use `Hollow` effect to get its “frame”.

---

<div class="post-metadata">

**Author:** ![FPRO](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fpro/32/65623_2.png) [@FPRO](https://discourse.slicer.org/u/FPRO)\
**Post date:** [April 17, 2023, 6:54am UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/6 "2023-04-17T06:54:01Z")

</div>

Thank you very much for your advice, i will try it as you recommended!

---

<div class="post-metadata">

**Author:** ![Mehran](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mehran/32/11080_2.png) [@Mehran](https://discourse.slicer.org/u/Mehran)\
**Post date:** [April 17, 2023, 8:58am UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/7 "2023-04-17T08:58:29Z")

</div>

Hi, recently we provided new method for filling between slices which works for thigh muscles. you may try and be useful for you.  
[https://github.com/latimagine/SlicerSpline](https://github.com/latimagine/SlicerSpline)

---

<div class="post-metadata">

**Author:** ![FPRO](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fpro/32/65623_2.png) [@FPRO](https://discourse.slicer.org/u/FPRO)\
**Post date:** [April 17, 2023, 11:50am UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/8 "2023-04-17T11:50:15Z")

</div>

hello, thank you very much for the feedback, unfortunately the link is not available. Is it an add-on?  
Best regards

---

<div class="post-metadata">

**Author:** ![philippepellerin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/philippepellerin/32/16062_2.png) [@philippepellerin](https://discourse.slicer.org/u/philippepellerin)\
**Post date:** [February 28, 2025, 8:50am UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/9 "2025-02-28T08:50:32Z")

</div>

Hi Mehran, I followed your link to Github; your module looks great; congratulations.  
I am working on a Mac as a “final user” without much computer science skills.  
I saw that you ran it on Unbutu. I downloaded the package from GitHub, but I do not know what to do with it. Is there a way to run it on my Mac?  
If so, how can I do that?  
It would be great if we could find it in the extension manager.  
Thanks for any help

---

<div class="post-metadata">

**Author:** ![philippepellerin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/philippepellerin/32/16062_2.png) [@philippepellerin](https://discourse.slicer.org/u/philippepellerin)\
**Post date:** [March 2, 2025, 3:43pm UTC](https://discourse.slicer.org/t/help-fill-between-slices-function-not-working-properly/28923/10 "2025-03-02T15:43:16Z")

</div>

Hi. I have contacted Mehran, who kindly helped me install the module, which I did succesfully.  
Unfortunately, I still have an issue. I get an error when I try to run the module (see the screen capture). It seems to be related to the “read-only” quality of the temporary folder, which is needed. It is an issue specific to macOS. I have allowed full drive access to the Slicer application, but it is still the same. I do not know where to look for the temporary folder, which I need to set to write and read.  
Could anyone help me with this one?

 ![Screenshot 2025-03-02 at 16.28.17](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/a/0aff984b45c8ed53a6a870dd3344ea2522bea844.jpeg)
