Analyze Particle Not Working On Thresholded Images

Lately, when I try to run ‘Analyze>Analyze Particles…’ on one channel of a 16-bit, 2 channel, 1 slice, 1 frame, anywhere from 500x500 to 3740x3740 pixel thresholded image, 95% of the time, I get the following error message:
“A thresholded-image or 8-bit binary image is required. Threshold levels can be set using the Image>Adjust>Threshold tool.”
Indeed, between clicking “OK” in the ‘Analyze Particles’ menu and clicking “No” in the ‘Process Stack?’ menu, the red overlay of the thresholded pixels disappears. I’m really hoping someone can shed light on this because I encounter the same issue when I try this on the same images using the same version of FIJI/ImageJ (Version 1.52p)/Java (Version 8 Update 261 (Build 1.8.0_261-b12) installed on another computer (another Mac). My computer is a MacBook Pro running MacOS Catalina 10.15.5.

Hi @snerdlock13,

if you only set the threshold manually (you will see the red indicator) the image is not really thresholded. You need to hit the apply button in the thresholding dialog.
Then you should receive a (black and white only) 8-bit binary image. After that Analyze Particles... should work as intended.

Thanks @biovoxxel. Your suggestion is a nice workaround. The only thing is Analyze Particles… has worked for 17 years up until recently for me straight off of the non-applied thresholded pixels and still does even now (a small percentage of the time). If possible I would like to find a fix to get Fiji/ImageJ working the way it used to as it is significantly faster that way. Thanks again for the reply!

It is actually the standard not the workaround. :wink:
You get it super fast if you work with macros to automate it. Furthermore, instead of using manual thresholds it is in most cases superior to use AutoThresholds for most types of images and segmentation situations

Yeah, I am already working within a macro, and I may not have been clear earlier but I am indeed using the AutoThresholds feature. The issue is that what I am trying to do is first break the entire image up into a bunch of ROIs using Find Maxima… segmentation then go through each ROI one-by-one and automatically set the threshold based only on that ROI (not the entire image) and then use Analyze Particles… within that ROI to find relevant objects. I find that this procedure is better able to segment the image in a way that is not thrown off by local differences in signal-to-noise ratio within the entire image. My present issue with using the approach of using the “run(“Convert to Mask”, “method=Li background=Light calculate”);” command (i.e. the apply button) rather than using Analyze Particles… straight from the overlayed red pixels is that it seems to use the entire image (whereas the latter just uses the selected ROI) when automatically setting the threshold. In light of this, I am able to use a bunch of extra lines of script to workaround this issue but it slows the macro way down. My question therefore is, why has a feature of Fiji/ImageJ that has worked reliably for 17 plus years suddenly stopped working? Is this intentional? If so, why replace a function that is more versatile with one that is less so? Thanks again for engaging with me on this :slight_smile:

1 Like