Login  Register

Re: Analyze particle & Flood fill

Posted by Philippe Grosjean on Dec 10, 2005; 1:32pm
URL: http://imagej.273.s1.nabble.com/Analyze-particle-Flood-fill-tp3704248p3704252.html

Gabriel Landini wrote:

> [...]
>
>>Hummm, I just double-check this (I use to check myself, and not to trust
>>the documentation too much, and I remember I did not care about "Limit
>>to threshold" in particle analysis, but don't remember why). Here is the
>>result on a particle with a hole in it:
>>                 Area   Mean  Skew    Kurt
>>FF - LTT        6569   209   -0.579  -0.122
>>FF - no LTT     6569   209   -0.579  -0.122
>>no FF - LTT     6815   210   -0.471  -0.155
>>no FF - no LTT  6815   210   -0.471  -0.155
>
>
> This is odd. I double checked too and my results do not agree with yours:
>
> //Test_1 "Limit" and "not Flooding"
> 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");
> setAutoThreshold();
> 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 1668 100 27
>
> //--------------------------

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

//--------------------------

I am completelly lost at this point! Why is autothreshold taken into
account differently than a manual threshold? The thresholded area is the
same, isn't it?

> //Test_2 "not Limit" and "not Flooding"
> 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");
> setAutoThreshold();
> run("Set Measurements...", "area 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
>
> //--------------------------
> // Test_3 "Limit" and "Flooding"
> 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");
> setAutoThreshold();
> run("Set Measurements...", "area limit redirect=None decimal=3");
> run("Analyze Particles...", "size=1-999999 circularity=0.00-1.00 flood
> show=Nothing display clear record");
> //--------------------------
> Area XStart Ystart
> 1 1668 100 27
>
> //--------------------------
> // Test_4 "Not Limit" and "Flooding"
> 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");
> setAutoThreshold();
> run("Set Measurements...", "area  redirect=None decimal=3");
> run("Analyze Particles...", "size=1-999999 circularity=0.00-1.00 flood
> show=Nothing display clear record");
> //--------------------------
> Area XStart Ystart
> 1 1668 100 27
> //--------------------------
>
>
> Three of the tests return the same result, unlike the results you posted.
>
> In the case of "Limit, not Flooding", the user may be thinking that by "not
> flooding" is counting the area of the holes as part of the particle, but it
> is not so. The "Limit" option seems to take precedence over the setting of
> the "Flood" option.
> In the examples above, it seems that if "Limit" is on, then "Flooding" setting
> does not do anything.
> That is why in the results above Test_1 gives the same result as Test_3 &
> Test_4.
>
> Would it be sensible to relegate "Limit" to just "Measure" and have no
> influence over "Flooding"?
>
>
>>This is when I redirect to a 8bit grayscale picture, but the result is
>>the same without redirection (just Skew & Kurt is not usable in that case).
>
>
> Maybe this is the source of problems.
> The above is without redirecting & there is only a single binary image.
>
>
>>So, this confirm to me that LTT (Limit to threshold) has no effect in
>>particle analyzer. So, there is no clash between "Flood fill" and "Limit
>>to threshold": they are used in different contexts.
>
>
> And the above confirms to me that there is an effect :-)
>
> Just for the record, I am using the latest 1.35j under suse linux with Java
> 1.5.0_06.
>
> If it is not too much trouble could you run those test with your set up and
> report what you get?
>
> Regards,
>
> Gabriel
>
>