2

I need to present some microscopy images side by side and ensure they are directly comparable by eye in a presentation. The pictures were all taken with the same exposures, gain et cetera so the underlying pixel values should be comparable.

However, the microscopy software has a nasty habit of saving the files with one of the colour channels saturated (for some reason), so I have to process the images for presentations.

Previously I'd been using a macro which processes through a folder and calls the scripting command

run("Enhance Contrast", "saturated=0.35");

But on reflection I don't think this is the proper command to call. I don't think it would produce images that are directly comparable, by eye, to each other.

I had thought that the command

run("Color Balance...");
resetMinAndMax();

would be best as it should show the full display range. But the display values shown on the histogram do vary depending on the image.

Is this appropriate for making directly comparable images or should I run a command like

setMinAndMax();

more appropriate. With 0 as minimum and an arbitrary figure as the maximum. This is driving me mad, as I keep on getting asked about whether my images are directly comparable but I simply don't know!

takrl
  • 6,356
  • 3
  • 60
  • 69
IJQ
  • 25
  • 4

1 Answers1

1

Usually, resetMinAndMax(); is the best way to ensure that your images are displayed consistently.

Note however that it also depends on the bit depth of your images.

  • 8-bit grayscale images and RGB color images are displayed with a range of 0-255 upon resetMinAndMax();

  • For 16-bit (short) and 32-bit (float) images, the display range is calculated from the actual minimum and maximum values of the image (see the documentation of the Brightness/Contrast dialog and the resetMinAndMax() macro function)

So for 16-bit and 32-bit images, you can use the Set Display Range dialog (Set button in the B&C window) with one of the default Unsigned 16-bit range options to ensure consistent display, or the macro call:

setMinAndMax(0, 65535);

If you want to use the images in a presentation, copy them using Edit > Copy to System, or convert them to either 8-bit or RGB before saving them and inserting them in a presentation.

Jan Eglinger
  • 3,995
  • 1
  • 25
  • 51
  • fantastic! That was very useful. So am I correct in thinking that I should probably use resetMinAndMax(); unless the bit depth of my images differ? I've been taking these images in MicroManager and I think they are all 16-bit images. – IJQ May 20 '15 at 16:26
  • ImageJ displays the image type in the image information bar on the top of the image window. As stated above, `resetMinAndMax()` might **not** be the correct solution for 16-bit images, as it scales to the **actual** min and max. You might probably have acquired 12-bit images that are saved in 16-bit mode. In that case, use `setMinAndMax(0,4095)` to display the full bit range in all images. – Jan Eglinger May 23 '15 at 16:36