Count immunostained neurons


#1

Hello! I´ve been trying to make a macro to count immunostained neurons in the rat third ventricle. I will send you the image. Also the steps I have followed are:

open("/Users/paula/Desktop/Stack de 4/19110044.tif");
run("8-bit");
//run("Brightness/Contrast...");
run("Enhance Contrast", "saturated=0.35");
run("Apply LUT");
run("Close");
run("Canvas Size...", "width=320 height=240 position=Center zero");
run("Enhance Contrast...", "saturated=0.3");
run("Smooth");
selectWindow("19110044.tif");
run("Find Maxima...", "noise=15 output=Count exclude light");
saveAs("Results", "/Users/paula/Desktop/Stack de 4/Counts.csv");
run("Find Maxima...", "noise=15 output=[Single Points] exclude light");
setOption("BlackBackground", true);
run("Dilate");
run("Analyze Particles...", "size=0-50 circularity=0.50-1.00 show=Outlines display exclude include summarize add in_situ");
saveAs("Tiff", "/Users/paula/Desktop/Stack de 4/19110044-Maxima.tif");
roiManager("Show All");
roiManager("Show All with labels");
imageCalculator("XOR create", "19110044.tif","19110044-Maxima.tif");
selectWindow("Result of 19110044.tif");
saveAs("Tiff", "/Users/paula/Desktop/Stack de 4/Result of 19110044 con maxima.tif");
close();
close();
selectWindow("19110044.tif");
close();
close();
run("Close");
run("script:Macro.ijm.ijm");
selectWindow("19110044.tif");
run("script:Macro.ijm.ijm");
selectWindow("19110044.tif");
runMacro("/Users/paula/Desktop/Stack de 4/Macro3.ijm.ijm.ijm");
selectWindow("19110044.tif");
runMacro("/Users/paula/Desktop/Stack de 4/Macro1.ijm.ijm.ijm");
close();
close();
selectWindow("19110044-1.tif");
close();

#2

https://drive.google.com/open?id=1Vid1DZyMDFdX1-YcDPbu1wXWiThZ0F9E


#3

Good day!

Please tell us what you consider stained and what not.

Your sample image shows a bad spatial resolution and in addition it appears to be out of focus.

Regards

Herbie


#4

Dear Herbie! Thanks for your reply! I will send you more pictures to clarify what I need to count.
With this technique the neuron´s nuclei becomes dark, so I need to count the “darker” spots. In some cases the neurons are gruped so, it is very difficult to determine if there is one big nuclei or some more together. Also, if I make a small threshold I loose background, noise and neurons too. I know the quality is low, and this is a big problem for the macro… but I am improving the process to stain the tissue better and to take the picture accurate . I hope soon I will get better results.
Here is the link with more images
https://drive.google.com/open?id=1cpTl9_DDrue1-J7tyuSv93LXhhxrcqz6


#5

Dear,

I had a look at your additional sample images and their quality is also not suited for reliable automatic analyses.

In the first place you must improve the spatial resolution of your images. Furthermore, you need to suppress the intense staining outside the nuclei. Perhaps you should try a different type of staining.

Regards

Herbie