Login  Register

Re: Headless ImageJ2-rc2 - Analyze Particles returns no result

Posted by dscho on Jun 11, 2014; 11:22pm
URL: http://imagej.273.s1.nabble.com/Headless-ImageJ2-rc2-Analyze-Particles-returns-no-result-tp5008127p5008149.html

Hi Paul,

On Wed, 11 Jun 2014, Johannes Schindelin wrote:

> On Wed, 11 Jun 2014, Paul van Schayck wrote:
>
> > The second one, is that this macro:
> >
> > open(imagePath);
> > run("8-bit");
> > setThreshold(1, 255);
> > run("Analyze Particles...", "size=300-Infinity circularity=0.40-1.00");
> > print(nResults);
> >
> > Will return 0.

Thank you for that reproducer script, it really saved me *a lot* of time.

What it uncovered, however, are two problems, not one. That's why it took
so long: in headless mode, we would not register legacy images properly,
and also -- a really, really longstanding bug! -- the headless generic
dialog never parsed numbers properly. It always returned 0. Therefore,
your circularity filter was converted into circularity=0.0-0.0.

I fear this bug goes way back into our first headless support days in
ImageJA, so it is really embarrassing, but all the better that you
uncovered it!

Unfortunately, I ran out of time today to clean up the fixes and upload
new file versions, but I promise to do that tomorrow.

Thank you for your patience,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html