Use this submenu to determine the type of the active image or to convert it to another type. An attempt to perform an unsupported conversion causes a dialog box to be displayed that lists the possible conversions.
I: Single images only; S: Stacks
8-bit Converts to 8-bit grayscale. ImageJ converts 16-bit and 32-bit images to 8-bit by linearly scaling from min--max to 0--255, where min and max are the two values displayed in the . displays these two values as Display range. Note that this scaling is not done if Scale When Converting is not checked in RGB images are converted to grayscale using the formula gray = (red + green + blue) ⁄ 3 or gray = 0.299 × red + 0.587 × green + 0.114 × blue if Weighted RGB Conversions is checked in
16-bit Converts to unsigned 16-bit grayscale.
32-bit Converts to signed 32-bit floating-point grayscale.
8-bit Color Converts to 8-bit indexed color using Heckbert’s median-cut
color quantization algorithm. A dialog box allows the number of colors (2--256) to be specified. The active image must be RGB color.
RGB Color Converts to 32-bit RGB color.
RGB Stack Converts to a 3--slice (red, green, blue) stack. The active image must be RGB color.
HSB Stack Converts to a 3--slice (hue, saturation and brightness) stack. The active image must be RGB color.
This submenu contains commands that adjust brightness/contrast, threshold levels and image size.
15 Applying Auto Brightness/Contrast to Entire Stacks
The command can be used to adjust the brightness and contrast of each slice in a stack, according to either the optimal for each individual slice (if
Use Stack Histogram is unchecked) or the overall stack (by ticking
Use Stack Histogram). The default behavior of the B&C tool () is to use the overall stack histogram.
Use this tool to interactively alter the brightness and contrast of the active image. With 8-bit images, brightness and contrast are changed by updating the image’s lookup table (LUT), so pixel values are unchanged. With 16-bit and 32-bit images, the display is updated by changing the mapping from pixel values to 8-bit display values, so pixel pixel values are also unchanged. Brightness and contrast of RGB images are changed by modifying the pixel values.
Histogram The line graph at the top of the window, which is superimposed on the image’s histogram, shows how pixel values are mapped to 8-bit (0--255) display values. The two numbers under the plot are the minimum and maximum displayed pixel values. These two values define the display range, or ‘window’. ImageJ displays images by linearly mapping pixel values in the display range to display values in the range 0--255. Pixels with a value less than the minimum are displayed as black and those with a value greater than the maximum are displayed as white.
Minimum and Maximum sliders Control the lower and upper limits of the display range. Holding down Shift will simultaneously adjust all channels of a composite image (e.g., ).
Brightness slider Increases or decreases image brightness by moving the display range. Holding down Shift will simultaneously adjust all channels of a composite image.
Contrast slider Increases or decreases contrast by varying the width of the display range. The narrower the display range, the higher the contrast. Holding down Shift will simultaneously adjust all channels of a composite image.
Auto ImageJ will automatically optimize brightness and contrast based on an analysis of the image’s histogram. Create a selection, and the entire image will be optimized based on an analysis of the selection. The optimization is done by allowing a small percentage of pixels in the image to become saturated (displayed as black or white). Each additional click on Auto increases the number of saturated pixels and thus the amount of optimization.
A run("Enhance Contrast", "saturated=0.35") macro call is generated if the command recorder () is running.
Reset Restores the original brightness and contrast settings. The display range is set to the full pixel value range of the image. A resetMinAndMax() macro call is generated if the command recorder is running. Holding down Shift restores original settings in all channels of a composite image.
Set Allows to enter the minimum and maximum display range values in a dialog box. A setMinAndMax() macro call is generated if the command recorder command recorder is running.
-
A 16-bit image consists of 65536 possible gray levels. Most of times, however, the relevant image information is contained only within a narrow range of the grayscale. This is the case, e.g., in low light microscopy, in which signal is restricted to the lower end of the grayscale. The Set Display Range dialog allows you to choose how to scale the range of gray levels of 16-bit images.
Automatic Automatically selects the best range given the intensity values of the image based on the percentage of the total number of pixel values from the lowest to highest pixel value.
8-bit (0-255) Gray level range of 0-255.
10-bit (0-1023) Gray level range of 0-1023.
12-bit (0-4095) Gray level range of 0-4095.
15-bit (0-32767) Gray level range of 0-32767.
16-bit (0-65535) Gray level range of 0-65535.
Check Propagate to all open images to apply these values to the rest of the images currently open. With multi-channel images, the option to propagate the specified range to the remaining channels is also available.
Apply Applies the current display range mapping function to the pixel data. If there is a selection, only pixels within the selection are modified. This option currently only works with 8-bit images, 8-bit stacks and RGB stacks. This is the only B&C option that alters the pixel data of non-RGB images.
16 Display Range of DICOM Images
With DICOM images, ImageJ sets the initial display range based on the
Window Center (0028, 1050) and
Window Width (0028, 1051) tags. Click
Reset on the W&L () or B&C () window and the display range will be set to the minimum and maximum pixel values.
As an example, the image has a Window Center of 50 and Window Width of 500, so the display range is set to -200 to 300 (center-width/2 to center+width/2). Click
Reset and the display range is set to -719 to 1402. Press
H () and you will see that the minimum pixel value in the image is -719 and the maximum is 1402.
To display the DICOM tags, press
I (). Press
R () to revert to the initial display range.
This command and (
B&
C) are redundant, but (
W&L) behaves in a manner closer to that implemented on medical image terminals by interactively adjusting the
Window — range of minimum and maximum (
Contrast) — and
Level — position of that range in the grayscale intensity space (
Brightness).
If the
B&
C window is opened, it will be closed and the
W&
L window will be opened at the same location.
This panel makes adjustments to the brightness and contrast of a single color of a standard RGB image (8-bit per color channel). For multi-channels
Stacks↑ and
Hyperstacks↑ (
Color Composite Images↑) it adjusts each of the color channels independently. Use the drop-down menu to specify which color / channel will be adjusted (the histogram is drawn for the selected channel).
Maximum and
Minimum sliders,
Auto,
Set and
Apply work as described for
. Similarly to the tool, if the B&C window is opened, it will be closed and the Color window will be opened at the same location.
NB: When switching from one color to another, the changes made to one color will be lost unless
Apply is clicked before. Also, note that for 48-bit color images that load as a stack, works on single stack slices, i.e., colors, and the color settings of the
Color panel are ignored.
17 Brightness/Contrast of High Bit--Depth Images
When displayed, the intensity of each pixel that is written in the image file is converted into the
grayness of that pixel on the screen. How these intensities are interpreted is specified by the image type. From the
Basic concepts page:
16-bit and 32-bit grayscale images are not directly displayable on computer monitors, which typically can show only display 256 shades of gray. Therefore, the data are mapped to 8-bit by windowing. The window defines the range of gray values that are displayed: values below the window are made black, while values above the window are white. The window is defined by minimum and maximum values that can be modified using .
It may happen that the initial windowing performed by ImageJ on these high bit--depth (or HDR
[?]) images is suboptimal. Please note that windowing does not affect image data (cf. the
HDRexplorerTool).
Use this tool to automatically or interactively set lower and upper threshold values, segmenting grayscale images into features of interest and background. Use ) (with
Limit to Threshold in checked) to measure the aggregate of the selected features. Use to measure features individually. Use the
Wand Tool↑ to outline a single feature.
Upper slider Adjusts the minimum threshold value. Hold Shift while adjusting the minimum to move a fixed-width thresholding window across the range of gray values.
Lower slider Adjusts the maximum threshold value.
Method Allows any of the 16 different automatic thresholding methods to be selected
[18]. These methods are described on
Fiji↑’s
Auto Threshold website. The
Default method is the modified IsoData algorithm used by
ImageJ 1.41 and earlier. Note that these are global thresholding methods that typically cannot deal with unevenly illuminated images (such as in
brightfield microscopy). In these cases, local algorithms are more appropriated, by allowing the threshold to smoothly vary across the image.. These are implemented by the
Auto Local Threshold plugin, pre-installed in
Fiji↑.
Display Selects one of three display modes:
Dark background To be checked when features are lighter than the background. The state of the checkbox is remembered across restarts.
Stack histogram If checked, ImageJ will first compute the histogram of the whole stack (or hyperstack) and then compute the threshold based on that histogram. As such, all slices are binarized using the single computed value. If unchecked, the threshold of each slice is computed separately.
Auto Uses the currently selected thresholding method to automatically set the threshold levels based on an analysis of the histogram of the current image or selection.
Apply Sets thresholded pixels to black and all other pixels to white. For 32-bit float images Apply will also run .
Reset Disables thresholding and updates the histogram.
Set New threshold levels can be entered into this dialog box.
Thresholds 24-bit RGB images based on Hue Saturation and Brightness (HSB), Red Green and Blue (RGB), CIE Lab or YUV components. Ranges of the filters can be set manually or based on the pixel value components of a user-defined ROI. This command, implemented in version 1.43l, is an experimental built-in version of the
Threshold Colour plugin [20] and is not yet fully integrated into ImageJ.
Pass If checked, values within range are thresholded and displayed (band-pass filter), otherwise, values outside the selected range are thresholded (band-reject filter).
Thresholding Method Allows any of the 16 different automatic thresholding methods to be selected (see ).
Threshold Color Selects the threshold color: either Red, Black, White or Black & White (see ).
Dark background To be checked when features are lighter than the background (
see 23: Interpreting Binary Images↓). The state of the checkbox is remembered across restarts.
Original Restores the original image and updates the buffer when switching to another image.
Filtered Shows the filtered image. Note that the final thresholded image type is RGB, not 8-bit gray (see ).
Select Creates a ROI selection based on the current settings. The selection is made according to the settings defined in the dialog.
Sample (Experimental) Sets the ranges of the filters based on the pixel value components in a user-defined ROI.
Stack Processes the remaining slices of the stack (if any) using the current settings.
Macro Creates a macro based on the current settings which is sent to the Macro Recorder window (), if open.
Help Opens the built-in help dialog.
Scales the active image or selection to a specified
Width and
Height in pixels.
Check
Constrain aspect ratio and ImageJ will adjust either the
Height or the
Width to maintain the original aspect ratio. When applicable, other dimensions can also be resized:
Depth (images) in stacks,
Depth (slices) and
Time (frames) in hyperstacks.
Check the
Average when downsizing checkbox for better results when scaling down images
[19]. Two resampling methods are possible:
Bilinear and
Bicubic interpolation. The implementation of the bicubic method (Catmull-Rom interpolation) is derived from Burger and Burge, 2008
[104].
, ,
Changes the canvas size without scaling the actual image.
Width and
Height may be either expanded or contracted. If the canvas size is increased, the border is filled with the current background color (
see ), or, if
Zero Fill is checked, the border is filled with pixels that have a value of zero. The position of the old image within the new canvas may also be specified.
This widget is used to adjust the width of line selections (in pixels). It is opened more easily by double clicking on the
Line Selection Tools↑ icon. Checking
Spline Fit fits a cubic spline curve to the points that define the line.
,
Opens a text window containing information about the active image (including the pixel or voxel size, since IJ 1.44k). For DICOM and FITS images, also displays file header information. Use the popup menu (right-click in the Info window) to save the information to a text file or copy it to the system clipboard.
Use this command to display and set various properties of the current image or stack.
The number of
Channels (c),
Slices (z) and
Frames (t) in the image can be changed as long as the product of
c,
z, and
t is equal to the number of images in the stack.
Unit of Length is a string describing the measuring unit of
Pixel Width,
Pixel Height and
Voxel Depth. These three dimensions are automatically converted if
Unit of Length is changed from one of ImageJ’s known unit (‘nm’, ‘
μm’ [or ‘um’ or ‘micron’], ‘mm’, ‘cm’, ‘meter’, ‘km’ or ‘inch’) to another.
μ and
Å symbols can be typed using
AltM and
AltShiftA, respectively.
With t-series stacks, the
Frame Interval in seconds (reciprocal of the frame rate) can be viewed and set. If the unit is ‘sec’, setting the
Frame Interval will also set the frame rate used by .
Origin is the reference point
0, 0 (always in pixels) of the image coordinate system (
see also Invert Y coordinates↓ in ).
As explained in
24: Global Calibrations↓, check
Global to make the current settings global, i.e., applied to all images opened during the current session.
,
This submenu contains commands that deal with color images.
Splits an RGB image (or stack) into three 8-bit grayscale images containing the red, green and blue components of the original. The window names have an appended (red), (green) and (blue). With composite images and / or hyperstacks (e.g., ) this command splits the stack into separate channels.
Merges 2--7 images into an RGB image or multi-channel composite image. Select the channel order/color using the
C1--C7 dropdown menus. Select
*None* to skip a channel.
Create composite If checked, a multi-channel composite image (
see Color Composite Images↑) will be created. If unchecked, an RGB image is created instead. When creating composite images, original LUTs and display ranges are preserved unless
Ignore source LUTs is checked. Source LUTs are always ignored when creating RGB images.
Keep source Images If checked, source images will not be disposed.
Ignore source LUTs If checked, LUTs of source images are ignored. In this case, merged channels will adopt the lookup table mentioned besides the channel choice, i.e., red, gree, blue, gray, cyan, magenta, yellow. As mentioned, this option is assumed when merging into RGB.
Alias for .
Converts a two or three slice stack into an RGB image, assuming that the slices are in R, G, B order. The stack must be 8-bit or 16-bit grayscale. Also converts composite images (e.g., ) into RGB.
Converts in place an RGB image, a 2--7 image stack or a 2--7 channel hyperstack into a composite color image. Use the tool ( Shift Z ) to enable and disable the channels of a composite image. Use ( Shift C ) to adjust the brightness and contrast of the current channel.
Displays a plot of the active image’s lookup table (LUT) . The lookup table, or color table, describes the color that is displayed for each of the 256 possible pixel values. For 16 and 32-bit images, the range of displayed pixel values is mapped to 0--255. A bar under the plot displays the color representation of the pixel values. Note that RGB color images do not use a lookup table. Use the
List…radio button to export the LUT as a CSV
[?] file.
Opens the ImageJ LUT (Lookup Table) Editor. A lookup table in ImageJ has up to 256 entries. The entry index, and the three values (red, green and blue) associated with it, are displayed in the ImageJ status bar as you move the cursor over the LUT Editor window. Click on an entry to edit the red, green and blue values for that entry using a Color Selector window (cf.
Color Picker… [K]↓).
The Color Picker
[17] enables the user to select foreground and background colors, which affects , , and other drawing commands. It displays current foreground and background colors in the selection boxes at the bottom of the window. It has two modes:
Foreground and
Background. To change modes, click on the desired selection box. Clicking on the
Foreground/
Background Switcher button sets the current foreground to the background and vice versa. The
Black/
White Reset button sets the foreground to black and the background to white.
The color palette is based on HSB (Hue, Saturation and Brightness) color model (
see Color Spaces and Color Separation↑). Hue increases as you go down the palette while saturation and brightness values are split horizontally. The left half of the palette varies only in brightness while the right half varies only in saturation. At the center of the color ramp are enlarged red, green, blue, cyan, magenta, and yellow colors for quick selection. To the left of the color palette is a grayscale ramp that goes from pure black to pure white.
Double clicking on a color brings up the ColorChooser, a widget with three sliders used to specify the RGB values of the foreground or background color. The title of the ColorChooser widget (
Foreground Color or
Background Color) indicates the current selection mode. To get precise colors, manually change the values in the text boxes. The hex value of the final color is also displayed, offering a convenient way to retrieve custom colors to, e,g, personalize
Overlays↑ (
see 20: Hexadecimal Color Values↓).
As mentioned earlier, the
Color Picker Tool↑ tool can be used to ‘pick-up’ foreground/background colors from an image canvas. Foreground color can also be changed using the
Color dropdown menu in the
Options dialog of drawing tools such as
Arrow↑,
Brush↑,
Overlay Brush↑ and
Pencil↑ tools.
18 Embedding Color Annotations in Grayscale Images
Color marks are only available with color images or grayscale images that have been converted to RGB ( submenu). For non-RGB images, background / foreground color will be drawn in equivalent gray levels, e.g.: For a 8-bit image, if the foreground color is red (RGB: 255, 0, 0) intensity of drawn selections will be
(255 + 0 + 0) ⁄ 3 = 85.
Colored
Overlays↑ (
see ,
Overlay Brush↑ tool), on the other hand, can be created on all image types becoming the easiest way to annotate grayscale images.
This submenu contains commands related to
Stacks↑. Operations specifically related to
Hyperstacks↑ are listed in the submenu.
Inserts a blank slice after the currently displayed slice. Holding
Alt inserts a blank slice before the current slice. With
Hyperstacks↑, a dialog prompt allows to insert either a channel, z-slice or t-frame.
Deletes the currently displayed slice. With
Hyperstacks↑, it can delete the current channel, z-slice or t-frame.
Displays the slice that follows the currently displayed slice. Holding Alt > will skip ten slices forward.
Displays the slice that precedes the currently displayed slice. Holding Alt < will skip ten slices backward.
Displays a specified slice. The user must enter a slice number greater than or equal to one and less than or equal to the number of slices in the stack.
Creates a new stack from images currently displayed in separate windows.
Method If images differ in size, a drop-down menu allows to choose a conversion method:
Copy (center) and Copy (top-left) Stack will have the width of the widest open image and the height of the highest open image. Smaller images will then be copied (either to the center or to the upper left corner) of the slice. Borders are filled with pixels that have a value of zero.
Scale (smallest) and Scale (largest) Stack will have the dimensions of the smallest / largest open image. Other images are scaled to the new slice dimensions. Bicubic interpolation is used if Bicubic interpolation is checked (cf. and ).
Name Specifies the title of the stack to be created.
Title Contains Enter a string into this field and ImageJ will only convert to stack images whose name contains that string.
Bicubic Interpolation If checked, bicubic interpolation (cf. ) will be used if any of the Scale methods was previously chosen.
Use Title as Labels If checked, image titles (without extension) will be used as stack labels. As described in , these labels (up to 60 characters) correspond to the image subtitle, the line of information above the image.
Keep Source Images If checked, original images are kept.
Converts the slices in the current stack to separate image windows.
Produces a single grid-image containing the individual images that compose
Stacks↑ and 4D
Hyperstacks↑. This can be useful for visual comparisons of a series of images stored in a stack and to create ‘panel figures’ for publication and presentations. A dialog box allows you to specify the magnification level at which the images are copied, and to select the layout of the resulting grid.
Label Slices If checked, montage panels are labelled with slice labels. Slice labels (up to 60 characters) correspond to the image subtitle, the line of information above the image. These labels are part of the stack metadata, typically created by or . If no slice metadata exists (the
setMetadata() macro function can be used to customize slice labels) images are labelled with slice numbers. Note that the command can be used to draw labels in stack slices. Labels are typeset in sans-serif typeface.
Use Foreground Color If checked, borders and labels are drawn in the foreground color and blank areas of the panel are filled with the background color.
, ,
RC Montage plugin,
Magic Montage — a macro toolset to reorder and manipulate images in the montage (a video tutorial can be found
here)
Reconstructs one or more orthogonal slices through the image volume represented by the current stack or hyperstack
[21].
The estimated size of the output stack and the amount of available memory are displayed at the bottom of the dialog. Increase
Output spacing to reduce the size of the output stack.
A dialog allows you to specify the spacing of the reconstructed slices.
Output spacing Determines the number of orthogonal slices that will be reconstructed. Increasing Output spacing reduces the size of the output stack.
Start at Determines the image edge (top, left, bottom or right) from which reconstruction starts. Start at is replaced by Slice count if there is a line selection. With lines selections, a stack is created by shifting (by Output spacing) the line down and to the left to generate additional slices for the output stack. In this case, the size of the output stack in determined by Slice count.
Flip vertically If checked, each slice in the output stack will be flipped vertically.
Rotate 90 degrees If checked, each slice in the output stack will be rotated 90○.
Avoid interpolation If checked, no interpolation will be done.
Provides an orthogonal view display of the current stack or hyperstack
[22]. E.g., if a stack displays sagittal sections, coronal (YZ projection image) and transverse (XZ projection image) will be displayed through the data-set.
The two extra planar views are displayed in ‘sticky’ panels next to original image and can be toggled using
Shift H , the command shortcut.
The intersection point of the three views follows the location of the mouse click and can be controlled by clicking and dragging in either the XY, XZ or YZ view. XY and XZ coordinates are displayed in the title of the projection panels. The mouse wheel changes the screen plane in all three views.
Voxel dimensions can be adjusted in .
Projects an image stack along the axis perpendicular to image plane (the so-called
z axis)
[21]. With hyperstacks, the projection is performed on the active time frame, or for all time points if
All Time Frames is checked. Five different projection types are supported. The preferred projection method is stored in the preferences file.
Average Intensity projection outputs an image wherein each pixel stores average intensity over all images in stack at corresponding pixel location.
Maximum Intensity projection (MIP
[?]) creates an output image each of whose pixels contains the maximum value over all images in the stack at the particular pixel location.
Sum Slices projection creates a real image that is the sum of the slices in the stack.
Standard Deviation projection creates a real image containing the standard deviation of the slices.
Median projection outputs an image wherein each pixel stores median intensity over all images in stack at corresponding pixel location.
, ,
This command creates a sequence of projections of a rotating volume (stack or hyperstack) onto a plane using
nearest-point (surface),
brightest-point, or
mean-value projection or a weighted combination of nearest point projection with either of the other two methods (partial opacity)
[40]. The user may choose to rotate the volume about any of the three orthogonal axes (x, y, or z), make portions of the volume transparent (using thresholding), or add a greater degree of visual realism by employing depth cues.
Each frame in the animation sequence is the result of projecting from a different viewing angle. To visualize this, imagine a field of parallel rays passing through a volume containing one or more solid objects and striking a screen oriented normal to the directions of the rays.
Each ray projects a value onto the screen, or projection plane, based on the values of points along its path. Three methods are available for calculating the projections onto this plane: nearest-point, brightest-point, and mean-value. The choice of projection method and the settings of various visualization parameters determine how both surface and interior structures will appear.
Projection Method Select
Nearest Point projection to produce an image of the surfaces visible from the current viewing angle. At each point in the projection plane, a ray passes normal to the plane through the volume. The value of the nearest non transparent point which the ray encounters is stored in the projection image.
Brightest Point projection examines points along the rays, projecting the brightest point encountered along each ray. This will display the brightest objects, such as bone in a CT
[?] (computed tomographic) study.
Mean Value projection, a modification of brightest--point projection, sums the values of all transparent points along each ray and projects their mean value. It produces images with softer edges and lower contrast, but can be useful when attempting to visualize objects contained within a structure of greater brightness (e.g.a skull).
Slice Spacing The interval, in pixels, between the slices that make up the volume. ImageJ projects the volume onto the viewing plane at each Rotation Angle Increment, beginning with the volume rotated by Initial Angle and ending once the volume has been rotated by Total Rotation.
Lower/Upper Transparency Bound Determine the transparency of structures in the volume. Projection calculations disregard points having values less than the lower threshold or greater than the upper threshold. Setting these thresholds permits making background points (those not belonging to any structure) invisible. By setting appropriate thresholds, you can strip away layers having reasonably uniform and unique intensity values and highlight (or make invisible) inner structures. Note that you can also use to set the transparency bounds.
Opacity Can be used to reveal hidden spatial relationships, especially on overlapping objects of different colors and dimensions. The (surface) Opacity parameter permits the display of weighted combinations of nearest-point projection with either of the other two methods, often giving the observer the ability to view inner structures through translucent outer surfaces. To enable this feature, set Opacity to a value greater than zero and select either Mean Value or Brightest Point projection.
Surface/Interior Depth-Cueing Depth cues can contribute to the three-dimensional quality of projection images by giving perspective to projected structures. The depth-cueing parameters determine whether projected points originating near the viewer appear brighter, while points further away are dimmed linearly with distance. The trade-off for this increased realism is that data points shown in a depth-cued image no longer possess accurate densitometric values. Two kinds of depth-cueing are available: Surface Depth-Cueing and Interior Depth-Cueing. Surface Depth-Cueing works only on nearest-point projections and the nearest-point component of other projections with opacity turned on. Interior Depth-Cueing works only on brightest-point projections. For both kinds, depth-cueing is turned off when set to zero (i.e.100% of intensity in back to 100% of intensity in front) and is on when set at 0 < n 100 (i.e.(100 − n)% of intensity in back to 100% intensity in front). Having independent depth-cueing for surface (nearest-point) and interior (brightest-point) allows for more visualization possibilities.
Interpolate Check
Interpolate to generate a temporary z-scaled stack that is used to generate the projections. Z-scaling eliminates the gaps seen in projections of volumes with slice spacing greater than 1.0 pixels. This option is equivalent to using the
Scale plugin from the
TransformJ package to scale the stack in the z-dimension by the slice spacing (in pixels). This checkbox is ignored if the slice spacing is less than or equal to 1.0 pixels.
Plots the ROI selection mean gray value versus slice number. Requires a point or area selection.
Coordinates of the upper left corner of the selection (or the bounding rectangle for non-rectangular selections) are displayed in the graph title.
,
Adds a sequence of numbers (e.g., timestamps) and/or a label to a stack or hyperstack. Numbers and label are drawn in the current foreground color (cf. ).
The initial
X,Y location, and
Font size of the label are based on the existing rectangular selection, if any. Slices outside the
Range are not affected.
Format Specifies the structure of the label. 0: Unpadded sequence; 0000: Pads each number with leading zero(s); 00 : 00: Converts the label into a minutes : seconds timestamp; 00 : 00 : 00 Converts the label into a hours : minutes : seconds timestamp; Text: Stamps only the contents of the Text field. Label: Displays slice labels.
Starting value and Interval Specify the first value and the numeric steps to be applied. Note that with timestamps, metric time values must be used, e.g., an Interval of 3600 will create 1 hour increments.
Text The string to be drawn after each number when the Format chosen is either 0 or Text (label without numeric sequence).
Use overlay If checked, labels will be created as non-destructive image
Overlays↑. Note that previously added overlays will be removed. Also, note that
Virtual Stacks↑ and
Hyperstacks↑ can only have overlay labels.
Use text tool font If checked, labels will be created using the typeface and style specified in the
Fonts…↑ widget. If unchecked, labels are typeset using ImageJ's default font: sans-serif typeface.
Combines two stacks [
Width × Height × Depth] (W
1 × H
1 × D
1 and W
2 × H
2 × D
2) to create a new W
1 + W
2 × max(H
1,H
2)
× max(D
1,D
2) stack. E.g., a 256
× 256
× 40 and a 256
× 256
× 30 stack would be combined to create one 512
× 256
× 40 stack.
If
Combine vertically is enabled, creates a new max(W
1 + W
2)
× (H
1 + H
2)
× max(D
1,D
2) stack.
Unused areas in the combined stack are filled with background color (cf. ).
Concatenates multiple images or stacks. Images with mismatching type (
see Image Types and Formats↑) and dimensions are omitted
[24]. Stacks with the same number of slices can be concatenated as a 4D
Hyperstacks↑, if
Open as 4D image is checked. In this case, chosen stacks will be appended as time-points.
Reduces the size of stacks and hyperstacks by the specified
Reduction Factor. E.g., For a 30 slices stack and a
Reduction Factor of 2, the reduced stack will be be composed of 15 slices with every second slice being removed. Virtual stacks/hyperstacks are supported
With Hyperstacks, the default reduction is performed in the T-Dimension, but a choice is available to
Reduce in Z-Dimension instead.
Alias for the command.
Inserts a
Source image into a
Destination image at the specified
X and
Y Location (pixel coordinates).
Source and
Destination can be single images or stacks but must be of the same type (
see Image Types and Formats↑). The
Destination image will be permanently modified once
Source has been inserted. Note that when
Source is a single image, can be used (together with ) to create image selections (ImageROIs), a more convenient way of blending two open images.
,
Converts a montage image to an image stack based on the specified number of rows and columns, taking into account a
Border width. This is the opposite of what the command does.
Extracts selected images from the active stack copying them to a new stack in the order of listing or ranging
[25].
Extracted slices will be removed from the source stack if
Deleted slices from original stack is checked. Currently, it does not work with hyperstacks and takes one of three types of input:
- A range of images. E.g.: 2-14 [extract slices 2 through 14]
- A range of images with increment, which can be used to de-interleave slices. E.g.: 2-14-2 [extract slices 2 and 14 and every second slice in between]
- A list of images. E.g.: 2, 4, 7 ,9, 14
Creates a substack of Stack size ⁄ Group size slices with each slice being the result of a Z Projection performed over the range of Group size.
Group size must divide evenly into the stack size. This limitation can be overcome by the , that can also create grouped Z-projections.
The first ten divisors of
Stack size are suggested at the bottom of the dialog.
, ,
Removes slice labels from stacks. The first line of a slice label (up to 60 characters) is displayed in parentheses in the image subtitle, the line of information above the image. The macro functions
setMetadata() and
getMetadata() can be use to set and retrieve the current slice label.
Animates the active stack by repeatedly displaying its slices (frames) in sequence. It is run more easily by clicking on the play icon preceding stack sliders (
see Stacks↑). To stop the animation, click on the slider pause icon, click on the image or use , evoked by the same shortcut. As such, stacks animation can be toggled using
\. The frame rate is displayed in the status bar. Open the dialog box to specify the animation speed (pressing
Alt \ or right-clicking on the on the slider play/pause icon opens the dialog). Note that more than one stack can be animated at a time.
Terminates animation of the active stack (see ).
Use this dialog to set the animation speed in frames per second
[?], the starting and ending frame, or to enable ‘oscillating’ animations. Selecting
Start Animation animates the stack as soon as the dialog is dismissed.
Note that setting the
Frame Interval in sets the animation speed as long as the unit used is ‘sec’.
,
This submenu hosts commands specifically related
Hyperstacks↑, images that have four (4D) or five (5D) dimensions. General operations related to
Stacks↑ are listed in the submenu.
Creates a new hyperstack.
Hyperstacks↑ have
Width,
Height,
Channels (c dimension),
Slices (z dimension) and time
Frames (t dimension).
Image Type (
see and
Image Types and Formats↑) and
Display Mode (
see ) can be specified.
Checking
Label Images will draw the channel number, slice number and frame number on each image in the hyperstack.
(an alias of this command) and
Converts a stack into a hyperstack. RGB stacks are converted into 3 channel hyperstacks.
Order is the order of the channels (
c), slices (
z) and frames (
t) within the stack. ImageJ hyperstacks are always in
czt order. Stacks not in
czt order will be shuffled to be in czt order. The channel
Display Mode can be
Composite,
Color or
Grayscale (cf. ).
Converts a hyperstack into a stack (in czt order).
This command
[26] reduces the dimensionality of an hyperstack by creating a new hyperstack with, for example, all the channels and time points at a given z position or all the z slices for the current channel and time point.
Uncheck
Channels (n) to delete all but the current channel,
Slices (n) to delete all but the current z slice and
Frames (n) to delete all but the current time point. Check
Keep Source and the original stack will not be deleted.
The expected dimensions and size of the reduced stack are displayed in the dialog.
Opens the
widget↓, or brings it to the front if it is already open.
Shift Z is the keyboard shortcut for this command. This tool allows to select the
Display mode of composite images. In addition, several commands hosted in the submenu can easily be accessed through the
More≫ drop-down menu. The same drop-down menu also provides a convenient list of primary colors (additive: red, green and blue, subtractive: cyan, magenta, yellow) that can be used to pseudocolor Color Composite Images↑.
Crops the image or stack based on the current rectangular selection.
Creates a new window containing a copy of the active image or rectangular selection. For stacks and hyperstacks it is possible to specify the range of
Channels (c),
Slices (z) and
Frames (t) to be duplicated.
With single images, hold
Alt to skip the dialog box.
Renames the active image.
Resizes the image or current area selection by scale factors entered into a dialog box. As with , two resampling methods are possible:
Bilinear and
Bicubic interpolation.
For the best looking results, particularly with graphics and text, use integer scale factors (2, 3, 5, etc.) and check
Average when downsizing with scale factors less than 1.0
[19]. Also, when downsizing, smoothing the source image prior to scaling may produce better looking results.
Scaled image/selection are copied to a new image named
Title if
Create new window is checked. If scaling a selection that will not be copied to a new image check
Fill with Background Color to fill with the background color instead of zero.
Entire stacks (or hyperstacks in the Z Dimension) will be scaled if
Process entire stack is checked.
, ,
This submenu contains commands that perform geometrical image transformation on the active image or stack.
Replaces the image or selection with a x-mirror image of the original.
Turns the image or selection upside down (y-mirror).
Reverses the order of the slices in a stack (z-mirror).
Rotates the entire image or stack clockwise 90○.
Rotates the entire image or stack counter-clockwise 90○.
Use this dialog to rotate the active image or selection clockwise the specified number of
degrees.
Set
Grid Lines to a value greater than zero to superimpose a grid on the image in
Preview mode. Two resampling methods are possible:
Bilinear and
Bicubic interpolation (cf. ).
With 8-bit and RGB images, check Fill with Background Color to fill with the background color instead of zero (cf. ). Check Enlarge to Fit Result and the image will be enlarged as needed to avoid clipping.
Translates (moves) the image in the x and y directions by a specified number of pixels. With stacks, you can translate either the current image or all the images in the stack. Two resampling methods are possible:
Bilinear and
Bicubic interpolation (cf. ).
Check
Preview to see how the translation will affect the image. The background at the edges of the image will be set to 0.
Reduces the size of an image by binning groups of pixels of user-specified size (
X,Y,Z shrink factor)
[27]. The resulting pixel can be calculated as
Average,
Median,
Maximum, or
Minimum. Undo support is restricted to 2D images (non stacks).
Z binning produces equivalent results to However, there are two main differences between the two commands: While replaces the original image, creates a new substack; and while
Z shrink factor takes any value,
Group size must divide evenly into the stack size.
, ,
Prints the active area selection to the
Results Table↑, clearing previous results. The entire image is processed when no area ROI exists. XY coordinates are detailed in column and row headers. Calibrated and floating-point images are listed with the precision specified by
Decimal places in
For RGB images, each pixel is converted to grayscale using the formula
gray = (red + green + blue) ⁄ 3 or the formula
gray = 0.299 × red + 0.587 × green + 0.114 × blue if
Weighted RGB to Grayscale Conversion is checked in
The reverse of
↑, converting the tabular data in the
Results Table↑ into a 32-bit image named
Results Table. Column and row headers are ignored.
This submenu contains commands that control how the current image is displayed. The
+ and
− or
↑ and
↓ keys are the preferred way to use the
↓ and
↓ commands. When a selection exists, zooming with the
Arrow Keys↓ requires holding down either
Shift or
Ctrl.
Zooms in to next higher magnification level and, if possible, enlarges the window. As explained in
Magnifying Glass↑, there are 21 possible levels (shown in the title bar): 3.1, 4.2, 6.3, 8.3, 12.5, 16.7, 25, 33.3, 50, 75, 100, 150, 200, 300, 400, 600, 800, 1200, 1600, 2400 and 3200%.
19 Working with Zoomed Canvases
Images are magnified using
+ and
− , or
↑ and
↓ if no selection exists. Magnification occurs around the cursor, or to the center of the image when the cursor lays outside the image canvas. The
Zoom indicator in the upper left corner of magnified images shows what portion of the image is currently displayed. At high magnification levels the pixel grid becomes visible by default unless
Interpolate zoomed images is checked in To scroll a magnified image, hold down the space bar (
Scrolling Tool↑ shortcut) while dragging the cursor.
By default,
Overlays↑ and the active selection are displayed with a 1--pixel wide contour regardless of the image magnification (
0 Width). To thicken ROI edges at higher zoom levels, set
Stroke width to a non-zero value in , or
ROI Manager↓’s
Properties↓
Zooms out to next lower magnification level and, if needed, shrinks the window.
Displays the image at the magnification used when the image was first opened. As a shortcut, double click on the
Magnifying Glass↑ tool.
Displays the image using 100% magnification (1 image pixel = 1 screen pixel). Enable Open Images at 100% in the dialog to have images automatically opened at 100% magnification.
Zooms in based on the current selection. Note that in the absence of a selection, this command zooms the image to a
fit to screen level (
see Magnifying Glass↑).
Zooms the active image to an exact value (e.g.37.4%) overcoming the predefined zoom steps described in . The zoomed canvas will be centered at
X,Y center (pixel coordinates)
[28].
As mentioned previously, this submenu contains commands for creating and working with non-destructive image
Overlays↑. An overlay consists of one or more selections: arrows, lines, points, shapes and text (
see ImageJ
Toolbar↑). Overlays can also be composed of image selections (imageROIs) that behave partially as regular
Selections↑ (
see ).
Press
B () to add the current selection to the overlay. Press
Shift F () to create an RGB image with the overlay embedded in it. The overlay is preserved when an image is saved in TIFF format (cf.
3: Image Types: Lossy Compression and Metadata↑).
Selections are immediately added to the current overlay when pressing
B. Pressing
Alt B will display a dialog box in which
Stroke color and
width and
Fill color can be set.
Except for text selections, and as explained in ,
Stroke (contour) color and
Width are ignored if a
Fill color is specified. Colors are specified using the name of one of the default selection colors (
black,
blue,
cyan,
green,
magenta,
orange,
red,
white and
yellow) or using hex notation (
see 20: Hexadecimal Color Values↓).
Previously added
Overlays↑ are removed if
New overlay is checked. Also, if no selection exists and the command is run, a warning message is displayed in which is possible to remove the existing overlay, by running .
Note that measured selections () can be added automatically to the image overlay by selecting the
Add to overlay checkbox in
Blends two open images by adding an image to the overlay of frontmost image. The image to be blended can be of any type (
see Image Types and Formats↑) but cannot be larger than the host image. A blending alpha value can be specified in the
Opacity (0--100%) field. The initial X,Y location is based on the existing rectangular selection, if any.
By default the created overlay image cannot be moved around the canvas, i.e,, is not a image selection (ImageROI), but are stored in the TIFF header and can be saved and restored when saving images in TIFF format. On the other hand, image selections can be created using or by running after adding the image to the overlay.
(Blend transfer mode),
20 Hexadecimal Color Values
Hexadecimal (hex) notation is frequently used in computing to summarize binary code in a human-friendly manner. Here are some decimal/hexadecimal equivalents:
Decimal RGB color values that typically range from 0 to 255 are succinctly represented by two hexadecimal digits ranging from 00 through FF. A hex
[?] color value is a 6-digit, three-byte hexadecimal number (hex triplet) in the form #RRGGBB, in which RR specifies the red, GG the green and BB the blue value. Opacity of hex triplets can be modified by an optional transparency (alpha) channel, giving rise to a 8-digit, four-byte hex number in the form #AARRGGBB with AA specifying the alpha blending value. In ImageJ, the alpha channel codes for opacity and ranges from 00 (fully transparent) to FF (solid color). Alpha values can be omitted for fully opaque colors. The table below provides some hexadecimal color values in 10% opacity increments, and can be used to create semi-transparent
Overlays↑.
ColorChoosers in the
Color Picker window↑ display hex values of RGB colors. The built-in macro function
toHex() returns hexadecimal representations of decimal numbers and can also be used to convert RGB color values (
see RGBtoHEX macro). Several other macros (e.g.,
MakeOverlay) exemplify how to annotate images using hex colors.
Causes ImageJ to stop displaying the overlay displayed by .
Displays an overlay that was hidden by .
Creates an overlay from the selections on the
ROI Manager↓ list (
see ). Note that previously added
Overlays↑ will be removed.
Copies the selections and images in the current overlay to the ROI Manager, where they can be edited (moved, resized or re-colored) (see ). Note that previous items in the ROI Manager list will be deleted.
Permanently clears the overlay so that it cannot be restored using .
Creates a new RGB image that has the overlay rendered as pixel data. The RGB image is the same size as the active image, unlike , which creates a WYSIWYG
[?] (What You See Is What You Get) image that is the same size as its window.
Stacks↑ must first be converted to RGB ( submenu,
see also Image Types and Formats↑) when flattening all slices in the stack.
This prompt defines if and how
Overlays↑ should be labelled.
It sets the behavior of , (after activating the
Add to overlay option in ), and the
ROI Manager↓ Show All↓ display.
Color The color of the label as one of the default selection colors.
Font size Specifies the font size of the label (12--72
[?]pt).
Show labels If overlays should be decorated with a text label. This option is inactive by default.
Use names as labels If checked, ROI names are used instead of the default numeric labels. If unchecked, the size (selection count) of the current overlay is used. Selections can be renamed using the command, or, when using the ROI Manager, either
Rename↓ or
Properties↓
Draw backgrounds If checked, text will be displayed on complementary colored background. This option produces similar labels to those produced by the ROI Manager
Show All↓ option when
Labels is activated.
Bold If checked, labels (typeset in sans-serif font) are displayed in boldface.
Use this command to define the default overlay
Stroke color,
Stroke width and
Fill color. As mentioned in and ,
Stroke (contour) color and
Width are ignored if a
Fill color is specified. Set
Stroke width to 0 to have selections drawn using a width of one pixel regardless of the image magnification (
see 19: Working with Zoomed Canvases↑).
As usual, colors are specified using the name of one of the ImageJ default colors (
black,
blue,
cyan,
green,
magenta,
orange,
red,
white and
yellow) or using
Hexadecimal Color Values↑.
With
Stacks↑ and
Hyperstacks↑, selecting the
Set stack positions checkbox will make
Overlays↑ visible only when browsing their respective slice or frame. If unchecked, overlays will be displayed throughout the stack (
see also ,
More≫Options↓).
This submenu contains a selection of color lookup tables that can be applied to grayscale images to produce
Pseudocolor Images↑. In addition, it lists all the lookup tables installed in the
ImageJ/luts/ directory. More than 100 additional lookup tables are available from the ImageJ website as
individual files or, in bulk, as a
ZIP archive.
As explained earlier, it is not possible to organize LUTs into subfolders. However, the most frequently used lookup tables can be renamed with a numeric prefix (e.g,
01-glasbey.lut,
02-Termal.lut, etc.) so that they are listed earlier in the menu. This submenu can also be accessed from the
Toolbar↑ by loading the
LUT Menu↑.
When loading a lookup table is loaded and no image is open, a 256 × 32 ramp image is created to display the color table.
Inverts the current lookup table. For 8-bit images, the value (v) of each entry in the table is replaced by 255 − v. With inverted LUTs, pixels with a value of zero are white and pixels with a value 255 are black. Unlike the command, pixels values are not altered, only the way the image is displayed on the screen.
/
Applies the current lookup table function to each pixel in the image or selection and restores the default identity function. This modifies the gray values so that when the image is viewed using the default grayscale lookup table it will look the same as it did before. This command is equivalent to clicking on Apply in . For thresholded images, it is equivalent to clicking on Apply in .
/