Image J Analysis

ImageJ is an image analysis program written in Java. It can load and save images in many formats and has a range of analysis functionality.

ImageJ is installed on all the workstations within the centre. ImageJ is free so you can download ImageJ for your own computer. More details are on the ImageJ homepage.

Custom Anlaysis

ImageJ provides a framework for customising analysis routines. This can be done using macros or plugins.

Macros

Macros use a scripting language to define the steps that you wish to perform. They are useful for performing tasks that you often repeat. For example you can open a file, extract the color channels as black and white images, and then save the images to new files.

You do not need to be able to write scripts to use macros. ImageJ has a macro recorder that can record any actions that you make using the ImageJ menus into a new script:

  • Ensure you are ready to start recording, for example have your image open
  • Select Plugins > Macros > Record. This will open a new macro Recorder window
  • Perform your ImageJ work, e.g. Image > Color > Split Channels
  • For each step ImageJ will write the macro command to the Recorder window
  • When you have finished all your steps click the 'Create' button in the Recorder window. This will generate a new macro script in a macro window
  • You can edit the macro script if necessary (e.g. to remove unwanted commands) and save it to file
  • Run the macro script from the macro window using Macros > Run Macro

If you close the window or have restarted ImageJ use Plugins > Macros > Run... to re-open your saved macro script.

Batch Processing

ImageJ can run a macro on many images in a single batch process. Full details and examples of the batch functionality can be found in the ImageJ Batch Processing Guide.

Plugins

Plugins are programs written in Java that can be run from within ImageJ. Many of the standard ImageJ commands are actually plugins. If you know how to program in Java you can write plugins to perform a your own analysis. However there are free plugins that have already been written to perform many different tasks. The ImageJ Plugins page has a list of hundreds of useful plugins.

To install a plugin you will need either the compiled Java file (.class suffix), a compiled Java archive (.jar suffix) or the Java source code (.java suffix). If you have a .class or .jar file then you simply put the file into the ImageJ plugins folder of your ImageJ program directory. The plugin should then appear in the menu when you restart ImageJ (or choose Help > Update Menus).

If you have the Java source code then you must compile the code. You can do this using ImageJ:

  • Select Plugins > New > Plugin and ImageJ will create boiler-plate Java code for your plugin
  • Paste in your actual Java source code to the window
  • Choose File > Compile and Run. Save the plugin to your ImageJ plugins folder using the plugin name (look for the line 'public class [name] implements PlugIn' in the code). The name must contain an underscore '_' for it to be recognised by ImageJ
  • ImageJ will then save the .java file, compile the file and run the plugin
  • The plugin should then appear in the menu when you choose Help > Update Menus

GDSC ImageJ Plugins

The imaging workstations within the centre have several plugins installed for use with microscopy images. These can be accessed from the ImageJ Plugins menu.

LOCI The Bio-Formats plugin allows many different image formats to be read. Choose Plugins > LOCI > Bio-Formats Importer
OMERO The OMERO plugin allows images to be read from an OMERO server into ImageJ
GDSC Contains analysis programs for microscopy images including colocalisation analysis and peak/foci finding

Further details can be found on the ImageJ Plugins page.

For details of the GDSC ImageJ plugins please contact Alex Herbert.