Hi Patricia,
I think that the part of the problem is that the two images appear to be quit different in the intensity of the spheroids with respect to the background (dark in Cell1, fainter in Cell2 images). Also Cell1 seems to have lots of cells migrating out, compare to Cell2 which is more compact?

The following script segments reasonably well Cell2, but overestimates the are in Cell1 because of the number of detached cells from the main cluster. Hope it gives you some ideas on alternative ways of segmentation and perhaps you can adjust the phase microscope to get the more uniform images? The BinaryFilterReconstruct is from the Morphology collection and reduces the potential artefacts which are not spheroids, you might have to increase the number of erosions for other images).

a=getTitle();
run("Select None");
run("Duplicate...", "title=proc");
selectImage("proc");
run("32-bit");
run("Top Hat...", "radius=2");
run("Top Hat...", "radius=5 light don't");
setAutoThreshold("Default dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Fill Holes");
run("BinaryFilterReconstruct ", "erosions=3 white");
run("Create Selection");
selectImage(a);
run("Restore Selection");


Hope it is useful
Gabriel

On 04/03/2024 08:35, OBEID Patricia wrote:
CAUTION: This email originated from outside the organisation. Do not click 
links or open attachments unless you recognise the sender and know the content 
is safe.


Hello,
I would like to segment spheroids that are in microcavities.
For the first cell, all is ok.
Here are a few lines from my macro:
run("Duplicate...", " ");
run("Invert LUT");
setAutoThreshold("Moments dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Invert LUT");
run("Analyze Particles...", "size=6000-80000 display summarize add");

For the second cell, my problem is that I'm working in white light and the 
edges of the wells are also detected ....
One solution might be to do a threshold on the edges of the wells and the 
outside and remove these areas, then do a new threshold to detect spheroids, 
but I don't know how to write these lines of code ... :-(

Thanks for any help and/or suggestions you can give me.
Good day to all
Patricia

The images are here :
https://filesender.renater.fr/?s=download&token=f580e06e-6f9a-4e4b-8696-b99037472bdc


[230227_signature-mail]

Toute notre actualité sur https://www.cea.fr/drf/irig et sur 
Biomics<https://www.bge-lab.fr/Biomics>
Et sur https://twitter.com/BiomicsLab

[Facebook]<https://fr-fr.facebook.com/cea.pageofficielle> [Youtube] 
<https://www.youtube.com/channel/UCpTMWY8NRQby8zXUKhHznfg>  [Twitter] 
<https://twitter.com/CEA_Officiel>  [LinkedIn] <https://fr.linkedin.com/company/cea>  [Instagram] 
<https://www.instagram.com/cea_officiel/>


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Reply via email to