Posted by
Michael Schmid on
Jan 17, 2020; 2:25pm
URL: http://imagej.273.s1.nabble.com/Clean-up-ROIs-tp5022832p5022834.html
Hi Philippe,
if you convert the rois to a mask, you can use the wand tool in
4-connected mode to select only the core.
You will need to find an initial pixel for the wand.
Among all pixels contained in the roi, I would try to use the pixel
closest to the roi center as a starting position for the wand.
This staring position will not work if you have crescent-shaped
particles and the center happens to be at a small 'side particle' on the
concave side of the crescent. If this can happen, you will have to try
all different starting positions in the roi and see which one gives the
largest area (for each roi tried, change the value of the mask to
something else than 255 inside the roi, then you know that you don't
need to try that point again).
Java method:
(new Wand(ip)).autoOutline(startX, startY, /*tolerance=*/0,
Wand.FOUR_CONNECTED)
Best,
Michael
________________________________________________________________
On 17.01.20 15:02, CARL Philippe (LBP) wrote:
> Dear all,
> Please find under the following link:
>
http://punias.free.fr/ImageJ/Clean_up_ROIs.jpg> a picture of two ROIs.
> The ROI on the left had been obtained through a threshold process followed by an Analyze particles.
> As the right ROI is obtained by a "by hand cleaning" of the right one.
> My question is whether there may be a way to perform such a "cleaning" automatically?
> I thank you very much in advance for your lighting on this.
> My best regards,
> Philippe
>
> Philippe CARL
> Laboratoire de Bioimagerie et Pathologies
> UMR 7021 CNRS - Université de Strasbourg
> Faculté de Pharmacie
> 74 route du Rhin
> 67401 ILLKIRCH
> Tel : +33(0)3 68 85 41 84
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html