Book Image

Image Processing with ImageJ - Second Edition

Book Image

Image Processing with ImageJ - Second Edition

Overview of this book

Advances in image processing have been vital for the scientific and technological communities, making it possible to analyze images in greater detail than ever before. But as images become larger and more complex, advanced processing techniques are required. ImageJ is built for the modern challenges of image processing – it’s one of the key tools in its development, letting you automate basic tasks so you can focus on sophisticated, in depth analysis. This book demonstrates how to put ImageJ into practice. It outlines its key features and demonstrates how to create your own image processing applications using macros and ImageJ plugins. Once you’ve got to grips with the basics of ImageJ, you’ll then discover how to build a number of different image processing solutions. From simple tasks to advanced and automated image processing, you’ll gain confidence with this innovative and powerful tool – however and whatever you are using it for.
Table of Contents (17 chapters)
Image Processing with ImageJ Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
2
Basic Image Processing with ImageJ
Index

Obtaining and installing ImageJ


The current version of ImageJ can be run on any platform that supports Java. When you wish to use ImageJ or one of the other distributions, a version can be downloaded for your specific operating system. A distribution of ImageJ can be downloaded with the Java Runtime Environment (JRE) prepackaged. The following sections will explain how to obtain and install ImageJ on the three main operating systems: Windows, OS X, and Linux.

Installation of ImageJ

When you download a copy of ImageJ, the JRE can be provided along with it. If you already have a copy of the JRE installed, you could download ImageJ without the JRE for a faster download. The minimal requirements to run ImageJ are JRE Version 1.6 or higher. For some distributions, most notably Fiji, the JRE has to be version 1.6. This limitation is due to the current implementation of the updater included with Fiji, which is not capable of updating the JRE. This problem may be resolved in the future.

As ImageJ comes with its own JRE, it can be extracted on a USB drive and run from there without installation. The only limitations on the system are dependent on the size of the images. ImageJ loads images directly into memory, so the available system memory needs to be large enough to hold the images you wish to process. When memory requirements exceed 3 GB, a 64-bit operating system with a 64-bit JRE is required.

Since ImageJ is platform independent, you could use the same version on all three platforms: Windows, OS X, and Linux. The only platform-dependent part is the JRE; for each platform, there is a specific JRE installation. The following sections will explain how to install ImageJ on each of the operating systems.

Installing on Windows

In order to install ImageJ on Windows, you can download the latest version from the ImageJ website at the NIH (http://imagej.nih.gov/ij/download.html) or for Fiji from the Fiji website (http://Fiji.sc/Downloads). When downloading from the NIH website, there are two choices: an installer for 32-bit or 64-bit systems and a ZIP archive when you wish to run ImageJ on a platform without installer privileges.

When using the installer version, it is generally not recommended that you install ImageJ in the Program Files folder. Certain files within the ImageJ folder need to be modified when using the program, so when running it as a regular user, access problems may occur. Also, when installing or creating plugins, the compiled files need to be placed in the plugins folder within ImageJ. This folder may not have write permission when it is located in the Program Files folder for regular (non-administrator) users. Alternatively, you could change the access permissions for the ImageJ folder specifically. However, this is not recommended from a security point of view.

Double-clicking on the ImageJ.exe file within the extracted folder will start ImageJ. This file is a wrapper executable that calls the ij.jar file and uses the supplied JRE to run it. The Fiji distribution comes as a ZIP archive that can be extracted on a disk and run immediately:

Installing on Mac OS X

ImageJ is available for Mac OS X as a ZIP archive that can be extracted to a folder within the Applications folder. The Fiji distribution can be downloaded as a DMG file that can be dropped in the Applications folder. This will install the ImageJ folder and make it accessible for all registered users. It will also create a Fiji icon in the app drawer. If you wish to import or export QuickTime movies under OS X 10.10 (Yosemite), you need to download the QTJava.zip and libQTJNative.jnilib files from http://imagej.nih.gov/ij/download/qt/ into your home directory within the Library/Java/Extensions folder.

Note that in OS X 10.7 and later, you may receive a warning the first time you try to run ImageJ. This warning will say ImageJ can't be opened because it is from an unidentified developer. This can be resolved by going to the system settings and pushing the allow button in the security and privacy panel. This should prevent this warning from showing up in the future. Alternatively, you can select the Anywhere option from the Allow apps downloaded from section. The latter option is not recommended from a security point of view, as it might also allow malicious software to be executed.

Note that when ImageJ (or Fiji) is run on OS X, the menu bar is not part of the main window as in Windows:

Installing on Linux

ImageJ can be installed on Linux platforms by unpacking the distribution from the NIH website. The distribution from the NIH website is available as a ZIP file, while the Fiji distribution is available as a tar.gz file. For most Linux distributions, it is recommended that you extract the archive to a location within your home folder. This prevents problems with write permissions on the ImageJ folders. The folder contains a shell script to run ImageJ. This shell script is named ImageJ. For different desktop environments, methods exist to create a shell shortcut to this script to allow it to run from a shortcut.