[ImageJ-bugs] [Bug 854] New: Multithreading problem in javascript macro
bugzilla at fiji.sc
bugzilla at fiji.sc
Tue Jul 15 07:44:29 CDT 2014
http://fiji.sc/bugzilla/show_bug.cgi?id=854
Bug ID: 854
Summary: Multithreading problem in javascript macro
Product: Fiji
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P4
Component: Plugins
Assignee: imagej-bugs at imagej.net
Reporter: thomas.siegmund at evotec.com
CC: thomas.siegmund at evotec.com
Hi,
I've a a javascript macro running multithreaded as described in
http://fiji.sc/Multithreaded_Image_Processing_in_Javascript.
The script analyzes several images in parallel. For each image it loops over a
few hundered cell clusters and analyzes the nuclei within using the
ParticleAnalyzer. Most of the code seems to work fine, but within these few
lines there is a problem:
// now count and measure nuclei within
var nucleiMeasurements = Measurements.AREA + Measurements.CIRCULARITY;
var rt_nuclei = new ResultsTable();
var nucleiPA = new ParticleAnalyzer(ParticleAnalyzer.SHOW_RESULTS +
ParticleAnalyzer.ADD_TO_MANAGER + ParticleAnalyzer.CLEAR_WORKSHEET,
nucleiMeasurements, rt_nuclei, nucleusMinSize, nucleusMaxSize,
nucleusMinRoundness, 1);
var nuclei_manager = new RoiManager(true);
nucleiPA.setRoiManager(nuclei_manager);
nucleiPA.analyze(dapiImg);
IJ.log("rt: "+ rt_nuclei.getCounter() + " rm: " + nuclei_manager.getCount());
var nNuclei = rt_nuclei.getCounter();
if(nNuclei != nuclei_manager.getCount()) {
// this happens only if the script runs multithreaded. ???
IJ.log("number of nuclei != number of ROIS !!!!: "+image+" "+i+", nNuclei
"+nNuclei+", nucleiRoisLength "+nuclei_manager.getCount());
}
Maybe I'm doing something stupid here, but it seems to work perfectly if
running single threaded. The number of ROIs in the manager is the same as the
number of entries in the results table. But whenever I run this multithreaded
it fails in one out of a few hundered cell clusters.
Tested with current Fiji on Linux and Windows as well as with older versions of
Fiji.
Thanks
Thomas
Information about your version of Java:
os.arch => amd64
os.name => Linux
os.version => 3.4.63-2.44-desktop
java.version => 1.6.0_24
java.vendor => Sun Microsystems Inc.
java.runtime.name => Java(TM) SE Runtime Environment
java.runtime.version => 1.6.0_24-b07
java.vm.name => Java HotSpot(TM) 64-Bit Server VM
java.vm.version => 19.1-b02
java.vm.vendor => Sun Microsystems Inc.
java.vm.info => mixed mode
java.awt.graphicsenv => sun.awt.X11GraphicsEnvironment
java.specification.name => Java Platform API Specification
java.specification.version => 1.6
sun.cpu.endian => little
sun.desktop => null
file.separator => /
The up-to-date check says: REMIND_LATER
Information relevant to JAVA_HOME related problems:
JAVA_HOME is set to:
/usr/local/src/Fiji.app/java/linux-amd64/jdk1.6.0_24//jre
imagej.dir => /usr/local/src/Fiji.app
Information about the version of each plugin:
Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20140712000647)
Fiji: http://fiji.sc/update/ (last check:20140715020940)
Files not up-to-date:
9dda14a8 (LOCAL_ONLY) 20100729201826 macros/js/AA_README.txt
20e2cec7 (LOCAL_ONLY) 20140207105410 plugins/ICTN_1_6_.jar
d3260180 (LOCAL_ONLY) 20110303204101 scripts/Record_Desktop.py
0ea7f8fc (LOCAL_ONLY) 20110303204101 scripts/Record_Window.py
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20140715/94967f32/attachment.html>
More information about the Imagej-bugs
mailing list