|
Bugzilla – Bug 1175 |
Macro stops running when no object found 3D object Count |
Last modified: 2015-10-21 11:47:56 CDT |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
| Macro stops running when no object found 3D object Count | |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
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.