# Threshholding a binary image

**URL:** <https://discourse.slicer.org/t/threshholding-a-binary-image/7055>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [June 6, 2019, 12:44pm UTC](https://discourse.slicer.org/t/threshholding-a-binary-image/7055 "2019-06-06T12:44:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kasra\_Arnavaz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kasra_arnavaz/32/3789_2.png) [@Kasra\_Arnavaz](https://discourse.slicer.org/u/Kasra_Arnavaz)\
**Post date:** [June 6, 2019, 12:44pm UTC](https://discourse.slicer.org/t/threshholding-a-binary-image/7055/1 "2019-06-06T12:44:47Z")

</div>

Slicer version: 4.10.0

I would like to segment a stack of tiff files in Segment Editor. This should have been quite simple because there are only 0 and 255 pixel values, but to my surprise some part of the image are not segmented correctly. Any idea why this occurs and how to fix it?

 ![Untitled](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/2/52ec27198aa5067590ef44f714df833e98fe2ffe.png)

---

<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 6, 2019, 1:24pm UTC](https://discourse.slicer.org/t/threshholding-a-binary-image/7055/2 "2019-06-06T13:24:47Z")

</div>

There could be many reasons for this. Instead of trying to guess which one is it, could you please upload somewhere an example scene (in .mrb format - click the package icon in the save data window) and send us the link?

If the image is already segmented then I would recommend to load it as a labelmap volume (choose “Show options” and click “LabelMap” in “Add data” window) then convert it to segmentation (in Data module, right-click on it and choose "Convert labelmap to segmentation node).

---

<div class="post-metadata">

**Author:** ![Kasra\_Arnavaz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kasra_arnavaz/32/3789_2.png) [@Kasra\_Arnavaz](https://discourse.slicer.org/u/Kasra_Arnavaz)\
**Post date:** [June 7, 2019, 12:18pm UTC](https://discourse.slicer.org/t/threshholding-a-binary-image/7055/3 "2019-06-07T12:18:04Z")

</div>

Thank you very much Andras! That solved my problem. The visibility options in Data module is a bit tricky but I can find my segmentation under Segment Editor as well.

As for why this is happening, I have created the .mrb file in case you have the time to take a look at.  
[https://we.tl/t-JCxiKzYHy3](https://we.tl/t-JCxiKzYHy3)
