Posted by
Gabriel Landini on
Dec 10, 2005; 3:39pm
URL: http://imagej.273.s1.nabble.com/Analyze-particle-Flood-fill-tp3704248p3704253.html
On Saturday 10 December 2005 13:32, Philippe Grosjean wrote:
> Yes, but:
> //Test_1b "Limit" and "not Flooding" with manual thresholding
> run("Colors...", "foreground=white background=black selection=yellow");
> run("Options...", "iterations=1 black count=1");
> newImage("test", "8-bit Black", 200, 200, 1);
> makeOval(40, 28, 139, 139);
> run("Draw");
> run("Select None");
> run("Dilate");
> setThreshold(128, 255);
> run("Threshold", "thresholded remaining black");
> run("Set Measurements...", "area limit redirect=None decimal=3");
> run("Analyze Particles...", "size=1-999999 circularity=0.00-1.00
> show=Nothing display clear record");
> //--------------------------
> Area XStart Ystart
> 1 16036 100 27
> //--------------------------
Hi Philippe,
There is some error in the macro above. Note that the macro is set to use
white particles and you are thresholding the image to remain "black":
run("Threshold", "thresholded remaining black");
The line above is not needed because the threshold is set between 128 and 255,
but the "object" after thresholding is black (i.e. 0).
Note that after running the line above, the threshold is set to (0,0) (if
black is selected, 255,255 if it is not selected) and the macro finds luckily
the particle.
With the macro you sent I still get:
Area XStart Ystart
1 1668 100 27
I think the macro should include:
setThreshold(128, 255);
and the next line ignored.
The particle analysis does not need a binarised image, but just a threshold
set.
With the corrected macro below I also get:
Area XStart Ystart
1 1668 100 27
which is still not the expected result anyway.
Here is the macro I think we should be using:
//Test_1c "Limit" and "not Flooding" with manual thresholding
run("Colors...", "foreground=white background=black selection=yellow");
run("Options...", "iterations=1 black count=1");
newImage("test", "8-bit Black", 200, 200, 1);
makeOval(40, 28, 139, 139);
run("Draw");
run("Select None");
run("Dilate");
setThreshold(128, 255);
run("Set Measurements...", "area limit redirect=None decimal=3");
run("Analyze Particles...", "size=1-999999 circularity=0.00-1.00 show=Nothing
display clear record");
// -------------------
Can you run this corrected macro above and report the result (and post which
IJ version and platform. If we have different results, then there is
something else playing up)?
Thanks.
Regards,
Gabriel