Week 3: Eyes on the Ice
On this page
Intro to ImageJ 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.
Image stack saved as QuickTime movie (QuickTime must be installed on your computer to view. This is just an example don't worry if your computer can't view it.)
top of page
Create a Time-Series Stack with ImageJ
Download the data
- If you have not already done so, create a Week 3 directory or folder on your hard drive for this week's work. Create an Albedo folder within the Week 3 folder.
- Download the images below into the Albedo folder. Click the thumbnail to open the full size image in a larger window. Then right-click (Win) or control-click (Mac) to choose file Save Image As... Do not rename the files. Keep them as 01_albedo.jpg, 02_albedo.jpg, etc.
Create a stack from a sequence of images
- Launch ImageJ by double-clicking its icon
on your desktop or by clicking its icon in the dock (Mac) or Launch Bar (Win). - Choose File > Import > Image Sequence... and navigate to the Albedo folder where you stored the monthly images. Select the first image in the sequence and then click the Open button. Specify the Sequence Options and click OK.
- Choose File > Import > Image Sequence... and navigate to the Albedo folder.
- Select the first image in the sequence and then click the Open button.
- 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.
- All twelve images will be imported into a stack named Albedo. The individual images in a stack are called "slices" in ImageJ. The window's status bar shows the number of the current slice and total slices (in this case, slice 1/12 or 1 of 12), the width and height of the image in pixels, and the memory occupied by the stack, in this case 12 MB.
- Choose File > Save to save the stack as Albedo.tif.
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 pageExplore 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.
Animate the stack
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.
- Click and drag the scroll bar at the bottom of the stack window to move forward and backward through the stack. As you scroll through the stack, notice the changing slice counter and image label at the top of the stack window. Slice 1 is labeled 1/12, slice 2 is 2/12, and so on.
- You can also use the Next Slice (>) and Previous Slice (<) keyboard shortcuts to move forward and backward through the stack. Try each method of scrolling before going on.
- Choose Image > Stacks > Start Animation to animate the stack. The animation should look something like this.
- The animation is probably going too fast to see what's going on. To slow it down, choose Image > Stacks > Animation Options..., set the Speed to 5 frames per second, and click OK.
Drag the scroll bar at the bottom of the stack window to the right and left to scroll forward and backward through the stack.
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?
- 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.
- To delete a slice, flip to the slice you want to get rid of and choose Image > Stacks > Delete Slice.
top of page
Unstack and restack slices
- To unstack the slices into separate image windows, choose Image > Stacks > Stack to Images.
- To restack the images, choose Image > Stacks > Images to Stack.
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
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.
- Choose Image > Stacks > Make Montage.... Experiment with the various options in the Make Montage window to discover how each option affects the montage image.
- Choose Image > Stacks > Make Montage...
- 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.
- Here is what the montage should look like.
- Close all of the open image and stack windows before continuing.
Create and Explore More Stacks
- You can make a stack like the one above by downloading images at the NASA Earth Observations (NEO) Web site . Choose a dataset and download a series of images that might be useful for a topic you will be teaching. Then bring the images into ImageJ and animate them. Refer to Week 1, Getting to Know NEO for instructions on how to download NEO images. In the NEO Download Options box, be sure to Resize the images to a fixed resolution of 0.5 or 1.0 degrees, so your stack will be a manageable size. If you prefer, you an also create a stack from other images, such as the Earth Observatory, Worlds of Change collection.
- To share your stack with your colleagues in your discussion section, make a montage from your stack and save it as a Jpeg to post. Alternatively, you can save the stack as an Animated Gif and post that. Select File > Save As > and choose the file format for saving your stack. Then attach it to your post. Depending upon browser capability, most course participants should be able to see the animated gif playing when they click on the link to the file in your discussion thread.
- Posting either a jpeg montage of a stack you created or an animated gif along with a description is the required Tuesday 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.
This weekly activity is required and is due on Tuesday, February 16, 2010.
top of page
Explore More if You Have Time: Create a Stack from a Montage
What if you download a montage of two or more images combined in a single window, and want to turn them into a stack to animate them? The important thing to keep in mind is that all of the images need to be the same width and height to stack them.
- Click the thumbnail image at right to open the full size image in a new window. Then right-click (Win) or control-click (Mac) the image and choose File > Save Image As... to save it to your Week 3 folder. Keep its name as glacial_retreat.jpg.
- Launch ImageJ by double-clicking its icon
on your desktop or by clicking its icon in the dock (Mac) or Launch Bar (Win).
- Choose File > Open..., navigate to your Week 3 folder, and open the glacial_retreat.jpg image.
- Use the Rectangular selection tool
to carefully select a rectangle around the 2001 (bottom) glacier image. Then choose Image > Duplicate to create a new image window from your selection. - Click the Window menu and choose the original glacier image from the list of open windows at the bottom of the menu. (Be careful not to click on the image outside the rectangular selection. If you do, and accidentally cancel the rectangular selection, choose Edit > Selection > Restore Selection to bring it back.)
- Drag the selection rectangle up to the second glacier image and carefully align it with the edges of the 2003 image. You can nudge the selection rectangle a pixel at a time in any direction using the arrow keys on your keyboard.
- Choose Image > Duplicate to create a new image window from your selection. Then continue this process until you have duplicated all three glacier images.
- Close the original window containing the three glacier images.
- Choose Image > Stacks > Images to Stack. Flip through or animate your stack.
- Save your completed stack to your Week 3 folder.
- Close all of the open image and stack windows before continuing.
If you had difficulty creating or saving the stack, right-click (Win) or control-click (Mac) here (TIFF 1.3MB Feb13 10) and download the Glacial Retreat stack.
top of page
Resources
top of page
Movies on this Page
How to download movies
- Click the link to go to the SERC media library listing for the movie. The record will open in a new window.
- On the SERC media library page, right-click (Win) or control-click (Mac) the link (below the movie on the Flash version pages) to download the movie file to your hard drive.
Flash video versions
Download these versions to play on your computer. You'll need an appropriate movie player to view the file, such as Flash Player, Real Player (Mac / Win), or Adobe Media Player.
top of page
iPod versions
Download these version to play on your iPod or iPhone.




