Using Object-Image

with

Confocal Microscope Images

 

 

 

 

 

 

 

 

 

 

 

Glen MacDonald

The Virginia Merrill Bloedel Hearing Research Center and the Center on Human Development and Disability - Cellular Morphology Core Facility

University of Washington

Seattle, Washington

 

Object-Image is a new version of NIH Image created by Norbert Vischer, University of Amsterdam. It adds capabilities for working with stacks, a 3-D reslicing display, non-destructive overlays, quantitation of multiple separate objects and improved customization of the measurements window. Although all macros written for NIH Image will work with Object Image, macros written for Object-Image will contain commands that do not exist in the older NIH Image. One must be a bit careful in running new macros with NIH Image. It is best to open the macro, simply a text file, with your version of Image and read the file comments. Anyone who writes macros for Object-Image is encouraged to add the following line as the first line of the macro, including the curly braces: {This macro was written for Object Image.}

Object Image behaves similarly to NIH Image, other than additional tools and an extra menu in the menu bar. Detailed information regarding program commands will be found in the manual for NIH Image and in the short document specifics for Object Image. Both have been placed in the Image manual notebook. The Image manual is kept in a 3-ring binder near the main image analysis computer. The author of NIH Image is now creating a version that runs under the Java environment. This new program will run on any computer and operating system supporting Java. It will be implemented as it becomes more functional for our needs.

Image is limited in that it can only display an 8-bit look-up table (LUT). Thus, multi-channel images are opened and viewed as monochrome images of the separate mixer channels. The 2 or 3 image Bio-Rad .pic file stacks that constitute single plane RGB images may be saved as TIFF files to be opened in other programs as 24-bit RGB images, or viewed directly in Image as 8-bit Indexed Color images. Object Image can save multi-image PIC files, such as from a z-series, as multi-image TIFF files.

A z-series, once opened, can be played like a movie, analyzed for densitometric and morphometric data, or used to create 3-dimensional projections. Any series of images may be exported as a Quicktime movie. Image stacks are often filtered in Image before use by other software such as Adobe Photoshop or VayTek VoxBlast.

Most Object Image commands work only on the active slice, which is the image window you are viewing at any time. Operations affecting stacks are found either in the Stacks Menu, or are created in macros that iteratively apply operations through a stack slice by slice. All filters, drawing tools and other means of editing an image may be applied to any individual slice.

Macro commands will appear in the Special Menu, below the ‘Load Macros’ command. Characters in a macro command line surrounded by square braces are short-cut keys that will activate the macro from the keyboard, e.g. Save active slice as a file [F]’. Similarly, many commands in the menus offer short-cut keys. The symbol resembling a 4-leaf clover is called the "Command" key, abbreviated ‘cmd’ in this document.

Loading Macros.

  1. Select ‘Load Macros…’ from the Special Menu;
  2. Load the desired macro. It should be in the macros folder residing in the same folder as the Object Image application;
  3. Macro commands will appear in the ‘Special’ menu.

Documentation for macros used in this laboratory is kept in a 3-ring binder.

Bio-Rad File Conversion/Import

File Format.

Bio-Rad native files are denoted by a ".PIC" filename extension. The native file format for is a raw file consisting of a 76 byte header followed by sequential images and ending with a block of text. Files generated from most COMOS based Bio-Rad confocal microscopes (MRC-500, 600 and 1000 models) are usually 8 bits/pixel, although they may be 16 bits/pixel. Images generated by the LaserSharp software, used on the MRC-1024 and newer systems, are all 8 bits/pixel. Reading the attributes at the end of the file will be discussed later.

These files may contain a single image from a single mixer channel, up to 5 images representing 5 channels of the same image plane, or multiple images from a single channel, such as a time-lapse series or a z-series. Time-lapse and z-series images collected from multiple channels will be saved as a separate image stack for each channel. Such stacks from multiple channels will be denoted by the last 2 characters of their filename having been set to "01", "02", "03", "04" or "05" to designate the channel.

Files can be opened in the 3D module of the Bio-Rad LaserSharp software and exported in TIFF, BMP or other file formats. Since most graphics and image analysis software can import the Bio-Rad files, it is often unnecessary to convert all files. Also, Bio-Rad files containing multiple images are exportted by LaserSharp as many separate files, one for each image in the original set. It is often much easier to make the conversion from PIC to other formats in software that allows multi-image TIFF files. Otherwise, you will have to keep track of the 3 separate files of a 3-channel image, or the groups of files created from each channel in a z-series.

The extended attributes information at the bottom of a PIC file may be read with an OS/2 program called ‘Showpic.exe’, but only on the confocal computer. Efforts are underway to port this utility to the Macintosh. There is a macro that will read the file attributes in Object Image, but it is extremely slow.

 

 

Bio-Rad File Import

 

Importing Bio-Rad Files with the Confocal Macros.

  1. Load the macro entitled ‘Confocal Macros’, if it isn’t already loaded;
  2. Choose the ‘Import Bio-Rad MRC Series [Z]’ command to open any Bio-Rad file;
  3. All file parameters are automatically determined, single images treated as a stack of one slice.

The Confocal Macros may be set to automatically load when the program is started.

Further macros may be used to create RGB files, animate stacks or perform projections. Refer to the Confocal Macros documentation in the Object Image Macros notebook.

The ‘Save as…’ command allows export in other file formats. Except for the ‘Import Bio-Rad MRC Series’ command, which is specific for Bio-Rad PIC files, commands in this set of macros may be used on any other set of images that Object Image can open.

Importing Bio-Rad Files using the File Import Command.

  1. Select ‘Import…’ from the File Menu;
  2. Click on the ‘Custom’ radio button;
  3. Click on the ‘Set’ button;
  4. Enter Width and Height of the image (pixels);
  5. Enter ‘76’ for offset;
  6. Enter the number of slices;
  7. ‘OK’;
  8. ‘Open’.

If the images open with a noticeable striped appearance, then you have incorrectly entered the image dimensions. An incorrect offset will shift the image to the left or right.

While Adobe Photoshop can import PIC files of more than 3 images, it will only display the first image of a TIFF file containing more than 3 images, such as created by Object Image from a z-series. There is not any way to get at the rest of the images in the file.

Opening a TIFF file from other image sources.

1. Select ‘Open…’ from the File Menu.

Saving Your Files.

Never make changes to the original PIC files. These should be archived to CD-ROM as original data. If you save changes to a converted stack, Object Image will prompt you for a file name and new file format. TIFF is the most favored file format for saving images as it will save stacks, as well as single images, and is universally support by software on Mac, Windows and Unix computers. Stacks may also be saved as QuickTime movies. QuickTime is a widely supported video format. However, image quality will be degraded, if you have activated file compression.

• File Menu Commands

Save As…

The stack may be saved in TIFF, PICT, PICS or QuickTime formats

• Export

Additionally allows the stacks to be saved as Raw Data files or MCID format files.

• Get Info…

Provides useful information regarding any open files, such as width, height, number of slices, file size in bytes, RAM utilization and color table used.

 

Adjusting the look-up table (LUT)

"Show Histogram" (cmd-H) and "Surface Plot…", Analyze Menu, are useful to determine which pixel intensity ranges that are important. The surface plot presents a perspective view of the image plane as a 3-D graph of pixel intensities. The Info Window will display the X, Y coordinates of the mouse, relative to the source image, and the pixel intensity as the cursor is moved over the plot or histogram. Both will apply to any rectangular selection, defaulting to the current image window if a rectangular selection has not been made. The Plot Profile command will also create a plot of line intensity for a straightline selection.

Any change to the LUT may be applied to the entire stack by the 'Apply LUT to Stack [L]' macro.

Psuedo-coloring an Image

Color palettes may be imported with the File Menu ‘Import…’ command or applied via the ‘Color Tables’ submenu in the Options Menu. Palettes are usually stored in a folder residing in the Image application folder.

 

 

 

 

Stacks Menu Commands

 

Windows to Stack

Converts all open image windows, from separate files, into a stack. The images must be the same size. A macro, "Windows to Stack", is available that works on windows that are not the same size. Images are placed into the stack in the order in which they were opened. See the Image manual for the "Open All" command which allows opening all single image files contained within a folder.

Stack to Windows

Converts the currently active stack to separate windows. A stack of 20 slices would convert to 20 normal image windows. Each window may then be saved as a separate file.

Add Slice

Inserts a new blank slice into the stack following the currently displayed slice. The maximum number of slices allowed in a stack is 1000.

Delete Slice

Deletes the currently displayed slice. Undo will restore this operation.

Next Slice/Last Slice

If you want to examine individual slices, use the < and > keys to scroll through the stack slice by slice. The shift key doesn’t need to be used.

Animate

This will scroll through the stack automatically. The animation speed can be controlled by pressing the number keys, 0 through 9, during playback. Playback speed will be given in the Object Image Info box residing below the tool palette. Clicking in the image stops animation. If the ‘Oscillating Movies’ option is checked in Preferences, Options Menu, then the stack will play back and forth, rather than starting over from the first frame.

Average

Creates a single new image from the arithmetic mean of all slices in the current stack.

Make Montage

Creates a new composite image from the current stack. The Montage dialog allows you to set the number of rows and columns, scale factor, select a range of slices to montage, labeling slices and borders.

RGB to 8-bit Color…

Converts an RGB color image (in the form of a 3-slice stack) to an 8-bit indexed color image. You have a choice of preset 256 color LUTs or you may create a custom color table.

• Register

Translates and rotates the slices in the current stack into alignment based upon manually defined landmarks. The interface for manual alignment is relatively simple. Click on visible landmarks in a reference slice and then click on corresponding landmarks in subsequent slices. The software will perform rotational alignment and x,y translation. It is often useful to create a subset of a stack from those slices needing alignment, rather than hope for landmarks that persist throughout the entire stack. Although not commonly used for confocal files, this may be useful for situations when the sample has drifted during a z-series or time lapse acquisition.

• Project…

This utility will generate an animation sequence of a rotating 3D dataset. This is described more fully in a separate section.

• Reslice

Constructs a single 2D image parallel to the z-axis of the current stack. Use the straight line tool to draw a line at any arbitrary angle on a stack slice. The stack will be resliced along this line. The resulting window will show a "sideview" into the interior of the volume. The width of the result is the length of the straight line selection and its height equals the depth of the stack.

• Stack Info…

Allows several file parameters to be set. For confocal stacks the relevant items are whether the stack is a Volume or RGB Image and setting Slice Spacing. The Slice Spacing may be relative to interpixel spacing, i.e. enter "1" for images collected with square voxels, "2" if the z-step was twice the x,y scale, etc. Alternatively, enter the micron Z-step value here and a spatial calibration value for X,Y in the ‘Set Scale…’ command, Analyze Menu.

 

•Slice 2-D

•Slice 3-D

Enter a value for slice spacing in the ‘Stack Info…’ command. Selecting either of these commands will present the dataset as a ‘3-Box View’. An X,Z projection plane appears across the top of the orthogonal view, and a Y,Z plane to the right. The ‘Navigation Tool’, , replaces the Oval Selection Tool in the tool palette.

The ‘Slice 3-D’ command is extremely useful for exploration of the dataset in 3 dimensions. A horizontal line and a vertical line will appear on the image window. Dragging either line will cause the corresponding plane window to update. Placing the cursor exactly on the intersection of the two lines will control both lines with continuous update of the two reslice windows. The two intersecting lines present a perspective view of the planes slicing through the volume.

 

The ‘Slice 2-D’ command is used to select objects for 3-D operations. Moving the red crosshairs updates its position in the 3 windows. Once an object of interest has been identified in one of the view boxes, open a new Cell to begin selection of points. Use the arrow keys and the <, > keys for x, y, and z navigation through the volume during the point selection, or click on the Navigation Tool to move in any window. Re-select the Cell to continue point selection. Refer to the Object-Image manual for details.

 

 

Confocal Macros

The Confocal Macros file is periodically updated as bugs appear or new features added. The current version at this writing is "Confocal Macros_2.6". The underscore in the name fills in a space to allow ftp transfer of the macro text file to colleagues. It is advised to always use the most current version. Individuals who modify these macros for special purposes are requested to rename their macro to distinguish it from the original general purpose macro written for our laboratory.

The macro is loaded by selecting the ‘Load Macros…’ command from the Special Menu, or pressing ‘cmd 9’. The Confocal macros reside in the Macros folder within the folder that contains the Object Image application. Some users will place a copy of the macro, or an alias to it, within the folder containing their image files. It is often set to automatically load upon starting the application.

The letter in square brackets is a shortcut command. Once the macro is loaded, then pressing the key will activate the operation just as if it were selected from the Special Menu.

'Import Biorad MRC Series [Z]'

Opens any Bio-Rad PIC file as a stack, even a single image PIC file. The default imports all images beginning with the first. Users may set the opening value greater than 1 to start with some other image in the file than the first.

'Show or Hide File Header [H]'

Entering a zero (default) tells the Import macro to extract information in the PIC file header and write it to a text file. Entering a "1" will avoid these text files if they are a nuisance. Image will hold open only 10 of these info windows at a time.

'Save Active Slice as a File [F]'

Saves the active slice of a stack as an individual file. Specify the file type in the ‘Save As…’ dialog box, which should only appear once. Note that canceling this operation leaves a copy of the slice on the desktop.

'Make Brightest Point Projection of Stack [B]'

Creates a Brightest Point projection from the stack, similar to the Lasersharp 'Projection' or COMOS 'Project Z-series' operations. Output file is a single slice stack

'Make Nearest Point Projection of Stack [N]'

Creates a Nearest Point projection from the stack, output is a single slice stack.

'Make Mean Value Projection of Stack [M]'

Creates a Mean Value Projection from the stack, output file is a single slice stack.

'Make a Darkest Point Projection'

Creates a Darkest Point projection by inverting the stack LUT for a brightest point projection, then inverting the result. Output file is a single slice stack.

'Save As RGB Tiff'

Quickly export a stack as an RGB TIFF. More than 3 images in a stack returns an error message, 2 images get a Blue channel added after the Red and Green channels (slices 1 and 2). The Blue channel slice is filled with black pixel value [254]. 3 images become an RGB. Single images are saved as a grayscale TIFF. If you have single image file windows to merge into an RGB file, use the ‘Windows to Stack’ command, Stacks Menu, to generate a starting stack.

'Delete Range of Slices [D]'

Delete a user defined range of slices (e.g. 1-8), with prompts for the first slice in the range and for the last slice in the range. Default values are the first and last slices in a stack (delete the whole stack). The Undo command won’t save you here!

 

'Save Slice Range to New Stack'

Save a user defined range of slices (e.g. 3-24) to a new stack, with prompts for the first slice in the range and for the last slice in the range. Default values are the first and last slices in a stack. The new stack isn’t actually saved to disk since this is often used to create temporary subsets of stacks for subsequent processing.

Navigation – especially helpful for large stacks.

'Select Slice… [S]'

Enter a slice number to jump to that slice.

'First Slice [1]'

Jump to the first slice in a stack.

'Last Slice [9]'

Jump to the last slice in a stack.

Filtering – applies a filter to the entire stack.

'Smooth Stack'

Applies the Smooth convolution filter to a 3x3 neighborhood, comparable to an ‘Option-Smooth’, Process Menu, for increased blurring.

'Sharpen Stack'

Applies the Sharpen convolution filter to a 3x3 neighborhood, comparable to an ‘Option-Sharpen’, Process Menu, for increased sharpening.

'Invert Stack'

Inverts the LUT for all slices in a stack.

'Reduce Noise Stack'

Applies a median filter with a 3x3 neighborhood to all slices in a stack.

'Apply LUT to Stack [L]'

Propagates changes to the look-up table to all slices in a stack. By default, any changes to the LUT are confined to the slice on which they are made.

‘Parabolic Transform’

‘Gamma Transform’

‘Log Transform’

‘Square Transform’

‘Square Root Transform’

These macros apply non-linear transformations to the slope of the LUT. All but the ‘Gamma Transform’ are preset functions. The ‘Gamma Transform’ prompts the user to enter values between 0.5 and 2.0 to control the non-linearity of the LUT slope (gamma). These may be useful to bring out details in regions of images with wide ranges of intensities.

'Remove 0 and 255 from Stack'

Changes pixel values of 0 to 1 and 255 to 254 in all slices. Pixel values of 0 (which always display as white) and 255 (always displays as black) can cause problems when pseudo-coloring images and during thresholding operations.

Manipulating Slices.

'Flip Stack Vertical'

‘Flip Stack Horizontal'

These two macros change the orientation of all slices in a stack.

'Rotate Left'

Rotates each slice counter-clockwise 90°. Creates a new stack.

'Rotate Right'

Rotates each slice clockwise 90°. Creates a new stack.

'Rotate'

Uses the ‘Scale and Rotate’ command found in the Edit Menu to perform an arbitrary rotation on all slices in a stack. Enter values from 180° to –180°.

'Clear Outside Stack'

The user creates a rectangular region of interest. Then this macro erases everything outside of that region. The slices remain the same size, with the region of interest surrounded by white margins. This can create space for titles, margins or quickly observing the effects of cropping. See the Crop and Scale Macros, below. DANGER-This macro cannot be undone!

 

'Crop and Scale-Fast'

'Crop and Scale-Smooth'

These use the ‘Scale and Rotate’ command found in the Edit Menu. Create a region of interest with the rectangular selection tool or by ‘Select All’, Edit Menu. The macro will prompt for a scaling factor between 0.05 and 25. The open stack will be closed and replaced by a new stack of cropped slices that have been rescaled by the entered factor. The default factor of 1 will crop without re-scaling. These only operate on a single stack.

'Crop and Scale-Fast' replicates pixels for quicker rendering, but with lower quality that preserves the pixel statistics of the image. 'Crop and Scale-Smooth' performs re-scaling with a bilinear interpolation for better visual results, but requires longer rendering time.

'Crop Stacks, No Scaling'

This macro differs from the 2 above in that it will operate on all open stacks. Its purpose is to crop the same region of interest from multiple channel z-series or timelapse stacks. Draw a rectangular selection on a slice in any of the stacks then select this macro. The selections will be copied to new stacks entitled 'stackname cropped'. Each stack will be closed as it is operated on. Each new stack will be closed after saving.

'Delete Even Slices'

Removes alternate slices, halving the length of a stack. Helpful to speed up operations with large stacks or reducing file size for animations to be placed on the web.

'Replicate Slices'

Inserts a copy of each slice into the stack. Enter the number of times each is replicated. For example, entering ‘3’ creates a stack of 1,1,1,2,2,2,3,3,3,4,4,4…n,n,n. Useful for making projections, animations or 3D drawings.

'Color Merge Two Images'

Merges a "red" image and a "green" image to create a composite color image by creating a temporary 24-bit image and converted to 8-bits. Similar to the merged images created with COMOS. THIS WORKS ON EXACTLY 2 OPEN IMAGES, NOT STACKS.

'Color Merge Two Stacks';

Merges a "red" stack and a "green" stack to create a new composite color stack. Similar to the above macro but requires 2 stacks of the same height, width and number of slices.

'RGB to Indexed'

Converts a 3-slice RGB stack into an 8-bit composite color stack. If there are only 2 slices in the open stack, then first run the 'Save As RGB Tiff' macro to create the 3rd slice (which will be blue).

'Merge Two Stacks Side by Side'

Combines two stacks of width 1 and width 2 to create a new stack of width 1+2, the height of the tallest stack, and the depth of the stack with the most slices. For example, a 256x256x40 and a 256x256x30 stack would be combined into one 512x256x40 stack.

'Average Two Stacks'

Creates a new stack with each of its slices the result of a frame by frame averaging of two stacks. Requires that only two stacks are open when the macro is invoked.

'Save Slices as files'

This macro saves the slices in a stack as individual TIFF or PICT files using

names of the form needed by Apple's Convert to [QuickTime]Movie utility.

Specify the file type in the SaveAs dialog box, which should only appear once.

Note that stacks can be saved directly as QuickTime movies.

'Windows to Stack'

Unlike the menu command of the same name, the windows do not all need to be the same size. However, this version makes a stack that is only as large as the smallest window, cropping the larger image. This macro could be changed to make a window large enough to encompass the largest open stack.

'Reslice Horizontally [H]'

Draw a rectangular region anywhere on a slice to reslice the stack within the boundaries of the region, in a plane parallel to the X axis. You will be prompted for interpixel spacings of the beginning stack and the resulting stack. The result stack will have height equal to the number of original slices, width equal to the width of the rectangle and a depth (number of slices) equal to the height of the rectangle. Reslicing starts at the top of the rectangle.

'Reslice Vertically [V]'

Operates similarly to the 'Reslice Horizontally [H]' macro, with reslicing a plane parallel to the Y axis. Reslicing starts at the left edge of the rectangle.

'Set Stereo Pair Projection Angle'

Establishes the rotation angle for the left and right images used to create a Red-Green Stereo Pair. The angle of vergence to view an object at 1 meter is 4.3° for most people. A larger angle may be useful for viewing the stereo image a closer distance or exaggeration of the depth perception. Default value is 8°.

'Make Red-Green Stereo Pair [P]'

Rotates the active stack to either side of zero degrees by the projection angle. A new stack is created containing brightest point projections of the left and of the right rotations. This new stack is converted to an RGB image, and then to an indexed color image. The indexed color image may be viewed directly on the screen through a red filter placed in front of the left eye and a green filter in front of the right eye. Either file may be printed or saved. The RGB file, named "Projection (Red)", etc., may be used with other software for 24-bit red-green 3D images of higher resolution. Red-Blue stereo pairs can be created by simply editing slice order in the RGB stack and using the ‘RGB to 8-bit’ command in the Stacks Menu.

'Make Surface Plot Movie'

Creates a surface plot of each slice, placing the plots into a new stack. Requires a rectangular selection. This creates an intensity plot of slices through the volume.

'Draw Arrow [W]...'

Draws an arrow on a slice. Requires the straight line tool. Hold down the shift key to constrain the line orientation to 45° increments. The arrowhead is at the ending point of the line. Arrow color is controlled with setting the foreground color (click on the palette, or on the colors at its base). Arrow size is controlled by the line width setting.

'Make Step Function'

Generates a LUT step function within a rectangular selection. Make a rectangular roi, the macro requests the number of LUT steps to create. The macro analyzes the shape of the roi and paints the steps perpendicular to the long axis. An error condition occurs if the roi is smaller than the number of steps, which must be at least 1 pixel thick.

 

 

Creating RGB Files

An RGB file is basically an image file with three separate images representing red, green and blue color channels. An RGB file is always read in the order of red, green and then blue. If only 2 color images are available, then a 3rd image must be added. Photoshop will add a blank image when opening a single or dual channel image as an RGB. Proper color rendition requires that any blank channels be filled with black. Photoshop will fill the blank channel according to its preference settings. Object Image must be told to create a blank channel.

Converting a Multiple-channel, Single Image Bio-Rad PIC.

Open the image by ‘Import…’ command or the Confocal Macro.

The ‘Save as RGB Tiff’ macro will save a single image as grayscale by default. The macro will add a 3rd channel to 2 channel PIC files and fill it with black. The result will put the 2 data channels in red and green. See below to convert a single image to RGB.

Converting Single Images into RGB.

Single images may be assembled into an RGB file by creating a 3 slice stack. Open the single images in the order by which they should appear in the color channels. That is, open the red image first, the green image second and the blue image last. Close all other image windows and run ‘Windows to Stack’, Stacks Menu.

Create an RGB from less than 3 images by opening them in the order of their channel destination and run ‘Windows to Stack’. Then add slices at the beginning, middle or end of the stack, as needed with ‘Add Slice’, Stacks Menu. New slices will be inserted after the active slice. Move the cursor to the tools palette and select ‘black’ from the bottom of the grayscale. Select the blank slice, then ‘Fill’, Edit Menu.

Creating RGB Images from Projections.

Multiple channel z-series images can be presented as RGB images compiled from brightest point projections of each channel. Open each stack and create brightest point projections. Close the parent stacks after creating the projections.

These projections are easily performed with the Confocal Macros. Create each projection in the order in which that channel should appear in the RGB channels, i.e. project the red channel first. Close each stack after creating its projection.

Create the RGB file in one two ways.

1. ‘Save as RGB Tiff’ macro:

  1. Use the ‘Stack to Windows’ command on each projection to create 3 image files;
  2. Use the ‘Windows to Stack’ command to create a stack with the 3 projections;
  3. Use the ‘Save as RGB Tiff’ macro to save the new stack as a 3 slice TIFF file.

 

 

2. Add slices to one stack.

  1. Go to one of the single slice projection results;
  2. Use the ‘Add Slice’ command to insert 2 new slices;
  3. Select each projection result image;
  4. Copy the result image;
  5. Select the appropriate blank slice;
  6. Paste the copied result image into the blank slice.

Correcting RGB Slice Order.

If the slice order is wrong, then use ‘Add slice’, ‘Select All’, ‘Copy’, ‘Paste’ and ‘Delete Slice’ commands to rearrange the order of the slices. This creates an additional slice to hold a temporary copy of one of the out of sequence slices. Copy the contents from one of the problem slices to the additional slice. Select the other out of sequence slice, copy it, then move to the its correct slice and paste the image. Copy the slice from the temporary position and paste it into its correct location. Delete the extra slice before saving the file.

Performing 3-Dimensional Projections in Object Image

Object Image creates projections through a volume using a ray tracing method. This method is also used in many commercial software programs sold for use with confocal images. Imagine a field of parallel rays passing through a stack of images containing pixel intensities that represent structures. Each ray projects a value onto a projection plane (your monitor screen). The projection value is based upon the values of the pixels through which the ray has passed and projection parameter settings. The volume projections display an apparent rotation as we change the angle at which the rays pass through the stack.

Be aware that this is not a volumetric rendering of voxels. While a rotational projection may simulate the appearance of a moving volume, you cannot create a new rotation from a rotational projection.

Projecting a Z-Series onto a single plane

This has an extremely useful benefit for confocal microscopy. A stack of Z-series sections are all in optimal focus. If projected onto a single image plane, all objects throughout the thickness of the imaged volume will now be in sharp focus and spatial relationships may be more evident. NIH Image versions 1.58 and later provide macro calls to perform projections. Macros to accomplish the common projections are included in the Confocal Macro file.

Single projections are commonly made through the Z-axis. However, any axis and arbitrary angle may be selected for manual projections. The projection macros invoke the Project command, Stacks Menu, with the following settings:

Initial Angle to 0;

Total Rotation to 0;

Rotation Angle Increment to 0;

Lower Transparency Bound to 0;

Upper Transparency Bound to 254;

Surface Opacity to 0;

Surface Depth-Cueing to 100;

Interior Depth-Cueing to 0;

Select Brightest Point for Projection Method;

The Axis of Rotation is irrelevant for this purpose.

A single projection through any angle may be created by setting the Initial Angle to any desired value, and leaving the Total Rotation and Rotation Angle Increment set to zero.

Finally, select either the X-Axis or Y-Axis to tilt the stack in the desired direction. An arbitrary setting in the Z-Axis only serves to rotate the image on the monitor.

 

 

Rotating Projections.

There are a number of parameters in the "Project" command under the Stacks Menu. Understanding their proper use is critical to obtaining acceptable results in Projections and Rotations.

Slice Spacing: Default is 1, integer values larger than 1 will replicate each slice that many times.

Angles are entered as integer or decimal values in the range of 0° to 360°.

Starting Angle: Sets the initial position of the stack by rotation relative to the Axis of Rotation. For example, an angle of 345° will give an apparent rotation of 15° back, relative to the angle of rotation. (See below)

Total Rotation: Defines the total rotation of the volume.

Rotation Angle Increment: The volume is projected onto the viewing plane at each increment from the starting angle. The total rotation divided by the increment determines the total number of projections needed to complete the rotation.

Example: Values of 330°, 60°, 5° will rotate the stack 330°, then make projections every 5°to span a total rotation of 60°, from 330° to 30°. The final stack will contain a total of 13 projections. If the images were 512x512, the resulting file will be approximately 3.5 Mb in size.

 

Axis of Rotation

Effect

X-Axis

The top swings away, rotating around the X-Axis

Y-Axis

The result rotates left to right, around the Y-Axis

Z-Axis

The result rotates clockwise, centered around the Z-Axis

Projection Method

Result

Nearest Point

Projects the nearest non-transparent point, rendering the nearest surfaces; provides little interior information

Brightest Point

Projects the brightest pixel encountered by each ray as it passes through the volume

Mean Value

Projects the arithmetic mean of all pixels encountered by each ray as it passes through the volume; useful for structures within a brighter volume

 

Settings affecting pixel values

These are more difficult to understand, yet are crucial to obtaining fullest benefits from projections in Object Image, or any other software.

Lowest Transparency Bound and Upper Transparency Bound.

These values establish thresholds, or a density slice interval, for a projection. All pixels having values outside of the range established by these two parameters will be ignored. It is best to check the histogram of several slices in the stack to learn the intensity range that defines the structures to be rendered. Alternatively, you can use density slicing to set these bounds and to view their effects as you step through the volume. Pixels selected by the density slice interval will be shown in red, then displayed in grayscale after rendering. The transparency bounds will automatically set to the density slice intervals when the projection is initiated.

The default values of 0 and 254 select all possible pixels in the stack. An advantage to the transparency bounds is that computations are only made on the selected pixels, which can greatly reduce rendering time.

The three following functions in the Project dialog box are expressed as values of 0-100%.

Surface Opacity (0-100)

When set to some value greater than zero, and either ‘Brightest Point’ or ‘Mean Value’ are selected, this parameter permits the weighted combination of Nearest Point with one of the other two projection methods. This enables viewing interior structures through translucent outer surfaces. The default value is zero to make the nearest point surface transparent.

Depth Cueing.

Adds perspective to increase the three-dimensional quality of projections. These parameters affect the relative brightness of surface pixels and interior pixels. The tradeoff for enhanced projections is that they no longer possess accurate densitometric values.

Surface Depth-Cueing (0-100).

Works only with Nearest Point projections and the Nearest Point component of Surface Opacity settings greater than zero. The default value is 100.

Interior Depth Cueing (0-100).

This works only with ‘Brightest Point’ projections.

The default setting is 50%, which may produce a "muddy"result. This is set to 0% in the Brightest Point Projection macro.

Minimize Window Size.

Saves memory by making projection windows as small as possible given the size of the volume and the axis of rotation. Leaving unchecked will cause projection windows to remain the same size as the parent stack.

 

 

 

 

 

Applications.

Stereo Images.

You easily make a quick and dirty stereo pair of images from a Z-series to view by 3 methods.

First, use the angle settings below, the same as used in the ‘Red-Green Stereo Pair’ macro, or use the macro. This will produce a new stack containing two images at an 8 degree increment for a vergent angle of 4 degrees for each eye.

Starting angle:

356

Total Rotation:

8

Increment:

8

 

  1. ‘Animate’ the stack, with the ‘Oscillating Movies’ option checked in Preferences, Options Menu, and the image will rock back and forth around the Y-axis.
  2. Create an RGB stack to either view through red-green glasses in a 24-bit application, or convert to an Indexed Color image.

c) Make a montage using the ‘Make Montage’ function from the Stacks Menu. Specify settings so that the 2 grayscale images are side by side. You can experiment with different values for the scaling factor. The smaller the scaling factor, the easier you will find it to fuse the images. Ideally, for people with limited experience in "Free Fusing" stereo pairs of images on the screen, matching points on the screen should be less than 50 millimeters apart. With further experience, you will be able to fuse larger images with matching points further apart.

Generating a 3D rotation from a Z-series.

This is a computationally intensive procedure. A fast PowerPC will prove very desirable when doing this operation. It is also advisable to limit the size of the rendered volume.

Limiting the dataset.

There are a number of methods by which a dataset can be limited to speed render times.

1) The most basic involve reducing physical dimensions of the stack by cropping or removing slices. This approach has the added benefit of reducing size of the dataset within the computer.

2) Limit the pixels rendered by using the transparency bounds. Pixels with intensities outside of the selected interval are ignored for ray tracing computations. Investigate the volume to determine the range of pixel intensities that form the structures. The easiest way is by activating density slicing.

3) An extremely useful method is to restrict rendering to a limited portion of the volume. Choose the rectangular selection tool from the Tool Palette and outline a small portion of the image. The 3D series will be restricted to that portion of the stack. It will complete the task much more rapidly.