Determine lymphocyte infiltrates in H&E images



Hello forum,
first of all congratulations for the software and the fantastic help you provide here!

I have been using CellProfiler to successfully determine the area fraction of DAB-stained pathology slides.
I am now trying something more complicated and I am struggling.

I have H&E images of murine glandular tissue that have a lymphocytic infiltrate.
What I am trying to do is to identify these infiltrates and determine their area.
The pipeline that I have designed so far

  • unmixes the heamatoxylin
  • Identifies the nuclei
  • counts the neighbours of the nuclei
  • filters out the the nuclei that have less than a certain number of neighbours (e.g. 20), leaving only the bigger aggregates

What I would like to do next is to have CP to identify the individual aggregates of cells and determine the area occupied by each one of them (filtering out those that are smaller than a certain value).

I thought to do that by expanding the filtered objects so to merge all the nuclei of each aggregate and then work with the aggregates instead that with the nuclei.
Although I managed to enlarge the nuclei so that all those belonging to the same aggregate are in contact, I don’t know how to merge together all the nuclei so that they become a unique object.

Also, if you have a better approach to suggest, I am willing to try alternatives!

I am attaching a representative image and the pipeline I have created so far.

Thanks in advance for any suggestion

tesone.cpproj (402.4 KB)



Hi Davide,

You can merge touching objects using the “SplitOrMergeObjects” function*. Would that be enough to solve your problem?

*= This is the name in CP 3.0; in 2.X it was called “ReassignObjectNumbers”.


Hi there,
that would definitely solve my main issue here, thank you! After I posted my question I downloaded CP 3.0 and found the function but I did not realise that also the previous version had it.

Thanks a lot
But again if you have other suggestions to achieve the same goal please feel free to suggest