Example images and scripts: These images (in the form of Pict files) can be used for a variety of experiments using any image analysis program. They represent typical problems encountered in obtaining quantitative information from microscope images. The particular scripts provided here show some of the procedures that may be helpful. Each script assumes that you will load the appropriate image manually into PrismView with no other images open, and load the script into PrismScript. Scripts contain plain-language commands and comments. You may either run the entire script (Command-R) or highlight selected portions and execute them one part at a time (press Enter), to study the results. The floating menus that appear in PrismScript are used to create or modify scripts (which can also be created by logging operations as the programs are run manually); the menus can be dragged out of the way if you have a small screen. The complete operating instructions are part of the Prism manual included with this set of files. NOTE: PrismScript is a separate program that runs along with PrismView (image acquisition and measurement) and PrismCalc (data analysis), and communicates with both of them. If one program should be interrupted or suffer a crash, the other programs may be waiting for an event, in which case they will appear to hang. Press Command-Period to recover control. PrismScript is NOT recompiled for the PowerPC chip at this time. In order to run it on a PowerPC, or on a 68020/68030 Mac without a floating point coprocessor, you must place the shareware extension SoftwareFPU in your system folder and restart the computer. This is not required to run PrismView by itself in manual mode. Script "measurements" and image "Dendrites" This script first levels the nonuniform illumination of the image (a common problem with microscopes, because of vignetting in the optics, nonuniform illumination, etc., which can be seen easily when the image is pseudo-colored). The levelling process can also be observed in the change in the histogram (the peaks for each of the phases get sharper and better defined). Then an automatic thresholding of the white features is performed. Small features are eliminated by using erosion (objects that disappear are removed, while the remaining features are kept in their entirety). These are then measured, and the largest features kept based on their equivalent diameter. The number of end points (based on each object's skeleton) are measured and used to color code the features. This is just one example. Manually, you can select any of the various measurement parameters to color code the objects according to size, shape, or position. Script "orientation" and image "Dendrites" This script illustrates the use of image processing to measure the orientation of boundaries. The image is first levelled, as in the preceding example, and then processed using a Sobel operator to obtain both the magnitude and orientation of brightness gradients. The magnitude image is thresholded and strong edges selected to form a mask. This is then used with the color-coded orientation image to show the boundaries. Script "texture seg" and image "Curds&Whey" This script shows one way to segment an image when the regions of interest do not initially have distinct grey scale values (which is common in biological structures). The grey scale range (difference between the brightest and darkest pixels in a neighborhood) is calculated and a new image formed that can be thresholded. This image is then cleaned up with binary erosion and dilation, and the outlines of the "smooth" regions overlaid on the original to show the regions selected. A note - there are "drop in" PCMDs for Prism that perform many other texture segmentation operations, using larger neighborhoods. This illustration shows a simple example using only the built-in operations. Script "fiber meas" and image "Fibers" This script shows a way to measure complicated images of overlapping fibers. Grey-scale ranking is used to construct a background, that is subtracted from the original to better define the fibers. These are then thresholded and skeletonized. The number of end points and the total length of the lines give the number of fibers per unit area and the mean length. Other measurements that can be performed include the mean width (by using the skeleton as a mask on the Euclidean Distance Map). and number of crossing points. Script "watershed" and image "Mixed Circles" This script illustrates the counting and size distribution of touching features. A watershed or convex segmentation uses the peaks in the Euclidean distance map as the centers of a non-merging dilation to separate the features, which are then counted and measured. This works for features of mixed sizes, which a simple erosion, labelling and dilation procedure would not (small features would disappear before larger ones separate). Script "grain Size" and image "Steel" This script shows several procedures useful for measuring metal structures. First, the original image has nonuniform brightness (which may result from variations in illumination, etching, camera vignetting, etc.). This could be levelled very quickly using the automatic procedure shown for the "Dendrites" image, but is here compensated using a grey scale ranking procedure. The background image has the dark boundary lines removed by replacement with the brightest neighbor pixel (a PCMD drop in does this much faster, but this script was written to use only the built in functions). Subtracting this leaves just the dark boundaries. However, nonuniform etching still makes thresholding difficult. A "double thresholding" operation makes two copies of the binary image, one with just the darkest pixels that are definitely part of the boundary network, and the other with all dark pixels. Combining these with a "Feature-AND" eliminates dark pixels that are not connected to the boundaries. Skeletonizing and pruning this image (removing dangling ends) defines the boundary network and provides one measure of the ASTM grain size based on the number of triple points. Constructing the inverted grain image allows measurement of the total boundary length, which provides another measure of the grain size. Finally, a size distribution of the grains is shown.