Image Processing Toolbox User's Guide Previous page   Next Page

Multiframe Image Arrays

For some applications, you might need to work with collections of images related by time or view, such as magnetic resonance imaging (MRI) slices or movie frames.

The Image Processing Toolbox provides support for storing multiple images in the same array. Each separate image is called a frame. If an array holds multiple frames, they are concatenated along the fourth dimension. For example, an array with five 480-by-640 truecolor images would be 480-by-640-by-3-by-5. A similar multiframe grayscale or indexed image would be 480-by-640-by-1-by-5.

Use the cat command to store separate images in one multiframe array. For example, if you have a group of images A1, A2, A3, A4, and A5, you can store them in a single array using

You can also extract frames from a multiframe image. For example, if you have a multiframe image MULTI, this command extracts the third frame.

Note that, in a multiframe image array, each image must be the same size and have the same number of planes. In a multiframe indexed image, each image must also use the same colormap.

Multiframe Support Limitations

Many of the functions in the toolbox operate only on the first two or first three dimensions. You can still use four-dimensional arrays with these functions, but you must process each frame individually. For example, this call displays the seventh frame in the array MULTI.

If you pass an array to a function and the array has more dimensions than the function is designed to operate on, your results can be unpredictable. In some cases, the function simply processes the first frame of the array, but in other cases the operation does not produce meaningful results.

See the reference pages for information about how individual functions work with the dimensions of an image array.

Previous page  Converting Between Image Classes Reading and Writing Image Data Next page

© 1994-2005 The MathWorks, Inc.