J. Dorman 02/21/02

Protocol for

Processing 3-color Z series

taken on the Keck Leica confocal TCS SP/MP

with the “new” Leica software

(=version 2.00 Build 0477)

using ImageJ

 

Goals:

A)     to make a 3-color stack showing a z-series

 

B)  to save this stack as a quicktime movie for use in Power Point presentations

 

C)     to make single color stacks and quicktime movies

 

D)    to adjust levels of individual colors in individual slices.

 

Software required (at least on a Mac running OS 9.1):

 

 

Image J in turn requires the following programs  (advice adapted from the Image J Readme file):

The "Capture Video...", "QuickTime Movie..." and "Pict..." commands in the File/Import submenu and the File/Save As/QuickTime Movie... command are preinstalled plugins that require QuickTime for Java, which is preinstalled on Mac OS 9.04 and later. With older systems, you must install it by selecting "QuickTIme for Java" in the "Custom" install option of the QuickTime 4 (or 5) installer.  (For 5 at least) successful installation is indicated by the presence of the file "QTJava.zip" in the System Folder:Extension:MRJ Libraries: MRJClasses folder.

 

Also required are  the following plug-ins, avail from Image J’s plugins website:   http://rsb.info.nih.gov/ij/plugins/index.html


1.  Saving data in the new Leica software:

 

A.  General note on data format:  It is a good idea to save your data in two ways.  (However, for this protocol, all you really need are the .tif files, saved by method 2 below).:

1.   raw data, because some useful macro may someday require it, and because you can use it as a backup. 

To save your data as raw, when you save your experiment, select the file format: Series with “raw” files (lei).

 2.   tif data, because this is easiest to work with in image processing programs like ImageJ.  ImageJ can open a single raw file, but can open multiple tif files at once (see section 2A below).

The most useful versions of your files to save as .tifs  are the RGB overlays.  To generate the overlays, follow the procedure B below.  Then save the experiment anew, using the save as button and a slightly different experiment name, and select the file format: series with “tif” files (lei).

 

B.  How to generate/ save Overlays:

After taking a 3-color z series,

In the display window,press the RGB Overlay button to make the RGB overlay visible in one quadrant (if it already is, you dont need to press it again).

When you can see the RGB overlay, press the  gallery button once.

You should see the whole z series represented by little threecolor thumbnails of your images.

With the mouse in the RGB Overlay quadrant of the screen, hold the right mouse button down and select Send to > Experiment > Selection (raw)

After doing this you will see a new document called Overlay in your experiment contents list.

When you save the experiment this time (see notes in section 1A for more info), choose the format:            Series with “tif” files (lei)

 

2.  Back at your Mac:

When you open up the folder of images, you will see each slice of the z series saved as an overlay.  These are RGB tiffs.  On my computer they appear as quicktime icons.

 

A.  To make a three color stack:

You need to put all of the overlay slices from a single z series in a separate folder.

Then start Image J v.1.26.

File/Import/Image Sequence

Choose the Overlay file representing the first slice of the z series; this import/image sequence command opens all of the files after it in the same folder into a single stack  (hence the need to enclose each z series in its own folder.)

Hit ok when the “sequence options” dialog box appears (default options work for my 512 x 512 images).

This import process may take a while, during which you will see a progress bar advancing under the Image J tool bar. 

When the progress bar stops moving you should see a window with your threecolor stack in it.

You can page through the images in the stack by the > (to go forward) or < (to go back) keys.  Note: not the arrow keys.

 

Note on problem with file numbering/ordering:

If your Z series contains more than a hundred slices, you may run into problems with the order in which imageJ imports the files.  This is because Leica designates z slices under 100 with two digits at the end of the filename, eg _z01, _z02, and zslices over a hundred with three digits, eg _z100.  ImageJ sometimes puts a z series of more than a hundred slices in the following order:.. z09, z10, z100, z101,....z109, z11 (putting all the numbers starting with z10 together,nincluding 101, 102, etc, and then all the numbers starting with z11, etc).  It's pretty hard to make a coherent movie with your z slices in that scrambled order. 

 

My rather clunky solution is to manually add a third zero to the two digit  z slice numbers.  Eg change z10 to z010.  However adding the zeros manualy gets old in a hurry (does anyone happen to know of some utility / shareware that would do this?)

 

B.  To save this RGB stack as a quicktime movie:

From the Image J Plugins menu, choose QT Movie Writer

In the next dialog box, select desired quicktime options

 

Initially the quicktime movies I saved in this fashion were flawed (one giveaway is  a .mov file size of zero K).  This problem went away after I increased the memory alloted to the Image J program from the suggested size of 1024k to a min of 2000 and a max of 10,000k.  I believe the memory allotment needs to be at least as big as the size of the QT movie you’re trying to create.    [However, more memory is not always better: read the following excerpt of Wayne Rasband’s v1.26 ReadMe file:  “Java applications allocate memory from the System heap so there is usually no need to increase the value of "Preferred Size" in ImageJ's "Get Info" dialog. Strangely enough, allocating more memory to ImageJ reduces the amount of memory available for loading images! It may, however, be necessary to allocate more memory to ImageJ to avoid error messages with plugins that use QuickTime for Java. The Finder's "About This Computer" window is a good way to monitor ImageJ's memory usage.”]

 

The resulting .mov file can be inserted into a powerpoint slide by opening Power Point and Insert/Movie From File and then choosing the desired animation options

 

Powerpoint tip: if the slide presentation is moved to a new computer, the movies will probably have to be reinserted and reanimated, so make a practice of saving all the movies for a presentation in an associated folder that’s easy to move along with the presentation.

 


C.  To split an RGB stack into the component red green & blue stacks:

choose Plugins/ RGB Stack Splitter.

You will now see three greyscale stacks representing each of the three color channels, named Red (Stack) etc.

 

These can be saved  1)  as quicktime movies, by the same method as above, or

2) as stacks that you can work with in Image J 1.26 or NIH Image v1.62f.

To save as a stack, I recommend File/Save as/Tif, which saves the red stack, eg, as a single file that you can reopen in both Image J 1.26  or NIH Image v1.62f.

 

D.  To adjust brightness/ contrast levels of colors in your z series:

To make adjustments to the levels of one or more colors in one or more slices, you can take the quick and dirty or a more subtle approach:

 

1.  Quick and dirty:

Image J has only a crude brightness/contrast adjustor.  However it has the advantage of allowing you to change the B/C of all the images in the stack, (unlike Photoshop, where you have to adjust them one by one*).

To adjust B/C in Image J, select Image/Adjust/Brightness Contrast

Move sliders til satisfied, press Apply button.

When asked, choose whether you’d like changes to apply to whole stack or single slice.

 

2.  Subtle changes:

Open these RGB tiff overlay files one by one* in Photoshop 6.0, then use Image/Adjust/Levels (and select appropriate color channel from button whose default setting is RGB) to fine-tune the color balance.

 

Remaking a stack with adjusted slices:

After adjusting a file and saving it as a tiff in photoshop, it will now appear as a photoshop tiff file. 

It can still be opened by Image J’s Import Sequence command (that command has no problem importing a mix of files adjusted and not adjusted in photoshop).  So now you can remake your three color stack (see A, above) and see how it looks!

 

 

 

*unless you figure out some way to batch automate the B/C adjustment process in Photoshop.  But no automated adjustment will be as discriminating as your eye is.

 

 

Final note:  I highly recommend the ImageJ listserv site, which includes a searchable archive of postings containing all sorts of tips on the software:

http://list.nih.gov/archives/imagej.html

 

 Comments and corrections welcome:   jdorman@u.washington.edu