Analyze Menu

Measure
Based on the selection type, calculates and displays either area statistics or line lengths. Area statistics are calculated if there is no selection or if a subregion of the image has been selected using one of the first four tools in the tool bar. Calculates line length if a line selection has been created using one of the three line selection tools. Use the Analyze/Set Measurements to specify what area statistics are recorded.

[Measurements]

To export the measurements as a tab-delimited text file, select File/Save As/Measurements from the ImageJ 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.

Analyze Particles...
This command counts and measures objects in binary or thresholded images. It works by scanning the image or selection until it finds the edge of an object. It then outlines the object using the wand tool, measures it using the Measure command, fills it to make it invisible, then resumes scanning until it reaches the end of the image or selection. Press the esc key to abort this process. Use Image/Adjust/Threshold to threshold an image.

[Example]

Particles smaller than Minimum Size or larger than Maximum Size are ignored. Bins is the number of bins used for the particle size distribution histogram. Select Outlines from the "Show:" popup menu and ImageJ will open a window containing numbered outlines of the measured particles. Select Filled from the popup menu and ImageJ will display filled outlines of the measured particles. Select Ellipses and ImageJ will display the best fit ellipse of each measured particles.

[Dialog]

Check Display results to have the measurements for each particle displayed in the "Results" window. Check Exclude Edge Particles to ignore particles touching the edge of the image. Check Size Distribution to display a particle size distribution histogram. (The ParticleCircularityHistogram macro displays a particle circularity histogram.) Check Clear Results Table to erase any previous measurement results. The Record Starts option allows plugins and macros to recreate particle outlines using the doWand(x,y) function. Check Summarize to display, in a separate window, the particle count, total particle area, average particle size, and area fraction.

Summarize
For each column in the results table, calculates and displays the mean, standard deviation, minimum and maximum of the values in that column.

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

Set Measurements...
Use this dialog box to specify which measurements are recorded by Analyze/Measure and Analyze/Analyze Particles.

[Measurements]

Area - Area of selection in square pixels. Area is in calibrated units, such as square millimeters, if Analyze/Set Scale was used to spatially calibrate the image.

Mean Gray Value - Average gray value within the selection. This is the sum of the gray values of all the pixels in the selection divided by the number of pixels. Reported in calibrated units (e.g., optical density) if Analyze/Calibrate was used to calibrate the image. For RGB images, the mean is calulated by converting each pixel to grayscale using the formula gray=0.299red+0.587green+0.114blue or the formula gray=(red+green+blue)/3 if "Unweighted RGB to Grayscale Conversion" is checked in Edit/Options/Conversions (ImageJ 1.32g or later).

Standard Deviation- Standard deviation of the gray values used to generate the mean gray value.

Modal Gray Value - Most frequently occurring gray value within the selection. Corresponds to the highest peak in the histogram.

Min & Max Gray Level - Minimum and maximum gray values within the selection.

Centroid - The center point of the selection. This is the average of the x and y coordinates of all of the pixels in the selection.

Center of Mass - This is the brightness-weighted average of the x and y coordinates all pixels in the selection.

Perimeter - The length of the outside boundary of the selection.

Bounding Rectangle - The smallest rectangle enclosing the selection. Uses the headings BX, BY, Width and Height, where BX and BY are the coordinates of the upper left corner of the rectangle.

Fit Ellipse - Fit an ellipse to the selection. Uses the headings Major, Minor and Angle. Major and Minor are the primary and seconday axis of the best fitting ellipse. Angle is the angle between the primary axis and a line parallel to the x-axis of the image. Note that ImageJ cannot calculate the major and minor axis lengths if Pixel Aspect Ratio in the Set Scale dialog is not 1.0.

Circularity - 4pi(area/perimeter^2). A value of 1.0 indicates a perfect circle. As the value approaches 0.0, it indicates an increasingly elongated polygon. Values may not be valid for very small particles. (ImageJ 1.29 or later)

Feret's Diameter - The longest distance between any two points along the selection boundary. Also known as the caliper length. The Feret's Diameter macro will draw the Feret's Diameter of the current selection on the image. (ImageJ 1.29 or later)

Limit to Threshold - If checked, only thresholded pixels are included in measurement calculations. Use Image/Adjust/Threshold to set the threshold limits.

Display Label - If checked, the image name and slice number (for stacks) are recoded in the first column of the results table.

Invert Y Coordinates - If checked, the XY origin is assumed to be the lower left corner of the image window instead of the upper left corner.

Redirect To - The image selected from this popup menu will be used as the target for statistical calculations done by the Measure and Analyze Particles commands. The Redirect To feature allows you to outline a structure on one image and measure the intensity of the corresponding region in another image.

Decimal Places - This is the number of digits to the right of the decimal point in real numbers displayed in the results table and in histogram windows.

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. ImageJ will have automatically filled in the Distance in Pixels field based on the length of the line selection.

[Dialog]

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

Setting Pixel Aspect 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.

Calibrate...
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 Analyze/Clear Results to reset the measurement counter and use one of the selection tools and Analyze/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.

[Dialog]

When finished making the measurements, select Analyze/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. ImageJ will then display the calibration function.

[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 ImageJ 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.

Histogram
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.

[Histogram]

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 if "Unweighted RGB to Grayscale Conversion" is checked in Edit/Options/Conversions (ImageJ 1.32g or later). With 16-bit images, the range of gray values between Min and Max is divided into 256 bins. With 32-bit images, the number of bins is specified in a dialog box.

Use the Save or Copy buttons to save the histogram data, formatted as 256 lines each containing a single number. Value:, which changes as you move the cursor, is the grayscale value corresponding to the x-axis cursor position and Count: is the number of pixels that have that value.

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.

[Plot]

For rectangular selections, displays a "column average plot", where the x-axis represents the horizontal distance through the selection and the y-axis the vertically averaged pixel intensity. To average horizontally, hold down the alt key. Use the Save or Copy buttons to save the profile data, formatted as a sequence of lines each containing a single number.

Surface Plot
Displays a three-dimensional graph of the intensities of pixels in a grayscale or pseudo color 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.

[Example]

Change the Polygon Multiplier 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 color if the source image uses a color 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.

Show LUT
Displays a plot of the active image's lookup table. The lookup table, or color table, describes the color that is displayed for each of the 256 possible pixel values. A bar under the plot displays the color representation of the pixel values. Note that RGB color images do not use a lookup table.

[LUT]

Gels>
Use the commands in this submenu to analyze one-dimensional electrophoretic gels using ImageJ's built in Gel Analyzer plugin. This plugin is similar to the
Gel Plotting Macros distributed with NIH Image. Both use a simple graphical method that involves generating lane profile plots, drawing lines to enclose peaks of interest, and then measuring peak areas using the wand tool.

[Gel]

Here is what you need to do to analyse a 1-D gel:

  1. Use the rectangular selection tool to outline the first lane. This should be the left most lane if the lanes are vertical or the top lane if the lanes are horizontal. Note that in ImageJ 1.33m or later the lanes must be vertical.
  2. Select Analyze/Gels/Select First Lane (or press "1"). ImageJ will outline and label the lane.
  3. Move the rectangular selection right to the next lane (or down if the lanes are horizontal) and select Analyze/Gels/Select Next Lane (or press "2"). ImageJ will outline and label the lane.
  4. Repeat the previous step for each remaining lane.
  5. Select Analyze/Gels/Plot Lanes (or press "3") to generate the lane profile plots.
  6. Use the straight line selection tool to draw base lines and/or drop lines so that each peak of interest defines a closed area. To get to all the lanes, it may be necessary to scroll the image vertically using the "Hand" tool. (Hold down the space bar to temporarily switch to this tool).
  7. For each peak, measure the size by clicking inside with the wand tool. If necessary, scroll the image by holding down the shift key and dragging.
  8. Select Analyze/Gels/Label Peaks to label each measured peak with its size as a percent of the total size of the measured peaks.

Tools>
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).

Box Count...
Counts the number of boxes of an increasing size needed to cover a one pixel binary object boundary. The box size and the number of boxes necessary to cover the boundary are plotted on a log-log plot and the fractal dimension determined from the slope, i.e. D=-slope. For more information, see the "Fractal_Box_Counter.java" source file.

Analyze Line Graph
ImageJ can be used to recover numeric coordinate data from scanned line graphs using the following procedure. Steps 1-6 are not necessary for binary (black and white) graphs. For practice, use the File/Open Samples/Line Graph sample image.

  1. Open the image containing the graph.
  2. Open the thresolding tool (shift-t).
  3. Adjust the threshold so the graph is highlighted in red.
  4. Click on "Apply" (make sure foreground is black and background is white).
  5. Close the thresholding tool.
  6. Use the oval selection tool as an erasor (press backspace to erase) to isolate a single curve (note: background color must be white).
  7. Select the curve by clicking to the left of it with the wand tool.
  8. Use Edit/Clear Outside to erase everything but the curve.
  9. Use Analyze/Tools/Analyze Line Graph get the XY coordinates.

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

[ROI Manager]

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 color and line width. Click Fill to fill the selected ROIs with the current foreground color. Click in the Image/Colors window to set the foreground color. Use Edit/Options/Line Width to set the line width.

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

[dialog and bar]

Change Location to move the calibration bar. If there is a selection, the bar is initially drawn at the selection. Change Fill Color to adjust the bar's background color. Change Label Color to adjust the text color. 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.
| "pPlugins Menu | Contents | Home |