ISLSCP logo  ISLSCP Initiative II  
Related Pages
ISLSCP Initiative II Home
    Archive User Tutorials
 

Tutorial: Decompressing and Viewing Images


This archive contains many image products which are compressed using the Zip compression software. This tutorial explains how to use Zip to decompress an image file, then how to display it using ImageJ, the Java-based image processing software from NIH (National Institute of Health).

 

Tutorials: Install Software | Configure Your Browser | The Interface | View Images

 

Using Zip to Decompress an Image File

Zip icon Most of the images have been compressed with the MS Windows-standard Zip compression scheme. These files were compressed using Aladdin's DropZip on a Macintosh. DropZip uses the Lempel-Ziv algorithm, also used in Zip and PKZIP programs. The compressed files may be uncompressed using PKZIP (with the -expand option) on MS Windows and UNIX, or with StuffIt Expander on the Mac OS.

  1. Zip must be correctly installed on your computer. Click here for instructions on how to install Zip.

  2. Your browser must also be configured to allow it to call Zip automatically. Click here for instructions on how to link Zip to Your Browser.

  3. Within your browser, select an image to decompress and view. In this case, we've selected a Sea Ice Extent Map image (the file "sea_ice_map_1deg.zip"). Clicking on this image downloads the file to your computer, to whatever directory your browser uses to store your downloaded files.
    Sea Ice file list window

  4. Once the image file is downloaded, your Zip program starts up and decompresses the image, usually storing it in the same location as the downloaded compressed file.

 

Reading the "readme.txt" File

Stored with all the images is a file that ends in "...readme.txt". This file contains information on each image type, and also information on the format of the decompressed images. More information on the images can always be found in the documentation file, but the "...readme.txt" file contains the basic information needed to view the images.
      Clicking on the "0_sea_ice_extent_readme.txt" file listing in your browser displays the file. It contains the following information on the decompressed Sea Ice Extent Maps:
Data Format #2 (ASCII Map)
--------------------------
The second format of the data is monthly ASCII maps. These files are in the 
"sea_ice_map" directory.The data was projected, point by point, onto a base
land/sea map, where water is -99 and land is -88. The other values are the
monthly monthly sea ice concentration for that cell, 0 to 100 percent. These
map files are available in 3 different scales: 1 degree (1deg) 360 columns (X)
by 180 rows (Y), half degree (hdeg) 720 columns (X) by 360 rows (Y), 
and quarter degree (qdeg) 1440 columns (X) by 720 rows (Y). The files are named:

    sea_ice_map_1d_19860100.asc  (example name for January 1986 sea ice map, 1 degree)

The data files have all been compressed in PKZip archives by resolution.

We have downloaded file "sea_ice_map_1deg.zip", uncompressed it into the folder "sea_ice_map_1deg" which contains 10 yearly folders for 1986-1995, each of which contains 12 monthly map files named like "sea_ice_map_1d_19860100.asc". The important information is that the image contains 360 values per line and 180 lines per image.

 

Using ImageJ to View an ASCII Image

ImageJ icon ImageJ is a public-domain Java-based image processing package developed by the National Institute of Health (NIH). It runs on any computer with a Java 1.1 or later virtual machine. Versions of ImageJ for Macintosh, Windows95 (and above), and UNIX systems are included on this Web site. ImageJ can view ASCII (text) images, with numbers separated by spaces. If the files are properly prepared, then ImageJ will read them easily. If they have extra spaces at the end or improper end-of-line characters, then ImageJ will display an empty box.

WARNING: There is a bug in ImageJ that makes it read numbers stored in "E-notation" (e.g. "1.2345E+02") improperly.
It ignores the "E" and the exponent, reading just the number. Thus "1.2345E+02" is read as "1.2345" instead of "123.45".

  1. ImageJ must be correctly installed on your computer. Click here for instructions on how to install ImageJ.

  2. Start ImageJ and access the "File -> Import -> Text Image..." menu item.

  3. ImageJ will display a standard "Open" dialog box where you select the ASCII image you would like to view, then you click on the "Open" button.

  4. ImageJ will automatically compute the size of the image and display it in grayscale.

  5. You can now add false color to the image using the "Image -> Lookup Tables" menu item (near the bottom). The "Fire" palette is a good choice to view images in.
    Sea Ice map image

  6. Using the "File -> Save As" menu item, you can now save the image in a variety of standard formats, including GIF, JPEG, Raw, Text, etc.

 

Making a Movie From Multiple ASCII Images

ImageJ icon ImageJ can be used to load and view a time-series of images, viewing them automatically frame-by-frame as a movie. This series of images can then be saved as a QuickTime movie to your hard drive for later viewing.

  1. ImageJ must be correctly installed on your computer. Click here for instructions on how to install ImageJ.

  2. There are plugins stored with ImageJ in the "plungins.zip" file which, once installed in ImageJ, will allow you to save this stack as a QuickTime movie. Make sure the "plugins" directory is placed in the "ImageJ" directory before you start the program.

  3. Start ImageJ and open your first ASCII image file using the "File -> Import -> Text Image..." menu item to select and display the first file.

  4. ImageJ will display the image in grayscale. You can now add false color to the image using the "Image -> Lookup Tables" menu item (near the bottom). The "Fire" palette is a good choice to view images in.

  5. Now repeat the following steps with each additional image until you have a filled stack of images. You can use the slider bar at the bottom of the window to step manually between the images. Always make sure you are looking at a blank slice when you paste in the next image.

    1. Using the "Image -> Stacks -> Add Slice" menu item, you can now add a blank "slice" (a blank movie frame) to your initial image. A slider bar will appear at the bottom, allowing you to toggle between the two images (the first image and the blank). The image number will also appear at the top-left of the window: "2/2" means you are looking at the second image of two.

    2. Using the "File -> Import -> Text Image..." menu item, select and open the next ASCII image. The image will open in a new window.

    3. Use the "Edit -> Copy" menu item to copy the image. Then close the window containing the new image. Then click on the original image (the one with the blank slice) and use the "Edit -> Paste" menu item to paste the image into the blank slice. The new image will take on the color pallete of the original.
      Sea Ice maps, image stack

      ALTERNATE STEPS:
    1. Open all of the images you wish to include in the image stack, one on top of the other, first to last.

    2. Use the "Plugins -> Stacks -> Stack Builder" menu item to automatically take all of the open images and create an image stack from them.

  6. Once your stack of images is complete, you can use the "Image -> Stacks -> Start Animation [=]" menu item to view the stack of images like a movie. You can adjust the speed of the movie by using the "Image -> Stacks -> Animation Options..." menu item (lower numbers make the movie run slower -- I like to use "2").

  7. Use the "Plugins -> QuickTime -> QT Movie Writer" menu item. First, it will open a Save Dialog box allowing you to choose what to name your movie and where to save it. Then it will open a new "Compression Settings" window (shown below) asking you to enter some settings that will affect how your movie will look and run.
    1. Make sure the top popup menu is set to "Video".
    2. Set the "Quality" slider to the right for the "best" quality.
    3. Enter the "Frames per second" number. The lower the number the slower the movie will run. I like to use "2".
    4. Uncheck the check box for "Key frames every __ frames". This will give you the best picture quality for your movie.
    5. Click on "OK" and your movie will be saved.
      QT Movie Writer plugin settings window

  8. You can now run the movie using the free QuickTime Player from Apple Computers Inc. (download it from http://www.apple.com/quicktime/download/ [Internet Link]).

    Global Sea Ice (1 degree) QT Movie, Jan 1985 to Dec 1986.
    [Press the 'Play' triangle button on the lower-left to view the movie]

 

Tutorials: Install Software | Configure Your Browser | The Interface | View Images

 

Related Pages:
    ISLSCP Initiative II Home
        Archive User Tutorials
            Tutorial: Installing the Software
            Tutorial: Configuring Your Browser
            Tutorial: Using the Interface
            Tutorial: Decompressing and Viewing Images

Revision Date: May 3, 2005