Edit Menu


Reverses the effect of the most recent image editing or filtering operation. Note that operations on entire stacks cannot be reversed using Undo.


Copies the contents of the current image selection to the internal clipboard and fills it with the current background color.


Copies the contents of the current image selection to the internal clipboard. If there is no selection, copies the entire active image. The amount of image data copied is shown in the status bar. Use the Copy to System command to copy to the system clipboard. Use File>New>Internal Clipboard to create a new window from the contents of the internal clipboard. Pressing the 'c' key is a convenient shortcut for this command.


Inserts the contents of the internal clipboard into the active image. The pasted image is automatically selected, allowing it to be dragged with the mouse. Click outside the selection to terminate the paste. Select Edit>Undo to abort the paste operation. Pressing the 'v' key is a convenient shortcut for this command.

Use the File>New>System Clipboard command to paste from the system clipboard. With ImageJ 1.38a and later, Edit>Paste pastes from the system clipboard if the internal clipboard is empty. If it is not empty, and no images are open, Edit>Paste opens a new image window to display the internal clipboard.

Paste Control...

After a Paste, use the Paste Control popup menu to control how the image currently being pasted is transferred to the destination image.


Except for "Blend" and "Transparent", the Paste Control transfer modes are the same as those listed in the description of Process>Image Calculator. The "Blend" mode is the same the Image Calculator "Average" mode. In "Transparent" mode, white pixels are transparent and all other pixels are copied unchanged. "Transparent" mode only works with 8-bit and RGB images.


Erases the contents of the selection to the current background color (normally white). The backspace (or delete) key is a handy shortcut for this command. Alt-click in the Image>Colors>Color Picker window to change the background color. With stacks, a dialog is displayed offering the option to clear the selection in all stack images. Clear by pressing the backspace key to avoid this dialog.

Clear Outside

Erases the area outside the current image selection to the background color. Alt-click in the Image>Colors>Color Picker window to change the background color.


Fills the current selection with the current foreground color. The foreground color is set by using the dropper tool to "pick up" a new color from an image. Alt-click with any other tool, except the magnifying glass, to temporarily switch to the dropper tool. Colors can be "picked up" from the Image>Colors>Color Picker window using any tool. The dropper tool icon in the tool bar is drawn in the foreground color and the frame around it is drawn in the background color.

With stacks, a dialog is displayed offering the option to fill the selection in all stack images. Fill the selection by pressing "f" to avoid this dialog.


Outlines the current selection using the current foreground color and line width. When the dropper tool is selected, clicking on the image changes the foreground color, while alt-clicking changes the background color. Colors can be "picked up" from the Image>Color>Color Picker window using any tool. The easiest way to open the Color Picker is to double click on the dropper tool. The dropper tool icon is drawn in the foreground color and the frame around it is drawn in the background color. The foreground and background colors can also be set using the Edit>Options>Colors command.

Use the Edit>Options>Line Width command, or double-click on the line tool, to change the line width.

With stacks (v1.42b and later), a dialog is displayed offering the option to draw the selection in all stack images. Draw the selection by pressing "d" to avoid this dialog.

Note: If the line width is an even number, the selection boundary is at the center of the line. If the line width is odd (1, 3, ...), the center of the line drawn is displaced from the selection edge by 1/2 pixel to the bottom right. Thus the line center (the line in case of line width = 1) is inside the selection at the top and left borders, but outside at the bottom and right borders. Rectangular selections (but not polygonal selections or traced selections that happen to be rectangular) are an exception to this rule: For rectangular selections, one-pixel wide outlines are always drawn inside the rectangle. Thicker lines are drawn as for the other selection types.


Creates a reversed image, similar to a photographic negative, of the entire image or selection.

Selection Submenu

The commands in this submenu create, delete or modify selections.

Select All

Creates a rectangular selection that is the same size as the image.

Select None

Deactivates the selection in the active image.

Restore Selection

Restores the previous selection to its original position. A selection is saved when you: You can transfer a selection from one image to another by activating the image with the selection, activating the destination image, then pressing shift-e (the keyboard shortcut for Restore Selection).


Fit Spline

Fits a cubic spline curve to a polygon or polyline selection.

Fit Ellipse

Replaces an area selection with the best fit ellipse. The ellipse will have the same area, orientation and centroid as the original selection. The same fitting algorithm is used to measure the major and minor axis lengths and angle when "Fit Ellipse" is selected in Analyze>Set Measurements. The DrawEllipse macro will draw the best fit ellipse and the major and minor axis.

Convex Hull

Replaces a polygon of freehand selection with its convex hull, which can be thought of as a rubber band wrapped tightly around the points that define the selection.

Make Inverse

Creates an inverse selection. What was "inside" the selection is now "outside", and vis versa.

Create Mask

Creates a new 8-bit image called "Mask" whose pixels have a value of 255 inside the selection and 0 outside. By default, this image has an inverting LUT, so black is 255 and white is 0. Check "Black Background" in Process>Binary>Options before using Create Mask and an inverting LUT will not be used (black will be 0 and white 255).

Create Selection

Creates a selection from a thresholded image or a binary mask. This command is based on the Threshold_To_Selection plugin written by Johannes Schindelin.


Rotates the selection by the specified number of degrees (negative number indicate counter-clockwise rotation). Does not work with composite selections in ImageJ 1.41d and earlier. This command runs the RotateSelection macro in ij.jar.


Grows an area selection by a specified number of pixels. Enter a negative value to shrink the selection. Enter zero to convert a composite selection into a polygon selection. This command runs the EnlargeSelection macro in ij.jar. ShrinkSelection is a variation of this macro that does not shrink from the image edges.

Make Band...

Takes an area selection and creates a band with a thickness of the specified number of pixels. If you imagine the band as a doughnut shape, then the original selection corresponds to the hole (i.e. the band is made by growing out the original selection). This command runs the MakeSelectionBand macro in ij.jar.


Opens a dialog that allows your to define a rectangular or elliptical selection. Width and Height are the dimensions of the selection. X Coordinate and Y Coordinate define the position of the selection. Check Oval to create an elliptical selection. If Centered is checked, the selection is positioned so X Coordinate and Y Coordinate define the center of the selection, otherwise they define the upper left corner.

Add to Manager

Adds the current selection to the ROI Manager. If there is no selection then it opens the ROI Manager. As a shortcut, press "t". (Except when using the text editor, you do not have to hold down the control key to use menu shortcuts).

Straighten (v1.41 or later)

This command straightens a curved object in an image. The curved object must first be outlined using the segmented line tool. Use the Line Width widget, opened by double clicking on the line tool icon, to adjust the width of the line selection. Check Spline Fit in the Line Width widget to fit a cubic spline curve to the points that define the line.

[Nile Bend]

Drag the points along the line selection to reposition them. Alt-click on a point to delete it. Shift-click on a point to duplicate it. Press shift-e (Edit>Selection>Restore Selection) to restore accidentally deleted lines.

This command also works with straight line selections. In this case, the object defined by the line selection is rotated to be horizontal.

Options Submenu

Use commands in this submenu to change various ImageJ user preference settings.

Line Width...

Displays a dialog box that allows the width of lines generated by the Draw command to be changed.



JPEG Quality specifies the compression level uses by the File>Save As>Jpeg command. Requesting a higher degree of compression (a lower value) will result in smaller files, but poorer image quality. Please note that it is not a good idea to use lossy-encoded JPEG formatted images when doing image processing and analysis because it alters the content of the original image and introduces artifacts.


File Extension for Tables is the default extension (not format) using when saving tables (e.g., the Results table).

Check Use JFileChooser to Open/Save to enable versions of File>Open and File>Save As> that use the Java JFileChooser instead of the native OS file open and save dialogs. The main advantage of JFileChooser is the ability to open multiple files by shift-clicking to select multiple contiguous files and control-clicking to select more than one individual file. On the other hand, it is slower, uses more memory, and does not behave like the file open and save dialogs used in other applications.

Export Raw in Intel Byte Order specifies the byte order used when saving 16-bit and 32-bit images using File>Save As>Raw Data, or File>Save As>Image Sequence when "Raw" is choosen as the Format. Check this option to export images using the order used by Intel x86 based processors (little-endian). This Wikipedia article has more information.


Opens a small window with three popup menus for specifying the type face, size and style of the font used by the text tool.


Profile Plot Options...

Use this dialog to control how plots generated by Analyze>Plot Profile are displayed.


Width and Height specify the width and height of the plot in pixels.

If Fixed y-axis scale is checked, the y-axis range is fixed and the specified Minimum Y and Maximum Y values are used, otherwise, plots are scaled based on the minimum and maximum gray values.

Check Do not save x-values to have "List", "Save" and "Copy" in profile plot windows display or save only y-values. Check Auto-close to have plot windows automatically closed when these buttons are clicked.

Check Vertical profile to generate row average plots of rectangular areas instead of the default column average plots. Note that pressing alt-k (Analyze>Plot Profile) also generates vertical profiles.

If List values is checked, the list of values is automatically opened. If Auto-close is also checked, the plot is closed and only the list of values remains open.

Check Interpolate line profiles and profile values will be interpolated along the line selection.

Check Draw grid lines to have gray grid lines drawn in the plot.

[sub-pixel resolution]

Enable Sub-pixel resolution and line selections created on zoomed images will use floating-point coordinates, resulting in smoother curves.

[sub-pixel examples]

The SubPixelSelections script demonstrates how to create other types of sub-pixel resolution selections. It does not require that the Sub-pixel resolution option be enabled.

Point Tool...

Use this dialog to configure the point selection tool. You can also display this dialog by double-clicking on the point tool icon.

[Point Tool Dialog]

If Mark Width is greater than zero, and Auto-Measure is enabled, a mark of the specified size is drawn when you click with the point tool. If Auto-Measure is not enabled, the mark is drawn when you use the Measure command. If Auto-Measure is enabled, ImageJ records the location of point tool mouse clicks. If Auto-Next Slice is checked, ImageJ advances to the next stack slice after each measurement is recorded.


This dialog contains options that control how images are displayed, an option to display better looking toolbar icons, and an option to set the menu font size.

[Appearance Dialog]

Interpolate Zoomed Images - Use interpolation instead of pixel replication when displaying zoomed images.

Open Images at 100% - Newly open images are displayed using 100% magnification (1 image pixel = 1 screen pixel).

Black Canvas - Causes the image canvas (white by default) to be rendered in black. This is useful when looking at X-ray images in order to avoid high contrasting intensities at the image edges.

No Image Border - Display images without the default one pixel wide black border.

Use Inverting Lookup Table - Causes newly opened 8-bit images to have inverted pixel values, where white=0 and black=255. This is done by both inverting the pixel values and inverting the LUT. Use the Image>Lookup Tables>Invert LUT command to invert an image without changing the pixel values.

Double Buffer Selections - This option reduces flicker when working with complex selections but it also increases memory usage and slows screen updates. It is not needed on Mac OS X, which has built in double buffering.

Check Antialiased tool icons to smooth and darken the tool icons in the ImageJ window. This option is always enabled on Mac OS X and Windows Vista. On Windows XP, enable Clear Type sub-pixel antialiasing to improve the quality of text in menus, as shown in the illustration.

[ImageJ Window]

Auto contrast stacks - Newly displayed stack slices are contrast enhanced when this option is enabled, or if the shift key is down.

Menu Font Size - Specifies the size of the ImageJ window menu font. Use a size of "0" (zero) to use Java's default menu font size. The option is ignored on Mac OS X. Changing the font size requires a restarting ImageJ.


Use this dialog to set options that control how images are converted from one type to another or to have the Edit>Invert command do full range (0-65535) 16-bit inversions.


Check Scale When Converting to have ImageJ scale from min-max to 0-255 when converting from 16-bits or 32-bits to 8-bits or to scale from min-max to 0-65535 when converting from 32-bits to 16-bits. Note that Scale When Converting is always checked after ImageJ is restarted.

If Weighted RGB to Grayscale Conversion is checked, the formula gray=0.299*red+0.587*green+0.114*blue is used to convert RGB images to grayscale. If it is not checked, the formula gray=(red+green+blue)/3 is used. The default weighting factors (0.299,0.587,0.114), which are based on human perception, are the ones used to convert from RGB to YUV, the color encoding system used for analog television. The weighting factors can be modified using the setRGBWeights macro function.

Enable the Full range 16-bit inversions option to have 16-bit images or selections inverted using the full pixel value range (0-65535) or, if set, using the Unsigned 16-bit range in the Set option of the Image>Adjust>Brightness/Contrast dialog. When this option is not enabled, each pixel in the image or selection is inverted using v2=max-(v1-min), where 'min' and 'max' are the image's minimum and maximum pixel values.


Displays a dialog box with options for the Plugins>Compile and Run command.


Target specifies the Java version of the class files created by PluginsPlugins>Compile and Run. Plugins compiled with a Target of 1.6 will not run on earlier version Java. A Target of 1.4 should be used to create plugins capable of running on all versions ImageJ. Target cannot be set higher than the version of Java ImageJ is currently running on.

Enable Generate Debugging Info (javac -g) to include information needed by Java debuggers in the class files.

Memory & Threads...

Use this dialog to specify the maximum amount of memory available to ImageJ and to specify the number of threads used by filters when processing stacks.


Java applications such as ImageJ will only use the memory allocated to them but this dialog allows the user to allocate more than the default, typically 640MB. Note that specifying more than 75% of real RAM could result in virtual RAM being used, which may cause ImageJ to become slow and unstable. Also note that this dialog cannot be used to set the memory allocation if ImageJ is run from the command line or by double-clicking on ij.jar.

A 64-bit OS and a 64-bit version of Java are required to use more than ~1700MB of memory. Windows users must be running a 64-bit version of Windows and must install a 64-bit version of Java. Mac users must be running OS X 10.5 or later and may need to use the Java Preferences utility (in /Applications/Utilities/Java) to select a 64-bit version of Java. They may also need to switch to the ImageJ64 application. Linux users need to be running 64-bit versions of Linux and Java. The title of the Memory & Threads dialog box changes to "Memory (64-bit)" when ImageJ is running on a properly configured 64-bit system. There is more information on the ImageJ Documentation Wiki.

The Parallel Threads for Stacks field, which defaults to the number of available processors, was added in v1.38u. This value determines the number of parallel threads used by commands in the Process>Filters menu when processing stacks.

[Screen shot]

Click on the status bar and ImageJ will display the amount of memory currently in use and the maximum amount available. In the illustration, 129MB out of the available 1000MB, or 12%, is in use. Clicking on the status bar also runs the Java garbage collector, which will attempt to reclaim unused memory.

Proxy Settings...

Use this dialog to modify the proxy settings of the Java Virtual Machine. This may be required for ImageJ to connect to the Internet on machines running behind HTTP proxies. For example, proxy settings may be required to update ImageJ using theHelp>Update Image command or to open the images in the FIle>Open Samples submenu.


Proxy server is the address of the HTTP proxy. Port is the port the proxy listens on, normally 8080. Or check Use system proxy settings to use the system proxy settings. Enabling this option causes the "java.net.useSystemProxies" property to be set "true".


Displays a dialog box containing miscellaneous options.

[Misc dialog]

The Divide by zero value specifies the value used when Process>Image Calculator detects a divide by zero while dividing one 32-bit real image by another. The default is infinity. In addition to numeric values, "infinity" (positive or negative infinity), "max" (largest positive value) and "NaN" (Not-a-Number) can be entered as the Divide by Zero Value value.

Check Use pointer cursor and ImageJ will use an arrow cursor instead of the default crosshair that is sometimes difficult to see on grayscale images in areas of medium brightness. This option can also be used to work around a bug on Windows where the text cursor is sometimes used in place of the crosshair.

Check Hide "Process Stack?" dialog to suppress the dialog that asks "Process all xx slices?" (only the current slice will be processed).

Check Require control key for shortcuts to require that the control key (command key on Macs) be pressed when using keyboard shortcuts for menu command.

Enabling the Move isolated plugins to Misc. menu option can reduce the size of the Plugins menu, preventing it from running off the bottom of the screen. When this option is enabled, plugins that attempt install themselves in a submenu with only one command are instead installed in the Plugins>Miscellaneous submenu. An example of such a plugin is TurboReg, which normally creates a Plugins>TurboReg submenu that contains only one command.

Enable Run single instance listener and ImageJ will prevent multiple instances from being launched. On Windows, this avoids the problem where another copy of ImageJ starts each time an image is dragged and dropped on the ImageJ icon. It also prevents multiple instances when running ImageJ from the command line.

Enable Enhanced line tool and you will be able to create a straight line selection by clicking at the starting point and again at the ending point.

Enabling Debug mode causes ImageJ to display debugging messages in the "Log" window. Close the "Log" window to disable display of debugging messages.