Overlay troubles with AnalyzeParticles

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Overlay troubles with AnalyzeParticles

Laurent.guerard
Hi,

I'm writing a macro to detect and measure green and red area in images and I am using the Analyze Particles plugin to do so.

However, I would like to save the overlay, the detected "particles", in the image which I have succeded. But when examining the output from this plugin, I can see that the measurements are ok but the region shown by the overlay are not.

What I mean is that, for example, it doesn't take into consideration the holes in an object and only show the outlines of the objects even though I ask for the overlay.

Any ideas ? I tried with this "finding edges" plugin but it doesn't filter out small objects like Analyze Particles..

Thanks !
Reply | Threaded
Open this post in threaded view
|

Re: Overlay troubles with AnalyzeParticles

Laurent.guerard
Ok nevermind I figured out how to do it.

By using the masks display in the Analyze Particles and then inverting it, it is possible to find edges only for objects that were bigger than the size set for the Analyze Particles.

This is not very clear but it's working.
Thanks anyway !
Reply | Threaded
Open this post in threaded view
|

Re: Overlay troubles with AnalyzeParticles

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Laurent.guerard
> On Nov 24, 2015, at 3:16 AM, Laurent.guerard <[hidden email]> wrote:
>
> Hi,
>
> I'm writing a macro to detect and measure green and red area in images and I
> am using the Analyze Particles plugin to do so.
>
> However, I would like to save the overlay, the detected "particles", in the
> image which I have succeded. But when examining the output from this plugin,
> I can see that the measurements are ok but the region shown by the overlay
> are not.
>
> What I mean is that, for example, it doesn't take into consideration the
> holes in an object and only show the outlines of the objects even though I
> ask for the overlay.

The overlay only has the particle outlines but the holes will be taken into consideration if you enable “Limit to threshold” when measuring the overlay ROIs. Here is an example.

-wayne

  run("Fluorescent Cells (400K)");
  run("Duplicate...", "duplicate channels=2");
  setAutoThreshold("Otsu dark");
  run("Set Measurements...", "area mean min centroid")
  run("Analyze Particles...", "size=500-Infinity show=Overlay display clear");
  IJ.renameResults("Results-1");
  run("Set Measurements...", "area mean min centroid limit")
  for (i=0; i<Overlay.size; i++) {
     Overlay.activateSelection(i);
     run("Measure");
  }
 


>  Any ideas ? I tried with this "finding edges" plugin but it doesn't filter
> out small objects like Analyze Particles..
>
> Thanks !
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Overlay-troubles-with-AnalyzeParticles-tp5015012.html
> Sent from the ImageJ mailing list archive at Nabble.com.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Overlay troubles with AnalyzeParticles

Laurent.guerard
Hello again,

Thanks Wayne, I'll look into that ! :)

For the moment, the mask+finding edge combo works fine for what I want though.

Best,