![]() ![]() ![]() |
Introduction
NIH Image is a public domain image processing and analysis program for the Macintosh. It can acquire, display, edit, enhance, analyze and animate images. It reads and writes TIFF, PICT, PICS and MacPaint files, providing compatibility with many other applications, including programs for scanning, processing, editing, publishing and analyzing images. It supports many standard image processing functions, including contrast enhancement, density profiling, smoothing, sharpening, edge detection, median filtering, and spatial convolution with user defined kernels. Image can be used to measure area, mean, centroid, perimeter, etc. of user defined regions of interest. It also performs automated particle analysis and provides tools for measuring path lengths and angles. Spatial calibration is supported to provide real world area and length measurements. Density calibration can be done against radiation or optical density standards using user specified units. Results can be printed, exported to text files, or copied to the Clipboard. A tool palette supports editing of color and gray scale images, including the ability to draw lines, rectangles and text. It can flip, rotate, invert and scale selections. It supports multiple windows and 8 levels of magnification. All editing, filtering, and measurement functions operate at any level of magnification and are undoable. Image directly supports several frame grabber cards for capturing images or movie sequences using a TV camera. It also supports QuickTime compatible video digitizers such as those built into "AV" Macs and the Power Mac 7500/8500. Acquired images can be shading corrected and frame averaged. Image can be customized in three ways: via a built-in Pascal-like macro language, via externally compiled plug-in modules and on the Pascal source code level. Example macros, plug-ins and complete source code are available from the NIH Image Web site (http://rsb.info.nih.gov/nih-image/) or by anonymous FTP from zippy.nimh.nih.gov.
System RequirementsImage requires a color capable Macintosh and at least 2MB of free RAM. A Macintosh with 16MB or more of RAM is recommended for working with 3D images, 24-bit color or animation sequences. System 7.0 or later is required. Image directly supports, or is compatible with, large monitors, flatbed scanners, film recorders, graphics tablets, PostScript laser printers, photo typesetters and color printers.AcknowledgmentsThe 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![]() WindowsImage 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. ImagesImage 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.StacksImage 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 RequirementsOpened 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
MacrosImage 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-insImage 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 CaptureUsing 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 15 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.Image EnhancementThe Process menu provides filters for smoothing, sharpening, finding edges and reducing noise in images. The Convolve command uses user-defined filters that operate on up to 63 X 63 neighborhoods. The Binary sub-menu's Make Binary command converts grayscale images to images consisting of only black and white pixels and includes commands to process such images. Use the Arithmetic sub-menu to add or multiply an image (or selection) by a constant. Arithmetic operations between two images are done using the Image Math command or by using the Paste Control dialog box during paste operations.Making Measurements
Editing
Text WindowsImage has a built-in text editor that can open and edit text files up to 32K in size. The following command know how to deal with text windows: New, Open, Close, Save, Save As, Print, Cut, Copy, Paste, Clear, Select All, Font, Size, Convolve (uses the kernel in the current text window), and Load Macros (loads the macros contained in the current text window). Also note that the Fill command changes to Find when a text window is active.
Look-up TablesEach open image has a look-up table (LUT) associated with it. The LUT window displays the contents of the look-up table for the currently active image. The LUT is used to map, at video rates, pixels (in the range 0-255) to screen colors. Click and drag with the LUT tool in the LUT window to adjust brightness and contrast. Measured density values will not change since you are manipulating the look-up table, not the image's pixel values.Various commands at the top of the Options menu allow you to invert the current LUT, to specify the number of gray levels or colors it uses, or to switch to one of several built-in color tables. LUTs are automatically stored with an image when it is saved to disk, or they can also be saved separately. |
||||