Week 3: Eyes on the Ice

 

top of page

Intro to ImageJ Stacks

 

Intro to Stacks

 

What is a stack?

 

ImageJ can display two or more images in a single window, as a stack. The images or layers that make up a stack are called slices. Stack windows have a scroll bar across the bottom to cycle through the slices, and you can animate the images at a speeds from one frame every 10 seconds to over 1000 frames per second. Many operations, such as selecting, filtering, thresholding, and contrast enhancement can be applied to all slices in a stack.

To stack a set of images, they must all be the same width, height, and bit depth. The number and size of the images you can stack depend on the amount of memory in your computer.

 

top of page

What are stacks used for?

 

Stacks are used to display and analyze images that are related to each other in some way, such as by time (temporal), space (spatial), or color (spectral). Stacking temporal images allows you to animate them to rapidly display them in sequence making changes over time easier to see and understand, and allowing you to precisely measure the same regions of the image over time. Stacks of spatial data can be animated and measured, but you can also use ImageJ to construct entirely new views of features in the images. Using spectral data, you can use ImageJ to create both natural and false color views of a scene.

The Lake Mead satellite images that you stacked and animated in Week 2 are an example of a time series data set. They represent data collected for the same region but at different times. Stacking these images helped you to visualize changes in the lake over time and to make measurements. An advantage of stacking images to make measurements is that when you select an area to measure on one slice of the stack, that selection automatically applies to all slices in the stack. This guarantees that you are measuring the exact same part of the image in every slice. Also, processes such as thresholding apply to all of the slices of the stack.

Stacks can be saved in several formats, including animated gif for web display and, with the appropriate software installed, QuickTime movie format.

 

top of page

Create a Time-Series Stack with ImageJ

 

 

Download the data

 

 

top of page

Create a stack from a sequence of images

  1. Choose File > Import > Image Sequence... and navigate to the Albedo folder.
  2. Select the first image in the sequence and then click the Open button.
    Open Image Sequence Box
  3. Specify the Sequence Options. Use all twelve slices, beginning with the first slice and incrementing by one. Do not scale the images. Check the Sort Names Numerically option and click OK.
    Sequence Options  Box

 

If you had difficulty creating or saving the stack, right-click (Win) or control-click (Mac) here (TIFF 8.9MB Jan13 10) and download the Albedo stack.

 

top of page

Explore Basic Stack Functions

 

The albedo images from January 2009 through December 2009 are now assembled into a stack.

These images were downloaded from the NASA Earth Observations (NEO) site that you visited in Week 1. The images show how much sunlight Earth reflects (its albedo) during the course of a year. Albedo is derived from the Latin word "albus" for white. It is the percentage of solar (shortwave or ultraviolet) radiation reflected by a given surface on Earth. The range can be as little as 3% for water with light shining on it to as high as 95% for fresh snow cover. This reflected energy is measured in Watts per square meter (W/m^2 - the amount of energy per square meter). Higher values indicate more reflectance. Lower numbers represent areas of less reflectance.

 

top of page

Animate the stack

Albedo Stack image

 

You can step through a stack one slice at a time, or you can animate it like a repeating movie loop. ImageJ lets you control the speed of the animation, so you can show it at a speed that is best suited for viewing.

  1. Choose Image > Stacks > Tools > Start Animation to animate the stack.
  2. The animation is probably going too fast to see what's going on. To slow it down, choose Image > Stacks > Tools > Animation Options....
    Animation Options in ImageJ
  3. The Animations Options window opens. Set the Speed to 5 frames per second, and click OK.
    Animation Options Window in ImageJ

 

Movie Icon


Experiment with changing the speed of the animation, carefully observing the albedo changes that occur during the year.

 

top of page

Add and delete slices

 

What if you need to add or remove a slice from a stack?

  1. Click on the stack to stop the animation. Flip through the stack to where you want to add the new slice. Choose Image > Stacks > Add Slice.
    add_delete_1
  2. A new slice is added. Notice how the slice counter displays 5/13, indicating you are now on slice 5 of 13 slices.
    add_delete_2

 

Movie Icon

 

 

top of page

Unstack and restack slices

 

  1. To unstack the slices into separate image windows, choose Image > Stacks > Stack to Images.
    unstack_stack_1
  2. Each slice of the stack is now in its own window.
    unstack_stack_2

 

Movie Icon

 

 

top of page

Interpret Your Results

 

As you and your students explore time-series images, think about the patterns that you are observing. What do they mean? What do the data show?

 

 

top of page

Create a Montage from a Stack

ImageJ Montage

Stacks are great on your computer screen, but how do you represent the image series in a printed report? The solution is to create a montage rows and columns of thumbnail images on a single page to save and import into your report.

  1. Choose Image > Stacks > Make Montage... make_montage_1
  2. The Make Montage window opens. Enter 3 for the number of Columns, 4 for rows, and .50 for the Scale Factor. Make the First Slice 1 and the Last Slice 2. Increment the montage by 1. Use 2 for the Border Width and 10 for the font size. Check Label Slices and click OK. make_montage_2
  3. Here is what the montage should look like. make_montage_3



Movie Icon

 

top of page

Create and Explore More Stacks

 

  1. To save a stack as an animated gif, choose File > Save As > Animated GIF (Near the bottom of the menu - don't use GIF near the top of the menu.)
  2. To open a stack in ImageJ that has been saved as an animated gif, choose File > Import > Animated GIF.
  3. Posting either a jpeg montage of a stack you created or an animated gif along with a description is the required Thursday posting for this week. You should also post ideas about how you might use it or similar animations to teach change-related concepts or other processes to your students.
  1. Choose File > Open..., navigate to your Week 3 folder, and open the glacial_retreat.jpg image.
    montage_to_stack_1
  2. Use the Rectangular selection tool Rectangular Selection Tool to carefully select a rectangle around the 2001 glacier image. Then choose Image > Duplicate to create a new image window from your selection.
    montage_to_stack_2