# local threshold: bugs or features?

**URL:** <https://discourse.slicer.org/t/local-threshold-bugs-or-features/40671>\
**Category:** Support\
**Created:** [December 13, 2024, 5:06am UTC](https://discourse.slicer.org/t/local-threshold-bugs-or-features/40671 "2024-12-13T05:06:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sulli419](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sulli419/32/78859_2.png) [@sulli419](https://discourse.slicer.org/u/sulli419)\
**Post date:** [December 13, 2024, 5:06am UTC](https://discourse.slicer.org/t/local-threshold-bugs-or-features/40671/1 "2024-12-13T05:06:33Z")

</div>

First off thanks for this fantastic software. I see a small team of people helping in the forums, so really appreciate what you do and imagine it is an immense amount of work!

I’m relatively inexperienced with slicer. I noticed the new local threshold tool. When use the funny round circle tool to select a range of pixels it seems to segment amazingly well, but for fine tuning I’m less sure… Like what is Ctrl+ click is doing, where are you supposed to click relative the circle of pixels I select? why can’t I paint a precise discontinuous set of pixels to set my local threshold maybe even between slices? how to interpret the rules for the local histogram? I’m also noticing something where I can create two segments with local thresholding, but when I got to third, it never commits the flashing pixels to a segment. If I click away and come back nothing has been segmented. Is there a detailed video that explains local thresholding (many don’t have audio and the resolution is poor) or can someone point me to where the most detailed documentation is.

Much appreciated,  
Thanks

---

<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 13, 2024, 5:17am UTC](https://discourse.slicer.org/t/local-threshold-bugs-or-features/40671/2 "2024-12-13T05:17:37Z")

</div>

> [@sulli419](#):
>
> what is Ctrl+ click is doing

Creates a seed for segmentation and then uses that seed for region growing.  
The seed is generated by thresholding with the chosen intensity range, then keeping the island where you Ctrl-clicked.

> [@sulli419](#):
>
> why can’t I paint a precise discontinuous set of pixels to set my local threshold maybe even between slices

You can certainly do this, by simply using the `Paint` effect and then using `Grow from seeds` effect. `Local threshold` just automates painting of the seed (replaced 5-10 clicks by one click).

> [@sulli419](#):
>
> but when I got to third, it never commits the flashing pixels to a segment

When the island at the clicked position is determined, the thresholding result is eroded to prevent small, thin connections between islands leading to adding unrelated regions to the seed. If the region you clicked on was relatively small then this erosion removes it completely and nothing can be drawn there. You can reduce the `Minimum diameter` parameter to avoid this.

---

<div class="post-metadata">

**Author:** ![sulli419](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sulli419/32/78859_2.png) [@sulli419](https://discourse.slicer.org/u/sulli419)\
**Post date:** [December 20, 2024, 7:17pm UTC](https://discourse.slicer.org/t/local-threshold-bugs-or-features/40671/3 "2024-12-20T19:17:02Z")

</div>

Thanks for your explanation Iassoan. I was taking some time to play around with local threshold in light of what you said. After installing a few extensions it appeared my “stable install v.5.6” was misbehaving. From the forums it sounded like you recommend using the “preview release” (now v. 5.7). I installed this and it seems to have fixed some issues, but now I don’t see local thresholding as a button in the segment editor. Are you phasing out this feature? All best

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [December 20, 2024, 7:35pm UTC](https://discourse.slicer.org/t/local-threshold-bugs-or-features/40671/4 "2024-12-20T19:35:29Z")

</div>

Please try installing SegmentEditorExtraEffects extension

HIH

---

<div class="post-metadata">

**Author:** ![sulli419](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sulli419/32/78859_2.png) [@sulli419](https://discourse.slicer.org/u/sulli419)\
**Post date:** [December 20, 2024, 8:17pm UTC](https://discourse.slicer.org/t/local-threshold-bugs-or-features/40671/5 "2024-12-20T20:17:25Z")

</div>

Thanks. That did the trick. As an added note: At first glance it seems like the local threshold feature added this way, to version 5.7 preview, works more smoothly. I can run it on several segments without getting errors, albeit, this could be a coincidence.
