Heart cardiomyocyte H&E

Hi Cell Profiler community.

I’ve read the previous forum posts about H&E pipelines but I can’t seem to get mine to work.

What I want to do is get an average cell size by counting the amount of eosinophil stain and dividing by the number of nuclei. Even better would be if I could divide total tissue size (eosinophil and nuclei) by number of nuceli.

attached is my pipeline and the image i’m trying to interpret. I know I’m quite a way off but was hoping someone might be able to point me in the right direction!

*please see newer pipeline and higher mag image in comment below

Now working on a 40mag image.

Configured a previous pipeline designed for Sarah from here:

This allowed me to remove the cardiac fibroblasts (lighter eosinophil stain) from my image analysis. Just had to trial and error the threshold.

Attached is my newest pipeline.

Nuclei detection almost there still needs some minor tweaking but cardiomyocyte tissue detection is pretty much spot on and the cardiac fibroblasts are well masked.

I manually counted the nuclei using a grid and it was about 134 total of which around 30 I thought were fibroblast.

I was just looking for some opinions on if this is a sensible idea to quantify average cardiomycyte cell volume.

  1. Find out how many micrometers per image
  2. Use cell profiler to calculate % tissue per image
  3. Calculate % tissue into micrometers
  4. Divide total tissue size in micrometer by number of cardiomyocyte nuclei (either counted manually or if by cell profiler if I can get it working)

If I go down the manual route because im comparing WT and KO mice hearts I would get a colleague to collect the images for me and then I would do nuclei counting blind so I couldnt be accused of say excluding more/less fibroblasts in one group than the other.

I’ve also tried this pipeline on the 20x mag and it seems to work just as well (also attached)

Any general input on this method / tweaking of pipeline would be much appreciated!
pete12.cp (9.94 KB)

Pretty much solved all my problems but still wouldnt mind any opinions on the technique

Attached is my final pipeline that is ONLY properly configured if you delete the fibroblast nuclei manually (as although they are not counted in the nuclei count they contribute towards tissue volume) as shown in attached image.

If you don’t want to delete fibroblasts see previous pipeline - it’s pretty much the same just a few threshold setting differ.

If anyone reads this in the future and wants help with a similar project just PM me.

finalwithmanualremove.cp (12.7 KB)


I took a look at your pipeline and tried tweaking it a bit (attached). I streamlined the tissue identification and pre-processed the Hematoxylin image with some filtering to enhance the nuclei. Detecting the nuclei on the enhanced image gives you some more wiggle-room on the threshold correction factor, I think.

2013_01_25.cp (8.72 KB)

Hi, I’d love to see this file. I am trying to do something similar. However, when I click on the link I get a message
This XML file does not appear to have any style information associated with it. The document tree is shown below.


The specified bucket does not exist




" Is the file corrupt? Or am I simply trying to downlload the file incorrectly? Thanks in advance!

Hi @alegilligan,

Please check this thread, it might be of help.

In case not helping, please share your sample image, objective and the pipeline we can help you.


Hi Lakshmi-
Thanks for your help. I am trying to quantify myocytes stained with PAS stain within a field. Only cells with a nuclei in the plane of view. Sample image is attached. I am new to cellprofiler and a little overwhelmed with it all! Do you have any recommendations as to where to start? I was trying to modify the example fly files that cell profile provides but already running into trouble when I try to swap in my image for the file images provided.

Hi @alegilligan,

Great!! Since you are a beginner you can check out the tutorial videos,

There are many examples here & some quickstart guide with more examples

Since your image is a H & E stain, you have to first separate the colors using “Unmix Colors module” as shown here. Further, you can segment the nuclei & the cells/regions that you are interested in. I have just added that module to the pipeline & started. You can build it on that with the help of sample pipelines for the module details.

PFA pipeline.
unmix_histopath1.cpproj (397.4 KB)
Hope this helps.