3D ratiometric comparison of 2 channels

Hi everyone
My goal is to create a heatmap ratiometric representation of 2 channels (ch2/ch1);
much like this post here:"3D" pseudocolor for ratiometric images (FRET)
and my raw images are in z-stack.

pls refer to this shareable link for my raw images and final output of the image calculator divide

so I have tried the following steps using 3D image suite plugin ;

1. Suppress the noise; i do this for ch1 and ch2 separately

  1. Select original stack

  2. Apply 3D median filter to suppress noise:
    1. Plugins->3D->3D Fast Filters
    2. then select Median as Filter

  3. Rename newly created image to Filtered
    2. Create background image; again i do this indiv for ch1 and ch2

  4. Select original stack

  5. Apply 3D median filter to suppress noise:
    1. Plugins->3D->3D Fast Filters
    2. Select Median as Filter
    3. Select 10 pixels Kernel_XY and 3 pixels Kernel_Z

  6. Rename newly created image to Background

  7. Create background subtracted denoised image of each channel:

  8. Process->Image Calculator

  9. Image1 = Filtered ; Image2 = Background ; Operation = Subtract ;

  10. Select Create new window and 32-bit result options

  11. Rename newly created image to Result Ch1 ; or Result Ch2

  12. calculate ratiometric image
    Process->Image Calculator
    Image1 = Result Ch2 ; Image2 = Result Ch1 ; Operation = Divide
    but my final image (entitled result of divide…tif) is looking very weird.
    I expected my background to be black?

May I know what I have missed out??

a screenshot of final image is below(but tif version is in shareable link):

Hi @kavator,
I’ve tried to do the same thing. I think you need to do choose suitable LUT for your map and do press AUTO for B&C to get a working range of your pixels related to fluorescence.
I am just wondering how do you choose a scale bar or how do calibrate the map? to be minimum and maximum values? I will show you my result, the value quite big and I want to change them to decimal but it did not work [Result of 3rd condition (3 spheroid).image

Hi @kavator,

If images are represented by their ratios, there are many problems. Therefore, various methods have been devised to express the colors.

I have tried to create a ratio image using your image and will upload a screenshot.
The color map in this case is set to ratio0 on the left and ratio6 on the right. The vertical direction represents the brightness.
If you like it, please use it.


Hi @hwada
the image looks good!
may i know what plugin/ steps you have done to achieve the final ratio image?
or how does it differs from mine?

kind regards

Hi @kavator

These images were created by my plugin “FRETratioFx”.
Please see other threads of FRET or ratio image.

First, merge ch1 and ch2 and convert them to 8-bit or 16-bit images.
Next, start FRETratioFx.
This time, AutoCutB is unchecked, so the background of the image is not subtracted.
Select IMDwithHSB from the Calculation Method combo box.
Change the radio button to Manual and set the Min and Max values.
These values are the ratio values to be displayed.
In other words, in this case, the image color will be adjusted so that the ratio is between 0 and 6, from purple to red, and low-luminance areas will be displayed darkly regardless of the ratio.
*You will need to try changing the value several times to find a suitable value.

If you simply divide the pixel value, even low-luminance areas such as the background will have a high ratio, and the area you want to see will be buried by it. You also need to be careful about what to do when the denominator is 0. In addition, z-projection of this image is not so simple, so be careful.


thank you very much! @hwada

Hi hwada,

thanks for introducing the plugin to me;
may i know if there is an output value which measures the value of the ratio from your plugin?
I wish to plot a graph demonstrating the change in ratio of my 2 diff markers between sample groups

Hi, @kavator ,

Unfortunately, this plugin does not have the ability to display graphs.
However, if you want to see the changes in a graph, I think the best way is to convert the image created by IMDwithHSB into an HSB image by going to Image > Type > HSB stack.
At this time, Channel 2 and 3 have the same value, but Channel 1 reflects the value of Hue.
This may be used to represent the image.
Note, however, that the ratio is no longer the same as the one calculated by the plug-in, because Hue is originally expressed as a circle, and when expressed as 0-1, 0 and 1 are near red.
For this reason, we have devised a way to express the color in the plug-in.
Converting this to an HSB image creates a discrepancy.
However, I think the graph will look like that to some extent.
As a future improvement, I plan to add a function to this plug-in to save the calculated value of each pixel.