Techniques for 3-Dimensional Reconstruction using NIH Image

Home Introduction to MRM NIH Image Reconstruction Cross Sectional Analysis Data Sets and Reconstructions Additional Scan Information

NIH Image is a free image processing software program created by Wayne Rasband at national Institutes of Health. It is designed for a broad range of applications from DNA gel analysis to 3-dimensional volume reconstruction. This web page will discuss its uses for 3-dimenensional reconstruction and cross-sectional area analysis. In NIH Image 3-dimensional structures are depicted as volumes which are called stacks. A stack is a series of slices through this volume. A volume can be resliced in different planes (both orthogonal and non-orthogonal) and viewed from different orientations.

Computer Specifications

Downloading

MRM Scans

Segmenting a structure or space

Basic

Improving the accurancy of segmentations

Making the stack binary

Smoothing

Making a projection from the segmented stack

Computer Specifications
NIH Image will run on any Macintosh computer with an 68x or higher processor and system 7.0 or higher. Of course it runs better on a faster machine. The mimimum amount of RAM necessary to get adequate performance for our stacks is 32 MB allocated to NIH Image. NIH Image is compatable with virtual Memory, and we often increase the allocation to NIH Image to 100 MB, i.e. set the preferred size in the Memory allocation window of the application to 100,000 K. (Note you can only increase the memory allocation when the application is closed.)

Return to Top

Downloading


NIH Image

The most recent version of NIH Image can be downloaded from the following website. There is also a manual available for downloading at that site. Download the most recent version of NIH Image (version 1.62) if you want to segment structures and project the 3-dimensional images.

NIH-Image Version 1.62

If you wish to do cross-sectional area analysis you will need to download version 1.55. This version has been modified by Art Keating to do cross-sectional area analysis. It is also capable of segmenting and projecting structures. It cannot, however, save or open files in QuickTime format.

NIH-Image Version 1.55

More information about NIH Image can be found at the NIH Image Home Page.

Return to Top

MRM Scans
Scans are available as self-extracting files. The files are in TIFF format See
Available Scans to download a file for segmenting.

Return to Top

Segmenting a structure or space

The goal of segmenting is to assign a reserved colors for the voxels representing a specific object or space. We typically chose white for the object and black for all other voxels.

Basic Instructions

A. In the finder click on the stack you wish to segment. Choose "Get Info" from the File Menu. Click the locked box to lock the stack. Close the Get Info Window.

B. Open "NIH Image" by clicking on the microscope icon.

C. Select "Open" from the File menu and open the stack to be segmented. All pictures in the stack will be present in a small window. You can move through the stack using the < and > keys or the "Go to" slice command in the Stacks Menu.

D. Under the Special menu select "Remove 0 and 255." 0 and 255 are the numbers representing pure white and black and will be used later for the segmented structures and background. You may enlarge the window to see individual voxels by activating the magnifying glass or by clicking on the box in the upper right corner of the window.

E. Select white as the foreground color by clicking on the paintbrush icon and then clicking on the word white at the bottom of the LUT menu. The paint brush bristles should be white.

F. Decide on a segmenting tool. Read through the section below to make your decision.

Segmenting Tools - There are five main segmenting tools:

Tools Window

Tools fall into two classes: selection tools (the auto-outline and the freehand selection tools) and painting tools (the pencil, paintbrush and paint bucket). In order to use selection tools you must use density slicing, see below. Selection tools are fast, but once used cannot be undone. Painting tools require more work, but their action can be undone. For more information on how to use the Tools Window see the NIH Manual section on tools (pg. 58-59).

I. Selection Tools

Select "Density slice" from the Options menu. Note part of the image turns red. Density Slicing allows you to turn a range of greys to red. This is useful if the structure of interest can be limited to a range of gray shades. Use the slide tool to control the upper and lower limits of the density level within the LUT (gray scale) window on the left of the screen. Adjust the density until the structure of interest is red and there is a gray scale boundary around it. It is not always possible to do this, but adjust it so that the structure you want is red with as little overlap of other structures as possible. Once an area is selected it can be filled by either hitting F or selecting fill from the Edit Menu.

NOTE - the density level that you choose can make a big difference on the size of an area. Try to use approximately the same threshold range throughout a series.

Fixing Mistakes while Density Slicing
If you make a mistake you cannot undo the fill command. An unwanted fill can be resolved several ways.

II. Painting Tools
Painting tools can be used with or without using density slicing. They are often necessary to use if your structure cannot be isolated with a clear gray scale boundary for a number of slices. A painting tool can be used to draw a line between the boundary of the structure you want and other structures with similar color. It is then possible to go back and use density slicing.

III. Combination approaches to using segmenting tools.

Return to Top

Improving the accurancy of the segmentation

Two things can be done to improve the accuracy of the segmentation:1) hand painting the edges; and 2) reslicing the volume.

Making the Stack Binary

A. In the "Special Menu" choose "Set Threshold to Zero." The segmented volume will then be white with a black background. (If it is the other way around, select "Invert All" in the Special menu.) The stack will change as shown below.

B. The whole segmented volume should now be binaried. Go to the Special menu and choose "binary all". All the gray scale will now disappear from the segmented window.

C. Save the binaried volume as a PICS file using "save as". The PICS format will save a lot of space. A file that was originally 5-7 MB will now be less than 1 MB. It is useful to save the large segmented file in case you want to segment a second structure in the same volume and display them at the same time.

D. Scan through the entire binaried stack to make sure that all windows in the stack have a black background and white segmented images. If any slice has a black image on a white background, invert the specific slice by selecting "invert" from the Edit menu (not the Special menu).

Smoothing a structure

A final step may be to 'smooth' the binary stack. This removes the color from some of voxels around periphery of each object in all of the slices. It oftens makes structures look nicer but does not work well on structures which are thin.

To smooth a structure choose:

You have now resliced the volume 2 times and smoothed it in three planes. Sometimes the smoothing procedure leaves white dots or planes in the last resliced volume. To remove these do the following. Check that the background color is set to black by looking at the color of the eraser. Choose the rectangular selection box and select an area which includes the entire stucture but not any of the white dots or lines near the edge. Choose "clear outside stack" from the "Special menu." Save the stack which has been smoothed in three planes.

Return to Top

Making a projection from the segmented stack

A. Start with a binary stack that has a black background and white images of the segmented space or structure.

B. Choose "projection" in the Stack menu.
C. Set the parameters as follows and then click OK.

The rotational angle increments sets the number of windows that will be reproduced, If you choose 10 there will be 36 projection windows with each window turned 10 degrees from the previous one.

D. You can view the different projection windows and watch the rotation by using the < and > keys. Each window will be shaded and have the following appearance.

Colors can be added by going to the Options menu and selecting "Color Tables"; Fire 1 is usually the best color.

Return to Top

Home Introduction to MRM NIH Image Reconstruction Cross Sectional Analysis Data Sets and Reconstructions Additional Scan Information