Image
supports TIFF, PICT, PICS and MacPaint file formats. Stacks can be saved as either
multiple image TIFF files or as a PICS file. The Import and Export commands allow
images with arbitrary binary and tab-delimited text (spreadsheet) formats to be read
and written. The Open All option of the Open and Import commands allows a series of images
to be read automatically. Measurement results can be exported to a text file compatible
with spreadsheet and statistical analysis programs. Acknowledgments
The author wishes to thank the following individuals for their help, encouragement,
and contributions: Peter Ahrens, Joseph Ayers, Greg Brown, Mike Castle, Rick Chapman,
Dennis Chesters, David Chow, Ted Colburn, Cyrus Daboo, Andras Eke, Chuck Fiori, Garth Fletcher,
Tom Ford-Holevinski, Keith Gorlen, Joseph Hennessey, Greg Hook, Marshal Housekeeper,
Edward J. Huff, Werner Klee, John Ladwig, Cary Mariash, Kelly Martin, Reuben Mezrich,
Tom Marschner, Ranney Mize, Jim Nash, Ed Nater, Steve Pequigney, David Powell, Ira
Rampil, Arlo Reeves, Robert Rimmer, Bob Rodieck, Stein Roervik, Christian Russ, John Russ,
Matthew Russotto, Bruce Smith, Seth Snyder, Roy Standing, Cliff Stoll, Steve Ruzin,
Norbert Vischer and Mark Vivino.
Overview
Windows
Image
displays images, measurement results, profile plots, etc. in windows. Windows can
be dragged around the screen by their title bars. In addition, some windows can be
resized (e.g. the Plot window) using the "drag box" in their lower right corner.
A window buried underneath other windows can be activated by selecting it in the Windows menu.
The LUT window displays the current video look-up table. The Tools window contains
a palette of tools for making selections, editing images, drawing text, and making
measurements. The Map window is used for adjusting the contrast and brightness of
images and for enabling and disabling thresholding. The Info window displays status information,
such as cursor position and value, and the most recent measurement results. The Results
window displays the current table of measurement results. The Plot window displays density profile and calibration plots. The currently active window (e.g., the
MRI window above) has a highlighted menu bar.
Images
Image
manipulates, displays and analyses images. Images are two dimensional arrays of pixels
(picture elements). Pixels are represented by 8-bit unsigned integers, ranging in
value from 0 to 255. Image
follows the Macintosh convention and displays zero pixels as white and those with
a value of 255 as black. 16-bit images, however, can be imported and scaled to 8-bits.
The 16-bit (up to 65,00 gray levels) to 8-bit (256 gray levels) scaling can be controlled by the user or performed automatically based on the minimum and maximum gray
values in the 16-bit image. The Rescale command (in the File menu) allows the user
to redo the 16-bit to 8-bit scaling at a later time.
Stacks
Image
supports the organization and manipulation of a series of 2D images as a 3D array
called a stack. A stack contains set of related 2D images, such as a movie loop or
serial sections from a volume. The 2D images that make up a stack are called slices.
You can step through the slices using the ">" and "<" keys. The number of the current
slice and the total number of slices are displayed in the title bar. The Stacks menu
contains commands that work with stacks. Windows to Stack converts a set of 2D images
into a stack. Animate animates the images in a stack at a rates up to 100 frames per
second. Reslice reconstructs a new 2D image perpendicular to the plane of the slices
in a stack. Project does volume rendering, useful for visualizing the internal structures of 3D images. Commands not in the Stacks menu, except for Open, Save and Export,
have no knowledge of stacks. For example, the Invert command only inverts the current
slice, not the entire stack. Macros are available, however, for performing various
operations on all the slices in a stack.
Memory Requirements
Opened images are stored entirely in the Mac's internal memory, or RAM (Random Access
Memory). An image requires one byte of RAM for each pixel plus a few thousand additional
bytes for data structures containing information about the image, such as color tables and calibration. For example, a 512 X 512 image requires 262,144 bytes, or 262K,
where 1K equals 1024 bytes. A 256 X 256 X 256 stack would require 16,777,216 bytes
or 16MB. To see how much RAM an image uses, use the Get Info command, or pull down
the Windows menu, which shows the size of all open images.
The number and size of images that Image
can work with depends on Image
's RAM allocation. To check or change the allocation, select Image
's icon (a microscope) and use the Finder's Get Info command. The default allocation
is 2500K. To use all of Image
's features requires a RAM allocation at least three times the size of the largest
image, plus the size of the program (about 300K). The extra RAM is used for a buffer
that supports one level of Undo (the Undo Buffer) and a Clipboard buffer that supports
copy and paste functions. The default size of these buffers is 300K. This can be changed
using the Preferences command in the Options menu. You can find out how much memory
is currently available for opening images by selecting "About NIH Image" from the
Apple menu.
File Formats
Macros
Image
can be extended using a Pascal-like macro programming language that allows users
to customize and automate repetitive and frequent tasks. The easiest way to develop
a custom macro is to modify one of the macros in the Macros folder distributed with
Image
. Macros are stored in text files that can be edited using Image
's built-in text editor. Using the Load Macros command causes the macros in the file
to appear as commands at the bottom of the Special menu. The macro language is described
in Appendix A. The description assumes some familiarity with the Pascal programming language. Additional help on macro writing, and other ways to extend Image
, can be found in a separate document named "Inside Image".
Plug-ins
Image
can also be extended using Photoshop compatible plug-ins. Acquisition plug-ins are
used to support scanners or frame grabbers, or to read images in file formats that
Image
does not normally support. They are accessed using the Acquire sub-menu. Export
plug-ins are used to output to printers that do not have a Chooser selectable driver
or to save images in file formats not normally supported by Image
. They are accessed using the Export sub-menu. Filter plug-ins perform filtering
operations on images. They are accessed using the PlugIn Filters sub-menu. Image
expects to find plug-ins in a folder named Plug-ins located in either the same folder
as Image
or in the System folder.
Video Capture
Using a frame grabber card, Image
can digitize images from TV cameras, VCRs or video disks. Captured frames can be
averaged or integrated. Integration can be done in RAM (using software), on-chip
at video rates using Cohu or Dage CCD cameras, or on-board at video rates using the
Scion AG-5. The Histogram command will display a continuously updated density histogram during
"live" capture. The Make Movie captures a sequence of frames into a stack at rates
up to 30 frames per second. The Capture Color command digitizes 24-bit color into
a three slice stack. For alignment purposes, Show Paste Control (in the Windows menu)
allows "Live" video to be superimposed over a previously captured image. Information
about the four frame grabber cards directly supported by Image
(the Scion LG-3, Scion AG-5, Scion VG-5, and the Data Translation Quick Capture)
is provided in Appendix B. Image also
supports QuickTime compatible video digitizers such as those built into "AV" Macs
and the Power Mac 7500/8500.
To make a manual area measurement, first outline a region of interest using the rectangular,
oval, polygonal, or freehand selection tool. Then select the Measure command, which
will compute the area, mean gray value, and the minimum and maximum gray value. Other measurements, such as perimeter, can be enabled using the Options command in
the Analysis menu. Measure distances by making a straight, freehand or segmented
line selection, and then using the measure command. (Note that the line selection
tool uses a pop-up menu for selecting different line types.) Use the angle tool to measure
angles. The cross hair tool counts objects, marks them, and records their X-Y coordinates.
The wand tools automatically outlines structures isolated using thresholding. Results from the most recent measurement are displayed in the Info window. Use Show Results
to display a table of results since the last time the Reset command was used.
The Analyze Particles command automatically counts and measures features of interest.
This requires thresholding to discriminate objects of interest from surrounding background
based on their gray values. Image
has two thresholding methods. In thresholding mode (Threshold is checked in the Options
menu), all pixels equal to or greater than a single threshold level are displayed
in black, and all other pixels (the background) are displayed in white. In Density
Slicing mode (Density Slice is checked), all pixels between a lower and upper threshold
are highlighted in red. For both modes, you adjust threshold levels by dragging the
LUT tool (the one with the double-headed arrow) in the LUT window. For successful
thresholding, it may be necessary to use the Subtract Background command to remove the
effects of uneven illumination.
Images can be calibrated to either spatial or density standards using the Set Scale
and Calibrate commands respectively. To calibrate spatially, use the line selection
tool to measure a known distance, then use Set Scale to specify a unit of measurement
(e.g. millimeters) and enter the known distance. To calibrate to a set of density standards
(e.g. an optical density step tablet), measure the mean gray level of each of the
standards, then use the Calibrate command to enter the known values and specify the
type of curve fit.
Image
's tool palette contains several tools used for image editing and annotation. The
pencil, brush, line, paint bucket and spray draw in the current foreground color
(the color of the brush in the Toolbox window). The text tool draws text using the
current font, size, style, and foreground color. Click on a color with the eyedropper tool to
select a new foreground color. The eraser tool erases to the current background color
(the color of the eraser in the Toolbox window). Click on a color in the LUT window
with the eraser to select a new background color.
Commands in the Edit menu operate on the current selection. Cut, Copy and Paste perform
the standard Macintosh Clipboard operations. Fill fills the selection in the foreground
color. Clear erases it to the background color. Draw Boundary draws a line around the selection. Scale and Rotate enlarges, shrinks and/or rotates the current rectangular
selection. Commands are also available for flipping and rotating by 90 .
No telephone support is available for Image. The NIH Image mailing list, however, provides a way to get questions answered. It can also be used to contact other users, to keep abreast of new developments, and to get updates via e-mail. Instructions on how to subscribe are in the Frequently Asked Questions section. The NIH Image mailing list is maintained by Drexel University.