Problem with automated cell counting for DAB stained Fos+ cells in brain slides

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

Problem with automated cell counting for DAB stained Fos+ cells in brain slides

Praz Nina
Hi everyone,

I'm trying to devise a method to enable me to do automated cell counting in DAB stained Fos+ cells in brain slides, but I'm having trouble because the count varies from the manual count. I have tried many different options, but essentially I first sharpen the original image (16bit, but greyscale), subtract the background (radius 10) and then convert to 8-bit and do thresholding. Then I analyze particles (size 50-Infinity, circularity 0.56-1.00) and sometimes have an ok match, but most of the times not really.

The issue is that I'm not sure (even in manual counting) if I'm counting only the stained cells or if I'm including also the ones from the layer below, since my slides look like 4096 shades of grey :).

Here is a sample image: https://i.imgur.com/m9uDJBN.jpg

(I know the image is a bit out of focus, an undergrad took them so they're not exactly tack sharp..)

How would you set the threshold, which cells would you count? I find it strange that I can "see better" which cells to count when I zoom out to like 12.5%, but when I'm at 100%, it become ambiguous. This image has been taken with a 10x lens btw, but I also have a stitched panorama taken with a 20x lens. And although the number of pixels is much higher, it doesn't really help, as the background is equally as distracting.

Any assistance will be greatly appreciated!
Reply | Threaded
Open this post in threaded view
|

Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

ERIC
Hi Nina,
As you have a large variation of intensity of your nuclei and a quite
homogenous size, it mayhelp to do a frequency filtering.
I transform (eventualy invert) your image in 8bit did an FFT band pass
filter set to 10pixel for larger size and to 4pixel for smaller size
(see FFT filter.png).
I used the find maxima function (set to 120) to count the nuclei (276
were found see Capture.png).
Of course you will not find the same number by eyes !!!!

run("8-bit");
run("Invert");
run("Bandpass Filter...", "filter_large=10 filter_small=4 suppress=None
tolerance=5 autoscale saturate");
run("Find Maxima...");

Eric Denarier
Grenoble Institut des Neurosciences
Inserm U836
Chemin Fortuné Ferrini
38700 La Tronche
France


Tél :33 (0)4 56 52 05 38
Fax :33 (0)4 56 52 06 57

http://neurosciences.ujf-grenoble.fr/

Le 26/05/2014 12:11, Praz Nina a écrit :

> Hi everyone,
>
> I'm trying to devise a method to enable me to do automated cell counting in
> DAB stained Fos+ cells in brain slides, but I'm having trouble because the
> count varies from the manual count. I have tried many different options, but
> essentially I first sharpen the original image (16bit, but greyscale),
> subtract the background (radius 10) and then convert to 8-bit and do
> thresholding. Then I analyze particles (size 50-Infinity, circularity
> 0.56-1.00) and sometimes have an ok match, but most of the times not really.
>
> The issue is that I'm not sure (even in manual counting) if I'm counting
> only the stained cells or if I'm including also the ones from the layer
> below, since my slides look like 4096 shades of grey :).
>
> Here is a sample image: https://i.imgur.com/m9uDJBN.jpg
>
> (I know the image is a bit out of focus, an undergrad took them so they're
> not exactly tack sharp..)
>
> How would you set the threshold, which cells would you count? I find it
> strange that I can "see better" which cells to count when I zoom out to like
> 12.5%, but when I'm at 100%, it become ambiguous. This image has been taken
> with a 10x lens btw, but I also have a stitched panorama taken with a 20x
> lens. And although the number of pixels is much higher, it doesn't really
> help, as the background is equally as distracting.
>
> Any assistance will be greatly appreciated!
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Problem-with-automated-cell-counting-for-DAB-stained-Fos-cells-in-brain-slides-tp5007921.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Capture.PNG (639K) Download Attachment
FFT Filter.PNG (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

Praz Nina
ERIC wrote
Hi Nina,
As you have a large variation of intensity of your nuclei and a quite
homogenous size, it mayhelp to do a frequency filtering.
I transform (eventualy invert) your image in 8bit did an FFT band pass
filter set to 10pixel for larger size and to 4pixel for smaller size
(see FFT filter.png).

//snip
Merci Eric!

This is quite a nice result!

Do you think that this count is pretty similar to the one you would determine by using your eyes?

My manual counting says 239, which means there is around a ~13% error rate, but the question is where - in the automated counting or my subjective counting.

I'm trying to minimize the error rate, so I can analyze a lot of areas of interest in a small amount of time. 13% mistakes would be cumulative, so I'm trying to reduce it as much as I can.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

Praz Nina
Also, I have tried to use your method on another image (https://i.imgur.com/K9B3FnX.jpg)

But I get something like 5000+ maxima, which doesn't correspond to reality... (my manual counting says 247)

For the automated counting, I don't know if it's possible, but the point would be to use the same settings throughout the section/slide, in order to remove as much variability as possible. Because if I have to change the FFT bandpass for each image independently, that's introducing a new variable..

I've heard things about average threshold measure (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2803710/), but I haven't been able to find the software to test it out (maybe it isn't the best method).
Reply | Threaded
Open this post in threaded view
|

Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

ERIC
Using the same method I found 215 nuclei.
I don't understand where can come your result from. Sorry !!!

I inverted the image after changing it to 8bits.
There is maybe a difference in the binary options ( my settings are
:Black is background)

Eric Denarier
Grenoble Institut des Neurosciences
Inserm U836
Chemin Fortuné Ferrini
38700 La Tronche
France


Tél :33 (0)4 56 52 05 38
Fax :33 (0)4 56 52 06 57

http://neurosciences.ujf-grenoble.fr/

Le 26/05/2014 16:11, Praz Nina a écrit :

> Also, I have tried to use your method on another image
> (https://i.imgur.com/K9B3FnX.jpg)
>
> But I get something like 5000+ maxima, which doesn't correspond to
> reality... (my manual counting says 247)
>
> For the automated counting, I don't know if it's possible, but the point
> would be to use the same settings throughout the section/slide, in order to
> remove as much variability as possible. Because if I have to change the FFT
> bandpass for each image independently, that's introducing a new variable..
>
> I've heard things about average threshold measure
> (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2803710/), but I haven't been
> able to find the software to test it out (maybe it isn't the best method).
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Problem-with-automated-cell-counting-for-DAB-stained-Fos-cells-in-brain-slides-tp5007921p5007927.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

Praz Nina
My mistake, I didn't invert the image... and also sharpened it, which probably made artifacts which were detected by finding maxima.

Thanks a lot Eric!

I'll try to optimize this, so it can be used throughout all sections, if it's possible! Does your lab use automated counting in this way?

And thanks again!
ERIC wrote
Using the same method I found 215 nuclei.
I don't understand where can come your result from. Sorry !!!

I inverted the image after changing it to 8bits.
There is maybe a difference in the binary options ( my settings are
:Black is background)

Eric Denarier
Grenoble Institut des Neurosciences
Inserm U836
Chemin Fortuné Ferrini
38700 La Tronche
France


Tél :33 (0)4 56 52 05 38
Fax :33 (0)4 56 52 06 57

http://neurosciences.ujf-grenoble.fr/

Le 26/05/2014 16:11, Praz Nina a écrit :
> Also, I have tried to use your method on another image
> (https://i.imgur.com/K9B3FnX.jpg)
>
> But I get something like 5000+ maxima, which doesn't correspond to
> reality... (my manual counting says 247)
>
> For the automated counting, I don't know if it's possible, but the point
> would be to use the same settings throughout the section/slide, in order to
> remove as much variability as possible. Because if I have to change the FFT
> bandpass for each image independently, that's introducing a new variable..
>
> I've heard things about average threshold measure
> (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2803710/), but I haven't been
> able to find the software to test it out (maybe it isn't the best method).
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Problem-with-automated-cell-counting-for-DAB-stained-Fos-cells-in-brain-slides-tp5007921p5007927.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

ERIC
Eric Denarier
Grenoble Institut des Neurosciences
Inserm U836
Chemin Fortuné Ferrini
38700 La Tronche
France


Tél :33 (0)4 56 52 05 38
Fax :33 (0)4 56 52 06 57

http://neurosciences.ujf-grenoble.fr/

Le 26/05/2014 16:58, Praz Nina a écrit :
> My mistake, I didn't invert the image... and also sharpened it, which
> probably made artifacts which were detected by finding maxima.
>
> Thanks a lot Eric!
>
> I'll try to optimize this, so it can be used throughout all sections, if
> it's possible! Does your lab use automated counting in this way?
Yes we have been using this on IHC on brain slices to compare different
treatment.
You may have to work around the parameters because the FFT filter should
be adapted to the size of your nuclei.
You may also be interested by Daniel Sage's plugin  LoG3D :
http://bigwww.epfl.ch/sage/soft/LoG3D/
Of course I am afraid you will never get "The real number of nuclei"
because any image analysis will make errors that you can compensate by
the number of treated images...





> And thanks again!
>
> ERIC wrote
>> Using the same method I found 215 nuclei.
>> I don't understand where can come your result from. Sorry !!!
>>
>> I inverted the image after changing it to 8bits.
>> There is maybe a difference in the binary options ( my settings are
>> :Black is background)
>>
>> Eric Denarier
>> Grenoble Institut des Neurosciences
>> Inserm U836
>> Chemin Fortuné Ferrini
>> 38700 La Tronche
>> France
>>
>>
>> Tél :33 (0)4 56 52 05 38
>> Fax :33 (0)4 56 52 06 57
>>
>> http://neurosciences.ujf-grenoble.fr/
>>
>> Le 26/05/2014 16:11, Praz Nina a écrit :
>>> Also, I have tried to use your method on another image
>>> (https://i.imgur.com/K9B3FnX.jpg)
>>>
>>> But I get something like 5000+ maxima, which doesn't correspond to
>>> reality... (my manual counting says 247)
>>>
>>> For the automated counting, I don't know if it's possible, but the point
>>> would be to use the same settings throughout the section/slide, in order
>>> to
>>> remove as much variability as possible. Because if I have to change the
>>> FFT
>>> bandpass for each image independently, that's introducing a new
>>> variable..
>>>
>>> I've heard things about average threshold measure
>>> (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2803710/), but I haven't
>>> been
>>> able to find the software to test it out (maybe it isn't the best
>>> method).
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://imagej.1557.x6.nabble.com/Problem-with-automated-cell-counting-for-DAB-stained-Fos-cells-in-brain-slides-tp5007921p5007927.html
>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Problem-with-automated-cell-counting-for-DAB-stained-Fos-cells-in-brain-slides-tp5007921p5007932.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

Jacqueline Ross
In reply to this post by Praz Nina
Hi Praz,

You could also try Subtract Background (e.g. radius 50) followed by the Find Maxima (e.g. Noise tolerance 45) as per Eric's suggestion. This worked well on your original image. Find Maxima is a really good option if you don't need to know the size/shape, etc. of the particles.

If you decide to use a threshold-based method, then I would use your negative control slide to set the threshold based on the background gray value (or measure an area on your image which is "unlabelled). Otherwise, it is very hard to decide what is really labelled and what isn't especially when doing manual counting.

Kind regards,

Jacqui

Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit 
School of Medical Sciences 
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland 1142, NEW ZEALAND

Tel: 64 9 923 7438
Fax: 64 9 373 7484

http://www.fmhs.auckland.ac.nz/sms/biru/

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Praz Nina
Sent: Tuesday, 27 May 2014 2:58 a.m.
To: [hidden email]
Subject: Re: Problem with automated cell counting for DAB stained Fos+ cells in brain slides

My mistake, I didn't invert the image... and also sharpened it, which probably made artifacts which were detected by finding maxima.

Thanks a lot Eric!

I'll try to optimize this, so it can be used throughout all sections, if it's possible! Does your lab use automated counting in this way?

And thanks again!

ERIC wrote

> Using the same method I found 215 nuclei.
> I don't understand where can come your result from. Sorry !!!
>
> I inverted the image after changing it to 8bits.
> There is maybe a difference in the binary options ( my settings are
> :Black is background)
>
> Eric Denarier
> Grenoble Institut des Neurosciences
> Inserm U836
> Chemin Fortuné Ferrini
> 38700 La Tronche
> France
>
>
> Tél :33 (0)4 56 52 05 38
> Fax :33 (0)4 56 52 06 57
>
> http://neurosciences.ujf-grenoble.fr/
>
> Le 26/05/2014 16:11, Praz Nina a écrit :
>> Also, I have tried to use your method on another image
>> (https://i.imgur.com/K9B3FnX.jpg)
>>
>> But I get something like 5000+ maxima, which doesn't correspond to
>> reality... (my manual counting says 247)
>>
>> For the automated counting, I don't know if it's possible, but the
>> point would be to use the same settings throughout the section/slide,
>> in order to remove as much variability as possible. Because if I have
>> to change the FFT bandpass for each image independently, that's
>> introducing a new variable..
>>
>> I've heard things about average threshold measure
>> (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2803710/), but I haven't
>> been able to find the software to test it out (maybe it isn't the
>> best method).
>>
>>
>>
>> --
>> View this message in context:
>> http://imagej.1557.x6.nabble.com/Problem-with-automated-cell-counting
>> -for-DAB-stained-Fos-cells-in-brain-slides-tp5007921p5007927.html
>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html





--
View this message in context: http://imagej.1557.x6.nabble.com/Problem-with-automated-cell-counting-for-DAB-stained-Fos-cells-in-brain-slides-tp5007921p5007932.html
Sent from the ImageJ mailing list archive at Nabble.com.

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

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