[comp.graphics.visualization] SOURCE CODE AVAILABLE SOFTWARE: NIH IMAGE FOR MACINTOSH

annala@neuro.usc.edu (A J Annala) (01/05/91)

The NIH Image package represents one of the smallest and yet most capable of
the free image processing packages available in the academic marketplace.  I
use this system to perform greyscale densitometry on arbitrarily shaped ROI's
(unfortunately this function is not provided by the other commonly available
systems) to obtain statistics including raw and calibrated mean, sd and range 
of grey levels and area of the target ROI's.  The package is exceptionally
reliable and easy to use.  Yes, it has MENUS!!!  I recommend it highly.  The
one drawback is that because it depends on the Macintosh Graphics Toolkit --
it would be extremely difficult to port this code to another machine.

Alexander-James Annala
Neural, Informational & Behavioral Sciences Program
HEDCO Neuroscience Building, Room 534
University of Southern California
Los Angeles, CA 90089-2520

-----------------------------------------------------------------------------

The following is reprinted from the NIHImage software distribution literature:	

------------------------------------------------------------------------------
Introduction

NIH Image is a public domain program for the Macintosh II for doing digital 
image processing and analysis. It can acquire, display, edit, enhance, analyze, 
print, and animate images.  It reads and writes TIFF, PICT, and MacPaint files, 
providing compatibility with many other Macintosh applications, including 
programs for scanning, processing, editing, publishing, and analyzing 
images. It supports many standard image processing functions, including 
histogram equalization, contrast enhancement, density profiling, smoothing, 
sharpening, edge detection, median filtering, and spatial convolution with user 
defined kernels up to 63x63. Image also incorporates a  Pascal-like macro 
programming language, providing the ability to automate complex,  and
frequently repetitive, processing tasks.

Image can be used to measure the area, average density, center of gravity, and 
angle of orientation of a user defined region of interest. It also performs 
automated particle analysis and can be used to measure path lengths and angles. 
Measurement results can be printed, exported to text files, or copied to the 
Clipboard.  Results can be calibrated to provide real world values.

Density calibration can be done against radiation or optical density standards 
using any user specified units. The user can select from any of eight different 
curve fitting methods for generating calibration curves.

It provides MacPaint-like editing of color and grayscale images, including the 
ability to draw lines, rectangles, ovals 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. It uses digital halftoning to print images on
PostScript printers and Floyd-Steinberg dithering for printing on non-PostScript 
printers.

It supports either the Data Translation QuickCapture or Image Systems 
Technology(Scion) Image Capture 2 cards for digitizing images using a TV camera. 
Acquired images can be shading corrected and frame averaged.

Image is written using Think Pascal from Symantec Corporation, and the source 
code is available.   The program can be easily ported to other Pascal compilers 
for the Macintosh, such as MPW Pascal or TML Pascal.

System Requirements 

For full operation, Image requires a Mac II(x, cx, ci, fx) with at least 2 
megabytes of memory, but 4 megabytes, or more, are recommended for doing 
animation, for simultaneously displaying more than a handful of pictures, or for 
running under MultiFinder. Image also requires an 8-bit video card with the 
ability to display 256 colors or shades of gray. Image directly supports, or is 
compatible with,  large monitors, flatbed scanners, film recorders,  graphics 
tablets, PostScript laser printers, phototypesetters, and color printers.

... intervening manual sections deleted ...

Appendix H: Updated Versions and Bug Reports
------------------------------------------------------------------------------
Image is available from the National Technical Information Service(NTIS), and 
from many Macintosh bulletin boards and user group libraries. A reasonably 
current version, including Pascal source code and example images,  should be 
available from one of the following:

1) From a friend. The Image program, including source code and documentation, 
is public domain and may be freely copied, distributed, and modified. However, 
if you modify Image, please update the about box before distributing your 
version of the program.

2) Via anonymous FTP from alw.nih.gov [128.231.128.251] in the directory 
/pub/image.  Enter "anonymous" as the user name and anything you like as the 
password.  The /image directory contains the latest version of Image, along 
with source code, HyperCard reference stack, and many sample images. It also 
contains versions of Image extended to do Fourier analysis, fractal analysis, 
to capture and analyze in 24-bit color, and to support quantitative evaluation 
of cerebral blood flow, glucose metabolism, and protein synthesis.

3) Via anonymous FTP from sumex-aim.stanford.edu [36.44.0.6]. The application 
is in the directory /info-mac/app, and the source is in /info-mac/source/.

4) DL14 of MACPRO on CompuServe (expensive)

5) Twilight Clone  BBS in Silver Spring, MD,  301-946-5032. Image is currently 
available at no charge from the Twilight Clone.

6) NTIS, 703-487-4650, Order Number PB90-500687, $100(Check, Visa, MasterCard).
NTIS sells a two disk package complete with documentation, HyperCard reference 
stack, Lightspeed Pascal source, and example images.


Bug reports and suggestions are welcome, as well as corrections or additions to 
this manual. The author(Wayne Rasband) can be reached at the following electronic 
mail addresses:

Internet, BitNet:	wayne@helix.nih.gov
CompuServe:	76067,3454