# Need help with segmentation of image stack

**URL:** https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415
**Category:** Support
**Tags:** segmentation
**Created:** [March 7, 2021, 3:33pm UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415 "2021-03-07T15:33:26Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![11142](https://avatars.discourse-cdn.com/v4/letter/1/e0b2c6/32.png) [@11142](https://discourse.slicer.org/u/11142)
#### Post date: [March 7, 2021, 3:33pm UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/1 "2021-03-07T15:33:26Z")

</div>

Hi, have you solved your problem now? I NEED 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: [March 7, 2021, 4:53pm UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/2 "2021-03-07T16:53:43Z")

</div>

How far did you get?

---

<div class="post-metadata">

### Author: ![11142](https://avatars.discourse-cdn.com/v4/letter/1/e0b2c6/32.png) [@11142](https://discourse.slicer.org/u/11142)
#### Post date: [March 8, 2021, 1:45am UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/3 "2021-03-08T01:45:59Z")

</div>

I’ve read the referred segmentation guide but it seems a little bit far from my problem. My images are a series of parallel x, y, z cross sections, do you have any advice on building a 3D model from these slices? Or is there any code for me to probe into?

---

<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: [March 8, 2021, 2:05am UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/4 "2021-03-08T02:05:31Z")

</div>

> [@11142](#):
>
> do you have any advice on building a 3D model from these slices?

Normally the flow is to segment the region of interest either through some manual (paint/draw) or semi-automated methods (threshold, grow from seeds) with the `Segment Editor` and then use the `Segmentations` module to convert it into a 3D model.

If you share some screenshots of what your data looks like we can probably give more specific advise.

---

<div class="post-metadata">

### Author: ![11142](https://avatars.discourse-cdn.com/v4/letter/1/e0b2c6/32.png) [@11142](https://discourse.slicer.org/u/11142)
#### Post date: [March 8, 2021, 2:29am UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/5 "2021-03-08T02:29:58Z")

</div>

Here are two slices in the same direction. Outside the outline is the waves. Most of the images look similar to these two.

 ![sections_z1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/8/6866fa61ef4ea69a570b832a9287cc6c488c97ec.png) ![sections_z6](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/8/a8e2599ba135e7366ab27acb90881ee3d866a7d3.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: [March 8, 2021, 4:02am UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/6 "2021-03-08T04:02:15Z")

</div>

And what is that you want to build 3D model out of these cross-sections, the little white bump at the bottom?

---

<div class="post-metadata">

### Author: ![11142](https://avatars.discourse-cdn.com/v4/letter/1/e0b2c6/32.png) [@11142](https://discourse.slicer.org/u/11142)
#### Post date: [March 8, 2021, 5:53am UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/7 "2021-03-08T05:53:13Z")

</div>

yeah, the white part

---

<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: [March 8, 2021, 6:28am UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/8 "2021-03-08T06:28:52Z")

</div>

Because the white region is continuous with the border, I am not sure if any of the automated methods will work, but it will be real simple to do slice by slice with the draw tool and masking (set intensity range to 255-255, so it only picks up the white).

Alternatively, if the cross-sections always like that, perhaps you can actually segment just the solid black via simple threshold, and then use the surface cut tool to fill the indentation.

---

<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: [March 8, 2021, 10:33am UTC](https://discourse.slicer.org/t/need-help-with-segmentation-of-image-stack/16415/9 "2021-03-08T10:33:50Z")

</div>

If the image’s source are Radio Frequency, I suggest to use Hilbert(envelope) filter before segmentation. probably later a mean filter. Then it will be easier to segment the image using Slicer tools.
