# Threshold preview and result are different

**URL:** <https://discourse.slicer.org/t/threshold-preview-and-result-are-different/3275>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [June 25, 2018, 10:26am UTC](https://discourse.slicer.org/t/threshold-preview-and-result-are-different/3275 "2018-06-25T10:26:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)\
**Post date:** [June 25, 2018, 10:26am UTC](https://discourse.slicer.org/t/threshold-preview-and-result-are-different/3275/1 "2018-06-25T10:26:54Z")

</div>

Hi all,

One clinician I’m working with noticed how he gets more little blobs/islands/connected components than he expected from the segmentation preview after applying a threshold in Segment Editor. Can this be avoided?

Preview:

 ![Screenshot](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/e/fe5ebd64d0d04df94454597a9ef56e51ffcb5aee.jpeg)

Result:

 ![Screenshot_2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/9/39a973dd7f5c437337985a991f2e917c09e625f1.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 25, 2018, 10:54am UTC](https://discourse.slicer.org/t/threshold-preview-and-result-are-different/3275/2 "2018-06-25T10:54:28Z")

</div>

The reason for the difference is probably that the preview is applied on the slice view, whatever zoom/etc is used there, and threshold is applied on the actual image data. If she/he doesn’t zoom in too much, and maybe turns off interpolation, then the results should be more similar.  
Also it’s possible to use the Islands filter to get rid of the speckes afterwards.

---

<div class="post-metadata">

**Author:** ![Fernando](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fernando/32/5640_2.png) [@Fernando](https://discourse.slicer.org/u/Fernando)\
**Post date:** [June 25, 2018, 11:17am UTC](https://discourse.slicer.org/t/threshold-preview-and-result-are-different/3275/3 "2018-06-25T11:17:14Z")

</div>

Turning off interpolation seems to fix it. Thanks @cpinter.

We do use the Islands\* effect to get rid of small speckles afterwards.

\* enjoy the Canary ones!

---

<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 25, 2018, 12:32pm UTC](https://discourse.slicer.org/t/threshold-preview-and-result-are-different/3275/4 "2018-06-25T12:32:29Z")

</div>

Sounds great, thanks!

\* We miss you here! Davide, Paolo and the others are saying hi 🙂
