Headless ImageJ2-rc2 - Analyze Particles returns no result
Posted by
Paul van Schayck on
Jun 11, 2014; 12:35pm
URL: http://imagej.273.s1.nabble.com/Headless-ImageJ2-rc2-Analyze-Particles-returns-no-result-tp5008127.html
Dear all,
I'm running into several problems running ImageJ2-rc2 headless. I'm using this command:
./ImageJ-linux64 --headless -macro scripts/test.ijm
The first one is that the new "Open images using scifio" breaks image opening through open("image.png"):
java.lang.NullPointerException
at net.imagej.legacy.IJ1Helper.updateRecentMenu(IJ1Helper.java:307)
at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:144)
at net.imagej.legacy.DefaultLegacyHooks.interceptFileOpen(DefaultLegacyHooks.java:427)
at ij.IJ.open(IJ.java)
This can be fixed by disabling the new SCIFIO option.
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. No particles seem to be found. Running the same macro not headless:
./ImageJ-linux64 -macro scripts/test.ijm
Will return a number of particles in a log window
Thirdly, the option "-macro" seems to be undocumented. Is this the preferred way to start macros? How about new scripts (.js or beanshell).
That were quite a few questions. Hope you can answer some of them.
Thank you,
Paul
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html