Divide and conquer

One of the more annoying things about fluorescence imaging is that it’s a bit like trying to describe our location in the universe. There’s no absolute point of reference, the values are rather arbitrary and you rely heavily on relative measures (like being 1AU from our local star).

This post will demonstrate some of the problems with quantifying basic fluorescent images and use a case study to show how ratiometric imaging (among other things) can be used to solve them.

The problem

As a useful example let’s consider that you want to use fluorescence to measure something like the amount of calcium in a cell. There are plenty of dyes whose fluorescence varies with calcium, so we pick one and load it into our cells. We take a picture and it looks something like this:

2015-09-Ratiometric71Great, we can go ahead and calibrate this image (as this is post-acquisition I’m not going to go into this here but ask in the comments if you’re interested) so we know how fluorescence relates to intensity.

2015-09-Ratiometric73Fantastic. Now we can go and take more pictures in different fields. But looking at the cells, what if the cells change shape? What if one takes up more dye than the others? What if we’re a bit out of focus or focused on a different part of the cell?

2015-09-Ratiometric72All of these things affect the intensity independent of the thing we want to measure (in this example, calcium concentration) so we have a problem.

The solution

What we need is something that is not sensitive to calcium (or pH or whatever) to which we can normalise our signal. That way, if the cell shape changes, so too will the control signal. The same goes for focal shift. This is the basic idea behind one flavour of ratiometric imaging.

Here’s how you do it:

But First: Background Subtract

One of the questions I get most often about ratiometric imaging is, “Do I need to background subtract?”. The answer is a resounding yes and here’s why in the form of an example:

Let’s assume that we have two conditions, A & B. Each measurement we take is the sum of a signal (in red) and noise (in blue). In this case the signal component for A and B is 10 and 100 respectively. Let’s consider a relatively low-noise condition where noise is 2.


The true ratio (calculated as B/A) is ten (100/10), but the calculated ratio is actually 9.2 (102/12). Already we have a difference between the actual ratio and the calculated ratio so that should be enough to make you want to background subtract.

But wait, there’s more! If we assume that the noise is much larger, the problem is amplified. If we try the same experiment again but this time with a noise of 50. Now the calculated ratio drops to 2.5, which is well off the true ratio of 10. Definitely worth background subtracting!


Background subtraction is fairly trivial (and we’ve done it before), just follow these simple steps:

  • Open [ Analyze > Set Measurements.. ] and select “Mean gray value” and “Display Label”. Others are optional but not required. Close the dialog.
  • Draw a region of interest (ROI) using the rectangle selection tool (1st from left on the toolbar) anywhere that there are no cells (and thus no signal component):


  • Hit ‘m’ or select [ Analyze > Measure ], which will provide you with a mean background intensity.
  • Deselect the ROI [ Edit > Selection > Select None ] then run [ Process > Math > Subtract ] and insert the mean background intensity value. Hit OK.
  • Repeat for both of your acquired images.

Creating an “Image”

I put Image above in quotes because when you make a ratiometric image it’s not really an image in the normal sense. It’s more a display of the numerical relationship between two images. As a result, we end up with something that breaks the normal rules of dynamic ranges. One example of this, is that unlike a traditional image, we don’t want our ratio image to be limited to integer values. This would give us very poor “ratio-resolution” giving us only a measure of things that were, for example, 2, 3 or 10 times the other instead of 1.5, 6.37 or any other ratio value.

Because we’ve background subtracted, it is also important to tell Fiji how to interpret divide by zero values. Do this by running [ Edit > Options > Misc ] and enter zero in the box at the top. Hit OK to close the dialog.

To make the ratiometric image run [ Process > Image Calculator ]. Select the files, the operation, and make sure that 32-bit (float) result is also checked. This allows for non-integer ratio values in the final image.


Because we’re using 32bit floating point values, the standard lookup tables are not really appropriate for displaying ratiometric data. Change the lookup table by running [ Image > Lookup Tables > 16 colors ]. This allows better resolution over small ranges. Other good options are Royal or Fire. You can see all of the installed LUTs by running [ Image > Color > Display LUTs ]

You also need to set the range on which the LUT is scaled. Do this by running  [ Image > Adjust > Brightness & Contrast ]. Hit the button labelled “Set” and enter a minimum and maximum value (for example 1 and 10 respectively, but this will depend on your data).

This should give you a pretty respectable ratiometric image that looks something like this:


If you have any quantitation to do, you should work on these images as the data have not been unacceptably manipulated.

For visualisation however, you may want to remove the background speckle. You can do this by running a 1 pixel Median filter on the image using [ Process > Filters > Median ] and entering 1 in the box. Hit OK.


NOTE: If you’re using these or similar images in a paper, report, website, pretty much anything, it’s imperative to be transparent about the manipulations you’ve conducted. Keep track and write comprehensive Methods sections so others can replicate your processing!

The data in this post were kindly provided by Mingming Yang of the Dart Group.

3 thoughts on “Divide and conquer

  1. Pingback: In the Bin | Post-Acquisition

  2. Andres LLancao

    Great advice, Thank you. I have some doubts if you can help me.
    Do this work also for ratiometric FRET? I tried to follow this process in my FRET ratiometric images but the signal almost disappear when I set the values for brightness between 1-10, should I set between 0-1?
    I wonder if there is a way to do a Macro to subtract macro from ROI since sometimes we need to quantify several images. Do the rolling ball background subtraction from Fiji works for this analysis?
    Do you have any idea how to speed this process?
    Thank you for any help

    Liked by 1 person

  3. Dave Mason Post author

    Hi, thanks for your comments. The choice of scale is highly dependent upon your biological system and probes. I chose 1-10 here because this was the range of the changes we saw. Obviously if you have smaller changes (or decreases) then set the scale accordingly (a fairly safe bet is to set the range to the minimum and maximum of your image.

    ImageJ/Fiji has a fantastic capability for macro programming in a range of languages. You can check out the documentation at: http://imagej.net/Introduction_into_Macro_Programming

    If you have specific questions with which you want to find help the ImageJ forum is a great choice: http://forum.imagej.net/




Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.