What is ImageJ?#

ImageJ is open-source software for image analysis.

Created by Wayne Rasband at the National Institutes of Health, ImageJ has become indispensable to the research community over more than 20 years. It continues to be updated regularly and is by far the most discussed topic on the Scientific Community Image Forum – with more than 10,000 topics at the time of writing, and more added every day.

ImageJ’s success is due not only to the features of the software itself, but to its openness and extensibility. The source code is in the public domain, meaning that others can adapt it as needed. But usually this isn’t necessary, because users can write (and share) custom macros, plugins or scripts to add new functionality – without changing ImageJ itself.

Getting ImageJ#

ImageJ is available in multiple forms. Three of the most important ones for our purposes are:

1. ImageJ#

../../_images/imagej-logo.png

Download from https://imagej.nih.gov/ij/

The ‘original’ download of ImageJ contains all the core functionality, but no extra user plugins.

The core of the application is a tiny file ij.jar (~2.5 MB) that runs on Java. You can download a platform-specific package that includes both ImageJ and Java for Windows, Mac or Linux. Including Java makes the download bigger, but makes the application self-contained and easy to run.

2. Fiji#

../../_images/fiji-logo.png

Download from https://fiji.sc/

Fiji, which stands for Fiji Is Just ImageJ, is a distribution of ImageJ that comes bundled with a plethora of plugins and extra features that are especially useful for life scientists. It also has a powerful script editor that helps a lot when developing macros or scripts, an updater to help manage all the additions, and even a ‘Big Data Viewer’ for particularly huge images.

3. ImageJ.JS#

../../_images/imagej.js-logo.png

Run at https://ij.imjoy.io

ImageJ.JS is a web version of the original ImageJ, capable of running in a browser. It has a few extra features, but not as many as Fiji. It was put together and is maintained by the ImJoy team led by Wei Ouyang.

For more information, see https://imagej.net/software/imagej-js

More interactivity with ImageJ.JS!#

Whenever you see a button like this happycell it can be used to launch ImageJ.JS directly from this page, often with a relevant image opened.

By default, ImageJ.JS will open in the same browser tab. If you want it to open in a new tab, then there’s probably an easy trick in your browser to do that (on a computer, my guess is that it’ll be pressing Ctrl or when clicking the link).

Remember to cite the software you use!#

A lot of open-source software is developed and supported by academics, who invest a huge amount of time into development and support. They need funding to continue that work, and paper citations to help get that funding.

If you use software for research you plan to publish, please spend a few minutes searching for how the developers of the software want it to be cited.

Sometimes they also need a kind word or a compliment, because they are human. Supporting software can be time-consuming, hard and stressful – and is usually something they do for free, in their limited spare time.

The ImageJ Interface#

ImageJ’s user interface is rather minimalistic. It’s centered around a toolbar. Everything else (images, histograms, measurement tables, dialogs) appears within separate windows. Please open Fiji or happycell and experiment while reading the description below.

../../_images/imagej-gui.png

But despite the simple appearance, ImageJ is powerful. The depth of the software is evident from its abundance of menus and submenus.

That leads to the most important tip for using ImageJ:

Shortcuts#

In most software, shortcut keys often require pressing Ctrl (on Windows, Linux) or (Mac). Therefore the shortcut to search for a command would be Ctrl + L or ⌘ + L.

This works in ImageJ, but isn’t necessary. Under Edit –> Options –> Misc.., you can specify whether the Ctrl or key is needed along with the letter for the shortcut.

By default, this option is turned off – so pressing L alone is enough. You may find this might make it too easy to accidentally run commands, in which case you should select the option to turn it on.

Opening images & viewing pixels#

I am always taken aback when I see someone open an image in ImageJ through the menus, by choosing File –> Open...

Although this can work, it’s unnecessarily slow and awkward. The more elegant way to open an image is to simply drag the image file onto ImageJ’s toolbar.

As the cursor is then moved over the image, the value for the pixel under the cursor is displayed in ImageJ’s status bar. Images can be navigated as follows:

  • Zoom in

    1. Select the |zoom| tool, then left-click on the image, or

    2. Press the + key

  • Zoom out

    1. Select the |zoom| tool, then right-click on the image, or

    2. Press the - key

  • Pan

    1. Select the hand tool, then click and drag on the image, or

    2. Press the spacebar, then click and drag on the image

When the image is larger than the visible region, a small (purple) overview appears in the top left to indicate which part can currently be seen.

../../_images/interface.gif

Exercise 11.1

The status bar also shows the x and y coordinates for the pixel under the cursor. However, to interpret these you need to know the origin, i.e. the location of the pixel at x=0, y=0.

Where is the origin of the image in ImageJ?

  • Top left corner

  • Top right corner

  • Bottom left corner

  • Bottom right corner

  • Image center

Tip: You should be able to answer this question by opening an image in ImageJ, and observing the coordinates in the toolbar as you move the cursor over the image.