Help! same macro different images

Hello
I have different images and I need a macro that runs on the three images.
I need to Identify the acanthocytes in the blood smear slides

Slide 2 Slide 3

Hello @scdizgoncalves,

Welcome at the forum and thanks for posting the images. Remember that not everybody knows about acanthocytes, so it helps if you describe the features that you are looking for, and what sets them apart from the other cells in the smear. It is obviously not the colour purple.

And selecting each of the three images is done as follows, if there are thee images open:

for(i=1;i<=nImages();i++){
    selectImage(i);
   //put the rest of your macro here
}

Acanthocytes are spiculated red blood cells
acanthocytes

You have indicated 3, but there are more cells that are not perfectly circular shaped. What is the cut off, or are there only two or three other cells (the three top right hand most ones)?
The second image you posted look as if the cells are 3D. How many spicules need to be visible before you classify them as acanthocytes? There is a variety of intensities between the cells, does this play a role in classification?

It is common that ‘simple’ questions on closer inspection appear to be much more complicated, as the human eye is terribly good at recognising patterns…

Macro2.ijm (560 Bytes) Hello
this is what I have achieved so far
but I have to improve
can you help me ?

run(“Close All”);
run(“Clear Results”);
open("");
rename(“acantócitos”);
run(“Duplicate…”, “acantócitos-1”);
run(“8-bit”);
run(“Median…”, “radius=2”);
run(“Threshold…”);
waitForUser(“Definir a Threshold”,“Clicar em Ok para continuar”);
run(“Fill Holes (Binary/Gray)”);
run(“Morphological Filters”, “operation=Opening element=Disk radius=16”);
run(“Geodesic Reconstruction”, “marker=acantócitos-1-fillHoles-Opening mask=acantócitos-1-fillHoles type=[By Dilation] connectivity=4”);
run(“Watershed”);
run(“Kill Borders”);
run(“Analyze Particles…”);

Hi @scdizgoncalves,

Well, that is a good start! Using ImageJ1, I notice your threshold assumes a dark background, which is not the case. Maybe with your installation or with FIJI, you get good outlines, but see if you get good results with a light background. To that end I suggest to change the

run(“Threshold…”);
waitForUser(“Definir a Threshold”,“Clicar em Ok para continuar”);
run(“Fill Holes (Binary/Gray)”);
run(“Morphological Filters”, “operation=Opening element=Disk radius=16”);
run(“Geodesic Reconstruction”, “marker=acantócitos-1-fillHoles-Opening mask=acantócitos-1-fillHoles type=[By Dilation] connectivity=4”);
run(“Watershed”);
run(“Kill Borders”);
run(“Analyze Particles…”);

to

run("Set Measurements...", "area mean min center perimeter shape display redirect=None decimal=3");
setAutoThreshold("Default no-reset");
run("Analyze Particles...", "display include add");

Now you have an idea of the proper size of your cells. To minimise garbage, re-run the analyse particles with more appropriate size, like

run("Analyze Particles...", "size=2000-Infinity display include add");

Can you come up with a measure in the results that could tell you something about the spikeyness? (compare e.g. the perimeter with area, for a perfect circle and for a starfish).

Hello
helped a lot
but, the result I want is something similar to this:image (2) image (1)

Hi @scdizgoncalves,

So what are their common characteristics, apart from having spikes that have a wide base (and not not philopoida)? Going by the first image, it looks as if you are after the darker ones. This also holds for the second image, although why not have the one left of number 16, and why you do select number 14, which is not dark.
I’m not a biologist, so for me it is hard to tell the difference between (in your last image) number 4 and the one left of it; they look quite the same to me. To you, there is obviously a difference, or you would also have chosen that extra one.
It is important to express your selection criteria as precise as possible. Otherwise, you could go by a trainable plugin, which somehow by itself distills your decision criteria by being fed examples. But that is not my field of expertise.