Re: Connectivity used in "Analyze Particle ..." and "Wand (tracing) Tool"

Posted by Gabriel Landini on
URL: http://imagej.273.s1.nabble.com/Delaunay-update-tp3694375p3694378.html

On Thursday 27 November 2008 16:57:39 Karsten Rodenacker wrote:

> Hi, Image analysis and -J experts,
>
> I have an example were I don't fully understand the routines "Analyze
> Particle ..." and "Wand (tracing) Tool"!
>
> The image http://picasaweb.google.com/lh/photo/8Yo_5vJ1zLKZGwP22oDgsw
> delivers under "Analyze Particle ..." three particles (white is
> foreground). That is understandable, seemingly eight-connected
> neighborhood (of foreground) is assumed. Possibly four-connectedness
> could be helpful in such cases with thin lines dividing the particles.

I think that your image has 4-conn particles. If you run Particles4 plugin with the label option you will get 20 particles.
If you created this with a watershed/skeletonisation, then to make it easier, you could use a 4-conneected watershed (which should give 8-connected particles).

If you analyse the image with the Particles8 plugin you get only 3 particles.

> But now, trying to overcome this problem by selecting the particles
> with "Wand (tracing) Tool", possibly in a macro, I run into
> difficulties. Clicking into particles on the left side of the image
> selection is okay, Wand is using 4-connectedness! Clicking into one of
> the two right-most particles seemingly wand is selecting background!
>
> Is there any way to select one of these two right-most particles?

That is a job for the BinaryReconstruct4 plugin in the Morphology collection. Now this is not compiled into a class, because I have not had time to test it thoroughly. If you test it, please send me some feedback.

You could get the XStart YStart points with Particles4, then create a new image with those pixels set for the particles you want to select and BinaryReconstruct4 with the original as mask and the new image as seed.

I hope it helps.

Gabriel