ImageJ Icon    OS X Installation

To install ImageJ, download the Mac OS X .tar.gz file and double-click on it to extract the "ImageJ (OS X)" folder. To run ImageJ, open this folder and double-click on the ImageJ icon.

Memory
To make more than 128MB of memory available to ImageJ, use a text editor such as TextEdit to edit the line

com.apple.mrj.application.vm.options=-Xmx128M
in the ImageJ.app/Contents/Resources/MRJApp.properties file, where ImageJ.app is the directory (bundle) that the Finder displays as the ImageJ application. You can view the files and folders in the ImageJ bundle by control-clicking on the ImageJ application and selecting "Show Package Contents". Another way to make more memory available to ImageJ is by running from the command line and using the -Xmx option.

Upgrades
To upgrade to the latest version of ImageJ, replace the ij.jar file in the ImageJ application with a newer one from http://rsb.info.nih.gov/ij/upgrade/. To do this, control-click on the ImageJ application, select "Show Package Contents", and then drag the newer ij.jar into the Contents/Resources/Java folder.

Drag and Drop
The OS X version of ImageJ opens images, text files, ROIs and LUTs that are dropped on the ImageJ icon.

Java 1.4.1 Update
Think twice before intalling the Java 1.4.1 update from Apple. It is so buggy that ImageJ, when run from the command line or by double-clicking ij.jar, becomes almost unusable. The ImageJ application, however, will still run okay since it continues to use the Java 1.3.1 runtime, which the update does not remove.

It is possible to revert to Java 1.3.1 by typing these two commands into a Terminal window:

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -sfh 1.3.1 CurrentJDK
This switches the symbolic link for the current JDK to 1.3.1. You can view what the CurrenJDK is pointing to by running (in the same directory):
ln -al
Known Problems
  1. Two clicks are required to select a tool and two more are required to use it. (Fixed in Jaguar.)
  2. The "rubberband" is sometimes not visible when using the freehand and polyline tools (java.awt.Graphics.setXORMode() bug). (In Jaguar, leaves "trails".)
  3. OS X requires a lot of memory for each open window. Converting a 1024x1024x10x8-bit stack (10MB) to separate images requires 58MB of additional memory!
  4. Text quality is poor due to antialiasing. (A workaround is in v1.28d.)
  5. Zoomed images are blurry (java.awt.Graphics.drawImage() bug). (Fixed in Jaguar.)
  6. The cross hair cursor is invisible in dark areas. (Fixed in Jaguar.)
  7. Tab support is broken in Plugins/Edit (java.awt.TextArea bug).
  8. Arrow keys don't work in Plugins/Edit (java.awt.TextArea bug).
  9. Mouse wheel doesn't work in Plugins/Edit (java.awt.TextArea bug).
  10. Dragging and dropping image files on the ImageJ icon only works when ImageJ is already running. (Fixed in Jaguar.)
  11. There does not appear to be a way to unselect an ROI in the ROI Manager (java.awt.List bug). As a workaround, press the "Select All" button twice (v1.28d and later).
  12. Buttons are HUGE, messing up the layout of some windows (e.g., Image/Adjust/Threshold). There is a work around (using the TrimmedButton class) in v1.28o and later.
  13. Labels in the optional "Outlines" plot created by Analyze Particles are gray instead of red due to antialiasing. (A workaround is in v1.28u.)
  14. Image drawing is very slow. The Plasma plugin and Plasma2 applet are test cases for this problem.
  15. Cut (cmd-x), copy (cmd-c) and paste (cmd-v) do not work in dialog boxes.
  16. Dialog boxes sometimes open blank. As a workaround, click on the desktop, then click in the dialog box. (New in Jaguar.)
  17. Plot coordinates are not displayed if a profile plot window is moved.
Running from the Command Line
To run ImageJ from the command line, open a Terminal window, cd to the ImageJ directory, then use the java command to run ImageJ. The easiest way to do this is to drag the ImageJ folder to the Terminal Window, type return, then type:
java -jar -mx256m ImageJ.app/Contents/Resources/Java/ij.jar
(or java -mx256m -cp ImageJ.app/Contents/Resources/Java/ij.jar ij.ImageJ)
Or if ij.jar is in the current directory, type:
java -jar -Xmx256m ij.jar
(or java -Xmx256m -cp ij.jar ij.ImageJ)
The -Xmx256m switch specifies that ImageJ will have available a maximum of 256MB of RAM.

Here is a simple AppleScript that sends commands to Terminal to have it automatically launch ImageJ:

tell application "Terminal"
    run
    do script with command "cd /Applications/ImageJ 
        java -jar -mx350m ./ImageJ.app/Contents/Resources/Java/IJ.jar"
end tell
With OS X 10.1 or later, you can also run ImageJ by double-clicking on ij.jar.

Adding a JAR File
Some plugins require adding a JAR file to ImageJ. To do this, control-click on the ImageJ application, select "Show Package Contents", drag the JAR file into Contents/Resources/Java, then open Contents/Resources/MRJApp.properties in a text editor (e.g., TextEdit) and add the JAR file to the line that starts with "com.apple.mrj.application.classpath". This is what the line should look like after adding jimi.jar, a JAR file required by the Jimi_Reader and Jimi_Writer plugins:

com.apple.mrj.application.classpath=Contents/Resources/Java/ij.jar:Contents/Resources/Java/jimi.jar

| Install | Download | Home |