New Segment Editor effect: Local threshold


I found it a very nice feature. However, while trying to use it, i found that after selecting a threshold and ctrl plus left click-it doesn’t do anything. I mean no filling is done. Is there anything I am missing?


Local threshold effect attempts to reduce leaking and separates the structure that you clicked on by eroding the thresholded area by the “feature size” parameter.

If the area under the mouse would be eroded away, then the local threshold effect will not find the structure. If you reduce the “feature size” parameter, or make sure to click in a non-eroded region, than it should help find the structure.

1 Like

Late reply and perhaps this is documented somewhere else, but on MacOS it is command-click to add, not control-click.

Most excellent feature, by the way. Thanks!

1 Like

I still don’t succeed on MacOS:
After selecting the right threshold and after I click cmd+left mouse button it does not add the blinking area to the segmentation?
anyone has a solution for that behaviour?

Did you try it with a sample data download like from the video?

Yes! But I don’t get it: pressing cmd+left click (I assume mouse left click) - where (in which window) and when should I press these buttons???

e.g if I use level tracing than I just need to left-click on the mouse and I immediately see the segmented area - however in local threshold the region is getting lighter and darker green constantly but if I press cmd+left click nothing happens…

That part that you Ctrl-Click on is added to the segment. If nothing is added then it means that the region found at the clicked position is smaller than the feature size. You need to extend the threshold range or decrease “Feature size”.

In the meantime I accidentially! managed to add a part to the segment, however repeating fails…no matter what feature size I choose (1-10cm) for my threshold, I can’t segment the implant.

Have you tried lowering the feature size all the way to 0?


Thanks for this hint! now it works very smooth!

I want to most accurately segment the implants (as shown in the figure above) in order to measure the blooming artefact - which algorithm would be the one of choice?
e.g. after using watershed, creating a labelmap and superimposing it with the original scan -> I still can see a thin (white/greyish) border around my segmented implant before the adjacent black circle.
Or would you recommend any other algorithm in order to measure blooming?

The “difference” is probably not real, it is probably just a result of using linear interpolation for grayscale volumes and nearest neighbor interpolation for segmentation’s binary labelmap representation. You can verify this by disabling interpolation for the volume. You can reduce the difference between these interpolations by reducing the pixel spacing of the input volume (for example, by using Crop volume module) before you start segmentation.

1 Like

Hi Kyle Sunderland,
A very nice function in Local Threshold. But I found it is difficult to understand clearly.How to define the Minimum, Lower, Average, Upper and Maximum value in Local histogram? What the meaning about the red line, yellow line and the curve between them? Moreover, how to set the Feature Size basing on the Volume?

The histogram represents the voxel intensities within the selected region of the image. The red lines on the left and right represent the minimum and maximum voxel intensities in the selected region, while the the the yellow line represents the average intensity. The yellow highlight underneath the histogram shows the current threshold range.

Clicking and dragging on the histogram will let you manually specify the minimum/maximum intensities. The average then becomes the median intensity between the two. Right clicking on the histogram will cancel the manual selection.

If you would like finer control over the threshold range, the threshold range slider can be used without, or in conjunction with the histogram to specify the range.

The required feature size depends on the structure being segmented. A larger feature sizes will prevent leaking through regions that are smaller than the feature size, however for thin structures, a feature size that is larger than the thinnest regions will result in the branches being truncated.

@Sunderlandkyl This is an excellent summary! It would be great if you could add that to (maybe with an additional annotated screenshot). This documentation will be moved to Slicer core documentation when the effect is moved into the Slicer core.

1 Like

Hi, I’m trying to use this effect as it is used in your video, but I’m unable to draw a region in the image to obtain a local histogram, nor do I have the local histogram graph visible. Did I somehow not install the correct extension? This is what my control panel looks like:

@Henry_Cope which version of Slicer are you using? The Histogram is not available in Slicer 4.10.2.

Ah then that’s the issue! I’m using 4.10.2.
Thank you

Hi! I’m new to slicer and an amateur in this field. But I would like to download the local threshold effect into my slicer (4.10.2). I’ve tried, but I can’t seem to figure it out. Could you maybe help?

Thankyou in advance!

It is available for Slicer-4.11 version only.

Hi all,

This extension sounds promising.

I have few issues though.
So first, I draw a circle around my ROI then I edit the threshold of the local histogram. But how can I save the segment? I tried Ctrl + left click, the area keep blinking.

Another question please, is there any way to use fixed threshold (like 40% of SUVmax in PET)?

Appreciate your help,