- Installation
- Memory
- Java 8
- Upgrading
- Drag and Drop
- Known Problems
- Adding JAR Files
- Running from the Command Line
- About the Icon
Installation
Download ImageJ for Mac OS X from the Download page. The ZIP file you download (Image1.xx.zip) should automatically expand to a folder named "ImageJ". Copy this folder to the Applications folder, open it, and copy ImageJ.app to the dock. A 32-bit version of ImageJ (ImageJ32.app), needed for running QuickTime plugins, is also available, but it is unabe to use more than 1800MB of memory.The first time you run ImageJ on OS X 10.7 or later you may get get an "ImageJ can't be opened because it is from an unidentified developer" message, which can usually be bypassed by right clicking on ImageJ.app and selecting "Open" from the drop down menu. if that doesn't work, open the "Security & Privacy" panel in System Preferences and change "Allow apps downloaded from:" to "Anywhere". You can switch back to the original setting once ImageJ is running.
OS X 10.10 (Yosemite) does not include key files required for running commands like File>Import>Using QuickTime and File>Save As>QuickTime Movie that use QuickTime for Java. You can work around this problem by copying the files QTJava.zip and libQTJNative.jnilib, available at imagej.nih.gov/ij/download/qt/ into ~/Library/Java/Extensions, where "~" is your home directory. Yosemite hides the Library folder by default, so you will need to open your home folder and check "Show Library Folder" in the View>Show View Options dialog. Before copying the files, you will need to create the ~/Library/Java and ~/Library/Java/Extensions folders.
Memory
Use the Edit>Options>Memory & Threads command to make more than default 3000MB of memory available to ImageJ. Note that setting the "Maximum Memory" value to more than about 75% of real RAM may result in poor perfomance due to virtual memory "thrashing". The maximum amount of memory that can be allocated on 32-bit systems is about 1.8GB. Another way to make more memory available to ImageJ is by running from the command line and using the -Xmx option.The Edit>Options>Memory command updates the VMOptions key in the Contents/Info.plist XML file in the ImageJ application.
You will get an error message if you do not have write permission for the ImageJ application. To check and/or change the permissions, open the ImageJ folder, select the ImageJ application, and use the Finder's File>Get Info command. You will also get an error message if the ImageJ application has been renamed.<key>VMOptions</key> <string>-Xms64m -Xmx1000m</string>Java 8
An experimental version of ImageJ bundled with Java 8 (1.8.0_45 [64-bit]) is available at wsr.imagej.net/download/ImageJ-osx-java8.zip. It requires OS X 10.8 (Mountain Lion) or later.Upgrading
Use the Help>Update ImageJ command to upgrade to the latest version of ImageJ.Drag and Drop
The OS X version of ImageJ opens images, text files, ROIs and LUTs that are dropped on the ImageJ icon.Known Problems
- With Java 1.6, the first drag and drop on the ImageJ window is sometimes ignored. This bug can be worked around by dropping on the toolbar instead of the status bar. Apple fixed this bug in Java 1.6.0_17 (late 2009).
- Using command-v to paste text into the file name field of Save As dialog boxes does not work. This is a bug in the Java FileDialog class that can worked around by right-clicking in the name field and selecting "Paste" from the drop down menu.
- The optional "Tap to Click" feature on MacBooks and MacBook Pros does not reliably enable/disable checkboxes in ImageJ dialog boxes.
- Keyboard shortcuts sometimes require holding down the command key with Java 1.5 and Java 1.6. To reproduce this problem, press shift-b to open the "blobs" sample image, create a selection, press "w" to close the image, then try to open "blobs" again by pressing shift-b.
- Shift-clicking to select multiple ROIs in the ROI Manager does not work with Java 1.6. This bug has been reported to Apple (ID# 7092724).
- Commands and plugins that use QuickTime for Java fail with 64-bit versions of Java and Java 1.6 on Mac OS X is 64-bit only.
- On Leopard, running Java 1.5.0, the File>New>System Clipboard command generates an exception. This bug is reported to be fixed in the Java for Mac OS X 10.5 Update 2.
- On Leopard, pressing return to dismiss a dialog sometimes results in the default text field values being used instead of the entered values. ImageJ 1.40e and later have a work around for this bug.
- ImageJ sometimes crashes on OS X. Upgrading to the latest version of Java should reduce the number of crashes. This bug has been reported to Apple (ID# 3488737).
- 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!
- 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 "Unselect" button.
- Image drawing is very slow. The Plasma plugin and Plasma2 applet are test cases for this problem.
- The available memory value displayed by ImageJ (1.32h or later) is 64MB too high when ImageJ is started by double-clicking on ij.jar or run from the command line due to a bug in Java's Runtime.maxMemory() method.
- With Java 1.4.2, the cursor is always an arrowhead. This bug has been reported to Apple (ID# 3761991). A test case applet is available.
The -Xmx1024m switch specifies that ImageJ will have available a maximum of 1024MB (1GB) of RAM.java -jar -Xmx1024m ImageJ.app/Contents/Resources/Java/ij.jar
Use a command like this to run ImageJ from any directory:
ImageJ recognizes the following command line options:java -Xmx1024m -jar /Applications/ImageJ/ImageJ.app/Contents/Resources/Java/ij.jar -ijpath /Applications/ImageJ
"file-name" Opens a file Example 1: blobs.tif Example 2: /Users/wayne/images/blobs.tif Example 3: e81*.tif -macro path [arg] Runs a macro or script (JavaScript, BeanShell or Python), passing an optional string argument, which the macro or script can be retrieve using the getArgument() function. The macro or script is assumed to be in the ImageJ/macros folder if 'path' is not a full directory path. Example 1: -macro analyze.ijm Example 2: -macro script.js /Users/wayne/images/stack1 Example 2: -macro script.py '1.2 2.4 3.8' -batch path [arg] Runs a macro or script (JavaScript, BeanShell or Python) in batch (no GUI) mode, passing it an optional argument. ImageJ exits when the macro finishes. -eval "macro code" Evaluates macro code Example 1: -eval "print('Hello, world');" Example 2: -eval "return getVersion();" -run command Runs an ImageJ menu command Example: -run "About ImageJ..." -ijpath path Specifies the path to the directory containing the plugins directory Example: -ijpath /Applications/ImageJ -portSpecifies the port ImageJ uses to determine if another instance is running Example 1: -port1 (use default port address + 1) Example 2: -port2 (use default port address + 2) Example 3: -port0 (don't check for another instance) -debug Runs ImageJ in debug mode