[ImageJ-bugs] [Bug 1175] Macro stops running when no object found 3D object Count
bugzilla at fiji.sc
bugzilla at fiji.sc
Wed Oct 21 11:47:56 CDT 2015
http://fiji.sc/bugzilla/show_bug.cgi?id=1175
Curtis Rueden <ctrueden at wisc.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Curtis Rueden <ctrueden at wisc.edu> ---
This problem occurs when the threshold given is outside the range of the data.
The UI does not allow you to input such thresholds, but from a macro it is
possible -- hence the error message.
You can work around it with the following code:
newImage("HyperStack", "8-bit color-mode", 121, 154, 1, 114, 1);
getStatistics(area, mean, min, max, std, histogram);
if (max < 128) threshold = max;
else threshold = 128;
print "Using threshold of " + threshold);
run("3D Objects Counter", "threshold=" + threshold +
" slice=50 min.=10 max.=2124276 " +
"objects surfaces centroids centres_of_masses statistics summary");
You may need to do something similar for invalid values of other parameters
too; I'm not sure.
I guess the plugin could be changed to not show this error message when running
from a macro. If anyone wants to adopt the 3D Objects Counter plugin (currently
unmaintained), that would be great.
--
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/20151021/7afbdb32/attachment.html>
More information about the Imagej-bugs
mailing list