Counting double labeled cells in Fiji

Tags: #<Tag:0x00007fd699d84ad8> #<Tag:0x00007fd699d848f8>


Hi all,
I am using Fiji and having a problem on counting double labeled cells in my image. Manual counting would be my last option since I will need to switch between channels to make sure the fluorescences are actually overlapping…and there are plenty of cells of course…Any generous help please?



Hi Thomas,

I’d also be very interested if someone can suggest a streamlined way to do this in Fiji, since I also couldn’t find one when I needed it a couple of years ago.

For this reason, I built the tools I wanted for this into QuPath. Hopefully it’s ok to post these links on the ImageJ forum when they are not directly ImageJ/Fiji… however, QuPath does depend on ImageJ for some functionality & you can exchange data between them easily. Therefore they can certainly be used together.

Most of the current QuPath documentation links are for brightfield, so I’ve tried to point you to the bits you would need to do this with fluorescence below.

Manual counting

If you decide to do your counts manually, QuPath can help by providing a flexible counting tool and allowing you to instantly toggle channels on and off while counting, simply by typing the number of the channel. Therefore if you just keep one hand on the number keys and one hand on the mouse, you can work quite effectively.

Automated counting

To help guess the suitability of any automated method, it would be necessary to see an example of one of your images. However, depending on your staining (hopefully DAPI in one channel?), you may have some success with QuPath’s automated cell detection.

This command also automatically makes various measurements (e.g. mean, min, max) for every channel in different cell compartments (nucleus, cytoplasm, whole cell). You can then create a short script to automatically identify the cells with high values in one or more channels for any combinations of those measurements to find your double-positive cells.

  • Documentation on detecting cells (you would want the Cell detection command, not the Positive cell detection - the latter is currently only for cells positive by DAB staining)
  • Documentation on scripting

Lest the idea of writing a script in new software puts you off, here is an example:

positive = getPathClass('Positive')
negative = getPathClass('Negative')
for (cell in getCellObjects()) {
    ch1 = measurement(cell, 'Cell: Channel 1 mean')
    ch2 = measurement(cell, 'Cell: Channel 2 mean')
    if (ch1 > 100 && ch2 > 200)

Of course, channels, thresholds, measurements etc. can (and likely should) all be changed.

Automated counting + manual refinement

If QuPath detects too many cells, you can select them and delete them (just double-click to select and press backspace).

Inside the Points tool in the toolbar, there’s also an option to Convert detections to points… which basically takes QuPath’s initially-detect cells and turns them into points as if you had manually counted them. You can then edit the points as needed.

Import/export & integration with Fiji/ImageJ

If you require any preprocessing steps (e.g. to subtract background), it is best to do these with Fiji first and then save TIFF images to read into QuPath.

If QuPath cannot open your image, you may need to install the Bio-Formats extension.

After detecting/counting, you can create and export a results table and screenshots entirely within QuPath. However, if for any reason you want your results back into ImageJ then first make sure that no objects are selected. Then choose Extensions → ImageJ → Send region to ImageJ, selecting a ‘downsample factor’ of 1 (i.e. don’t scale the image).

This will open up ImageJ and show the current 2D image seen in QuPath (with all color channels). Additionally, it will transfer over everything that was detected in QuPath into the closest representation that ImageJ supports (i.e. polygon ROIs for cells, points rois if you did manual counts) and add them to an ImageJ overlay.

It will use QuPath’s ‘own’ built-in ImageJ, but you can save the resulting image to reopen in Fiji later.