Keyboard Shortcuts

Command Shortcut Description
New N Creates a new image or stack
Open Samples Shift-B Opens "Blobs" example image
Close W Closes the active window
Save S Saves active image in Tiff format
Revert R Revert to saved version of image
Print P Print active image
Undo Z Reverses the effect of the last operation
Cut X Copy image to clipboard and clear selection
Copy C Copy image to clipboard
Paste V Paste clipboard selection into active image
Clear backspace Erases selection to background color
Select All A Select entire image
Select None Shift-A Delete selection
Restore Selection Shift-E Restores ROI
Fill F Fills selection in foreground color
Draw D Draw selection
Invert Shift-I Invert image or selection
Adjust Contrast Shift-C Adjust brightness and contrast
Adjust Threshold Shift-T Adjust threshold levels
Show Info I Displays information about active image
Next Slice > Advance to next stack slice
Previous Slice < Backup up to previous stack slice
Start Animation = Starts/stops stack animation
Duplicate Shift-D Duplicates active image or selection
Scale E Scale image or selection
Smooth Shift-S 3x3 unweighted smoothing
Find Edges Shift-F Performs Sobel edge detection
Repeat Command Shift-R Repeats previous command
Measure M Displays statistics about active image or selection
Histogram H Displays a histogram of the active window or selection
Plot Profile K Displays density profile plot of current selection
ImageJ enter Brings ImageJ window to front
Put Behind tab Switches to next image window

Alt Key Modifications
   Image/Adjust/Threshold: Adjusting Min also adjusts Max
   Image/Stacks/Add Slice: Insert before current slice
   Image/Stacks/Next Slice: Skip nine slices
   Image/Stacks/Previous Slice: Skip nine slices
   Image/Duplicate: Don't show dialog
   Image/Colors: Alt-click to "pick up" background color
   Process/Equalize: Do classic histogram equalization
   Process/Subtract Background: Show background image
   Analyse/Plot Profile: For rectangular selections, generate row average plots
   Analyse/Tools/Analyse Line Graph: Show intermediate image
   Plugins/Utilities/ImageJ Properties: List all Java properties
   Plugins/Utilities/Monitor Memory: Simulate 640x480 frame grabber
   Any User Plugin: Load using new class loader

Space Bar Modifications
   Any Tool: Temporarily switch to the "hand" (scrolling) tool
   Moving through a stack: Automatically adjust min/max display values

Arrow Keys
Use the arrow keys to move selection outlines one pixel at a time. Resize rectangular and oval selections by holding down the the alt (option) and while using the arrow keys.


File/Save As/Fits...
Analyse/Photometry Settings
Analyse/Clear Photometry Results
Help/Online Docs...


Area Selection Tools
Use these tools to create area selections that will be operated on separately from the rest of the image. The contents of an area selection can be copied to the internal clipboard, cleared (to white), filled with the current drawing colour, outlined (using Edit/Draw), filtered, or measured. Use the backspace key as a shortcut for Edit/Clear. Use Image/colours to set the drawing colour. Double click on any line tool to change the line width used by Edit/Draw. Use the arrow keys to "nudge" a selection one pixel at a time in any direction.

When creating the selection, drag with the shift key down to constrain it to a square. Use the small "handle" in the lower right corner to resize. Use the arrow keys with the alt key held down to change the width or height one pixel at a time. As a selection is created or resized, its location, width and height are displayed in the status bar.

Creates an elliptical selection. Holding the alt key down forces the selection to be circular. Use the arrow keys with the alt key pressed to change the width or height. As the selection is created or resized, its width and height are displayed in the status bar.

Creates irregularly shaped selections defined by a series of line segments. To create the selection, click repeatedly with the mouse to create line segments. When finished, click in the small box at the starting point (or double-click), and SalsaJ automatically draws the last segment.

The freehand tool lets you create irregularly shaped selections by dragging with the mouse.

Isovaluated Selection Tool
Creates a selection by tracing objects of uniform colour or thresholded objects. To trace an object, either click inside near the right edge, or outside to the left of the object. To visualize what happens, imagine a turtle that starts moving to the right from where you click looking for an edge. Once it finds the edge, it follows it until it returns to the starting point. Note that the wand tool may not reliably trace some objects, especially one pixel wide lines, unless they are thresholded (highlighted in red) using the Image/Adjust/Threshold tool. 


Line Selection Tools
Use these tools to create line selections. Use analyse/Measure to calculate the length of a line selection. Use Edit/Draw to permanently draw the line on the image. Change the drawing colour by clicking in the Image/colours window. Double click on any line tool to specify the line width. Use the arrow keys to "nudge" a line selection one pixel at a time.

 Straight Line
Use this tool to create a straight line selection. Holding the alt key down forces the line to be horizontal or vertical. To spatially calibrate an image, create a line selection corresponding to a known distance (e.g. 10mm), then enter that distance in the analyse/Set Scale dialog box. PlugIns/Draw Arrow will draw an arrow based on a straight line selection.

Segmented Line
Create a segmented line selection by repeatedly clicking with the mouse. Each click will define a new line segment. Double-click when finished.

 Freehand Line
Select this tool and drag with the mouse to create a freehand line selection.

Create an angle selection by clicking Three times with the mouse. The first twocreate the first straight line of the angle and the last creates the second. The value of the angle is displayed during the construction in the status bar.

Point Selection Tool

Use this tool to create a point selection and to display coordinates and value in a new window. Click once to create a single point selection. Click to add more points.  Alt-click on a point to delete it.  Double-click on the point tool icon to display the following configuration dialog box.


 Text Tool
Use this tool to add text to images. It creates a rectangular selection containing one or more lines of text. Use the keyboard to add characters to the text and the backspace key to delete characters. Use Edit/Draw to permanently draw the text on the image. Use Edit/Options/Fonts, or double-click on the text tool, to specify the typeface, size and style.

Magnifying Glass
Click on the image with this tool to zoom in. Alt-click (or right-click) to zoom out. The current magnification is shown in the image's title bar. Double-click on the magnifying glass icon to revert to 100% (1:1) magnification. There are 20 possible magnification levels: 3.1, 4.2, 6.3, 8.3, 12.5, 16.7, 25, 33.3, 50, 75, 100, 200, 300, 400, 600, 800, 1200, 1600, 2400 and 3200 percent. When zooming in, press the shift key to prevent the window from being enlarged.

 Scrolling Tool
Allows you to scroll through an image that is larger than its window. When using other tools (except the text tool), you can temporarily switch to this tool by holding down the space bar.

Colour Picker
Sets the foreground drawing colour by "picking up" colours from images. The colour of this tool's icon changes to match the drawing colour. colours can "picked up" from the Image/colours window using any tool. Alt-click in the Image/colours window to change the background colour. Double-click on this tool to display the Image/colours window. he icon for this tool is drawn in the current foreground colour and the frame around it is drawn in the current background colour.

Plugins Menu


Plugins and macros are loadable code modules that extend the capabilities of SalsaJ. Plugins are written in the Java programming language and compiled to .class files. Macros, written in SalsaJ's Java-like macro language, are stored in .txt files. Plugins run faster and are more flexible but macros are easier to write and debug. Plugins and macros in the plugins folder, with an underscore in their name, are listed at the bottom of this menu. Plugins and macros in subfolders of the plugins folder are listed in submenus. Use Shortcuts/Create Shortcut to assign a keyboard shortcut to a plugin or a macro.

Use the Record command to record a series of commands and to convert them to a macro. Use the New command to create a new macro or plugin and Edit to make changes to an existing one. More than 100 plugins are available on the ImageJ Web site as well as more than 80 macros. A tutorial for plugin writers is available at Information about macros is available on the ImageJ Web site.

Internal Plugins
Most commands in SalsaJ are implemented as plugins but these internal plugins are located in the salsaj.jar file, not in the plugins folder. salsaj.jar also contains the properties file (IJ_Props.txt) that SalsaJ uses to install internal plugins in menus. A JAR file (Java ARchive) is formatted the same as a ZIP file, so you can use a ZIP utility to look at the contents of salsaj.jar.

You can convert an internal plugin to a user plugin by copying the source to the plugins folder, adding an underscore to the file name and class name, and changing the package statement to an import statement. For example, to change the RoiManager (analyse/Tools/ROI Manager) to a user plugin:

  1. Copy ij/plugin/frame/ to the plugins folder.
  2. Change the file name to
  3. Open using Plugins/Edit and change all instances (4) of "RoiManager" to "Roi_Manager".
  4. Change the first line from "package ij.plugin.frame;" to "import ij.plugin.frame.*;".
  5. Run the new plugin using the editor's File/Compile and Run command.
There will be a new Roi Manager command in the Plugins menu the next time you restart SalsaJJ.

Changing Location of Plugins Directory
The "plugins.dir" property specifies the location of the parent of the plugins directory. This property can be set from either the command line or from within a Java program that starts SalsaJ. For example, if you run SalsaJ with the command

java -Dplugins.dir=/Users/wayne -cp ij.jar ij.ImageJ
it will look for the plugins folder in the /Users/wayne/ directory. This property can also be set in a program that launches SalsaJ:
System.getProperties().setProperty("plugins.dir", "/users/wayne");
new ImageJ(null);

This submenu contains commands for installing, running and recording macros, as well as any macro commands added by Plugins/Macros/Install. Macros contained in a file named "StartupMacros.txt", in the macros folder, are automatically added to this submenu when SalsaJ starts up.

Adds one or more macros contained in a file to the bottom of this submenu. To install a set of macros, and at the same time view their source code, open the macro file with File/Open and use the editor's Macros/Install Macros command. Macros in the file ImageJ/macros/StartupMacros.txt are automatically installed when SalsaJ starts up.

Loads and runs a macro without opening it in the SalsaJ editor. To run a macro, and at the same time view its source code, open it with File/Open and use the editor's File/Run Macro command.

Opens the SalsaJ command recorder. To create a macro, open the recorder, use one or more SalsaJ commands, then click "Create". When the recorder is open, each menu command you use generates a macro run() function call. The run() function has one or two string arguments. The first is the command name. The optional second argument contains dialog box parameters.

Create a rectangular, oval or line selection and the recorder will generate a makeRectangle(), makeOval() or makeLine() function call. Click on "Auto" or "Set" in the Image/Adjust/Threshold window to generate a setThresold() call, and on "Reset" to generate a resetThresold() call. Select an image from the Window menu to generate a selectWindow() call. Click in the Image/colour/colour Picker window to generate setForegroundcolour() and setBackgroundcolour() calls.

This submenu contains commands for creating keyboard shortcuts and for installing and removing plugins.

Create Shortcut...
Assigns a keyboard shortcut to an SalsaJ menu command and lists the shortcut in the Shortcuts submenu.

Select the command from the popup menu and enter the shortcut in the text field. A shortcut can be a lower or uppercase letter or "F1" through "F12". Use Plugins/Utilities/List Shortcuts to get a list of shortcuts that are already being used.

Install Plugin...
Installs a plugin in a user-specified submenu. Plugins with a showAbout() method are also automatically added to the Help/About Plugins submenu.

Use the first popup menu to select the plugin and the second to select the submenu it is to installed in. The command must be different from any existing SalsaJ command. Shortcut (optional) must be a single letter or "F1" through "F12". Argument (optional) is the string that will passed to the plugin's run method.

Removes commands added to the Shortcuts submenu by Create Shortcuts. Also removes commands added by Install Plugin and removes plugins installed in the Plugins menu. The menus are not updated until SalsaJ is restarted.


Control Panel...
This command opens a window containing SalsaJ commands in a hierarchical tree structure. Click on a leaf node to launch the corresponding SalsaJ command (or plugin). Double-click on a tree branch node (folder) to expand or collapse it. Click and drag on a tree branch node (folder) to display its descendants in a separate (child) window. In a child window, click on "Show Parent"to re-open the parent window. The Control Panel was contributed to the imageJ project by Cezar M. Tigaret.

Control Panel

Monitor Memory...
Displays a continuously updated graph of SalsaJ's memory utilisation, which can be useful for detecting memory leaks. Ideally you should be able to open a several images, process them, close them, and the amount of memory used will be the same as when you started. Clicking on SalsaJ's status bar, which forces the Java garbage collector run, may help reclaim unused memory. Start the memory monitor with the alt key down to have it use a 640x480 window that simulates how a frame grabber plugin would work.

Capture Screen
Copies the the screen to an RGB image and displays that image a new window. Pressing control-shift-g will capture the screen while a modal dialog box is active if the dialog is based on SalsaJ's GenericDialog class.

Opens a new text window containing a prototype (as Java source code) for one of the three types of plugins supported by SalsaJ.

PlugIn: Opens, captures or generates images. Implements the PlugIn interface. The prototype displays "Hello world!" in the SalsaJ window. Another example is the Step Maker plugin at

PlugInFilter: Processes the active image. Implements the PlugInFilter interface. The prototype inverts the active image twice. Another example is the Image Inverter plugin at

PlugInFrame: Displays a nonimage window containing controls such as buttons and sliders. Extends the PlugInFrame class. The prototype opens a window containing a text area. Another example is the IP Demo plugin at

The text window created by this command has two menus: File and Edit. Use Compile and Run in the File menu to compile and run the plugin. The Edit menu does not contain Cut/Copy/Paste but the keyboard shortcuts for these function can be used. Note that the name you choose for the plugin must include at least one underscore.

Opens a text window that allows you to edit, compile and run plugins. Like the Compile and Run command, it requires that SalsaJ be running on a Java Virtual Machine that includes the javac compiler.

Compile and Run...
Compiles and runs a plugin. Requires that SalsaJ be running on a Java Virtual Machine that includes the javac compiler. Javac is included with the Windows and Linux versions of SalsaJ that come bundled with a Java runtime. It is also included with Mac OS X Java. Users of Sun's Java 2 SDK (Software Development Kit) for Windows, Linux and Solaris must add tools.jar to the command line that runs SalsaJ. 

Here is an example Windows command line for running SalsaJ using the Java 2 SDK (aka JDK):

java -mx100m -cp salsaj.jar;C:\jdk1.4\lib\tools.jar ij.ImageJ
It assumes the Java 2 SDK is installed in C:\jdk1.4. On a Unix system, the command would look something like this:
java -mx100m -cp salsaj.jar:\usr\local\jdk1.4\lib\tools.jar ij.ImageJ
The -mx100 options specifies that SalsaJ can use up to 100MB of RAM. To avoid virtual memory thrashing, this value should not be set to more than 2/3 of available RAM (e.g. -mx170m on a 256MB machine).

On Windows, you can create a double-clickable shortcut that uses Java 2 to run SalsaJ:

  1. Right-click on the desktop and select New->Shortcut from the menu
  2. Enter     
         javaw -mx100m -cp salsaj.jar;C:\jdk1.4\lib\tools.jar ij.ImageJ
    as the "Command line"; click "Next"
  3. Enter a name for the shortcut (e.g. "SalsaJ"); click "Finish"
  4. Right-click of the newly created shortcut and select Properties from the menu
  5. Click on the Shortcut tab
  6. Enter the path to the SalsaJ folder (normally C:\SalsaJ) in "Start in"; click "OK"
"javaw" is a variation of the java command that runs Java applications without a DOS window.

Window Menu

This menu contains two commands plus a list of open SalsaJ windows. The currently active image will have a checkmark next to its name. To activate a window, pull down this menu and select the window by name.

SalsaJ [enter]
Press the enter key to bring the SalsaJ window to the front.

Put Behind [tab]
Displays the next open image. Repeatedly press the tab key to cycle through all open images.

Analyse Menu


Based on the selection type, calculates and displays either area statistics, line lengths and angles. Area statistics are calculated if there is no selection or if a subregion of the image has been selected using one of the four tools in the tool bar. Calculates line length and angle if a line selection has been created using one of the three line selection tools .
Examples :



To export the measurements as a tab-delimited text file, select File/Save As/Measurements from the SalsaJ menu bar or File/Save As from the "Results" window menu bar. Copy the measurements to the clipboard by selecting Edit/Copy All from the "Results" window menu bar. You can also save measurements by right-clicking in the Results window and selecting Save As or Copy All from the popup menu.

The width of the columns in the "Results" window can be adjusted by clicking on and dragging the vertical lines that separate the column headings.


Clear Results
Erases the results table and resets the measurement counter.


Photometry is the determination of the flux of light emitted by a star. It is calculated by correcting the integrated values of the pixels by the value of the sky background. This value can be related to the star intensity selection as shown. Click once to select a subregion of the image where the photometry will be applied.

Example :



    Clear Photometry Results
       Erase the results table and rests the measurement counter.
       Photometry Settings




Set Scale...
Use this dialog to define the spatial scale of the active image so measurement results can be presented in calibrated units, such as millimeters. Before using this command, use the straight line selection tool to make a line selection that corresponds to known distance. Then, bring up the Set Scale dialog, enter the known distance and unit of measurement, then click OK. SalsaJ will have automatically filled in the Distance in Pixels field based on the length of the line selection.

Set Distance in Pixels to zero to revert to pixel measurements.

Setting Width/Height Ratio to a value other than 1.0 enables support for different horizontal and vertical spatial scales, for example 100 pixels/cm horizontally and 95 pixels/cm vertically. To set the pixel aspect ratio, measure the width and height (in pixels) of a digitized object with a known 1:1 aspect ratio. Enter the measured width (in pixels) in Distance in Pixels. Enter the known width in Known Distance. Then calculate the aspect ratio by dividing the width by the height and enter it in Pixel Aspect Ratio.

When Global is checked, the scale defined in this dialog is used for all images instead of just the active image.

Two examples of how to use the Set Scale command are available: Area Measurements (PDF) and DNA Contour Length Measurement.

Calculates and displays a histogram of the distribution of gray values in the active image or selection. The x-axis represents the possible gray values and the y-axis shows the number of pixels found for each gray value. The total pixel count is also calculated and displayed, as well as the mean, modal, minimum and maximum gray value.


Use the Save or Copy buttons to save the histogram data. Click on Log to display a log-scaled version of the histogram. The number to the right of Value:, which changes as you move the cursor, equals the grayscale value corresponding to the x-axis cursor position and Count: is the number of pixels that have that value.

With RGB images, the histogram is calculated by converting each pixel to grayscale using the formula gray=0.299red+0.587green+0.114blue or the formula gray=(red+green+blue)/3 . With 16-bit images, the range of gray values between the Min and Max values is divided into 256 bins.

Plot Profile
Displays a two-dimensional graph of the intensities of pixels along a line within the image. The x-axis represents distance along the line and the y-axis is the pixel intensity.


Surface Plot
Displays a three-dimensional graph of the intensities of pixels in a grayscale or pseudo colour image. Creates a stack of plots when the source is a stack. Some plots can be improved by adjusting the contrast of the source image or smoothing it. When plotting a stack, closing the plot stack window will abort the plotting process.

Change the Number of samples to adjust the number of profiles used to generate the plot. Check Draw Wireframe to have the outline each profile drawn in black. Check Shade to generate a shaded plot. The plot will be in colour if the source image uses a colour LUT. Check Draw Axis to have the three axis drawn and labeled. If Source Background is Lighter is checked, lighter areas in the source image represent lower elevations (valleys) while darker areas in the source image represent higher elevations (peaks). If Fill Plot Background with Black is checked, the plot is drawn with a black background.


Radio Spectrum...
Displays a Radio Spectrum as a two-dimensional graph. The file opened using the dialog box must be in the FITS format. The x-axis represents velocity at the opening but  it can be changed into channel, frequency or wavelength  using the SetScale button.


Fit a baseline (a polynomial of order  1 to  4) to the line-free parts  of spectrum using the Baseline button.


Use the following dialog to specify  two intervals and  the order of the baseline.  Check  display zero line in blue  to display  the x- axis in blue.


Subtract the baseline using Subtract Baseline  button.


Fit a Gaussian profile to a spectral line using the Gaussian fit  button.


Use this dialog  to specify the interval of fit.  The values of  amplitude, center and width may be specified for the start of the iteration.  Numerical results  are displayed in the Gaussian fit results window;  the  values can be copied and pasted in  a spreadsheet.


Optical Spectrum...
Opens a Optical spectrum as a 32-bit image,the spectrum must be text file. The  format must contain only two columns, the first line of each column must be the unit of each them. The image's width is determined by scanning the file and counting the number of  lines; height is  fixed at 100 pixels.


Using a  horizontal plot profile, the x-axis represents the values  of the first  column and the y-axis  the values of the second column.



This submenu provides access to various image analysis plugins.

Save XY Coordinates...
Writes to a text file the XY coordinates and pixel value of all non-background pixels in the active image. For grayscale images, writes three values per line (x, y, and value), separated by spaces. For RGB images, writes five values per line (x, y, red, green and blue).

Curve Fitting...
Construct and display in a new window the interpolate curve of points with a text file who contains these XY coordinates.
Examples :



ROI Manager
The ROI (Region of Interest) Manager is a tool for working with multiple area selections.



Click Add to add the current ROI to the list. Click Delete to delete the selected ROIs from the list. Click Open to open an ROI file and add it to the list. Click Open All to open all the ROI files in a folder and add them to the list. Click Save to save the selected ROIs as files. Click Measure to measure the selected ROIs. With a stack, a dialog box allows the user to choose between measuring all of the images in the stack or only the current slice. Click Draw to draw outlines of the selected ROIs using the current foreground colour and line width. Click Fill to fill the selected ROIs with the current foreground colour. Click in the Image/colours window to set the foreground colour. Use Edit/Options/Line Width to set the line width.

Scale Bar...
Display a scale bar on the image. This bar show the width in pixels.


Calibration Bar
Creates an RGB copy of the current image and displays a labeled calibration bar on it.


Change Location to move the calibration bar. If there is a selection, the bar is initially drawn at the selection. Change Fill colour to adjust the bar's background colour. Change Label colour to adjust the text colour. Change Number of Labels to adjust the total number of values displayed. Change Decimal Places to adjust the number of decimal places present in the labels. Change Font Size to adjust the labels' font size. Change Zoom Factor to scale the entire calibration bar. If Bold Text is checked, labels are drawn bold.

Use this dialog box to calibrate an image to a set of density standards, for example radioactive isotope standards or a calibrated optical density step tablet. Before using this command, use analyse/Clear Results to reset the measurement counter and use one of the selection tools and analyse/Measure to record the mean gray value of each of the standards. There is an example that shows how to calibrate to an optical density step tablet.

When finished making the measurements, select analyse/Calibrate to display the Calibrate dialog box. To calibrate the image, enter the known standard values in the right column, select a curve fitting method from the popup menu, enter the unit of measurement, and click OK. SalsaJ will then display the calibration function.

If the calibration function is not satisfactory, bring up the Calibrate dialog box again and select a different curve fitting method.

Rodbard is a four parameter general curve fit function proposed by David Rodbard at NIH. The form of the equation is:

y = d + (a - d) / (1 + (x/c)^b)
Selecting Uncalibrated OD from the popup menu causes SalsaJ to convert gray values to uncalibrated optical density values using the function
Uncalibrated OD = log10(255 / PixelValue)
You do not need to measure OD standards or enter known OD values to enable this feature.