Previous Object Programming: Working with Image Objects Next

Image Tiling

The IDLgrImage object supports tiling, which lets you display images that are too large to be read entirely into memory. For example, some satellite images can be over a gigabyte in size, which is impossible to fit into memory and display as a single unit on a typical computer. However, it can be displayed by segmenting it into smaller, more manageable image tiles.

When tiling is enabled for an IDLgrImage object, the image is initially created without any data. The image pixels are only loaded when a tile section comes into view through panning. Also, you can create an image pyramid to support level-of-detail (LOD) rendering for large images. This changes the resolution of an image when you zoom in or out within an image display. As you zoom out, successively smaller, less detailed images can be displayed. This quickly provides a full view of the larger image, lets you choose an area of interest, and zoom in on that area. As you zoom in, progressively detailed image layers can be loaded. The IDLgrImage object is aware of the LOD required and will communicate that to the application when the application requests the tile visibility information. See the following sections for more tiling information:

Image Pyramids

The use of image tiling and image pyramids supports the display of high-resolution images with a high level of performance. An image pyramid consists of a base image and a series of successively smaller sub-images, each at half the resolution of the previous image. The following figure shows the base image and successively smaller sub-images. The sub-images corresponds to lower resolution levels.

Figure 4-20: Image Pyramid

Figure 4-20: Image Pyramid

Creating Image Pyramids

You have two options if your image file does not already contain an image pyramid:

Image Tiles

Tiling an image segments it into a number of smaller rectangular areas called tiles. If you are using a JPEG2000 image, the tile size is defined in the image, and you should use this value when creating the IDLgrImage object. If you are creating your own image pyramid, which does not have an inherent tile size defined, it is recommended that you accept the default tile size of the IDLgrImage object (1024 by 1024 pixels).

The size of the drawing area, the tile size, and the image level all play a part in the display of a tiled image. With a large, full-resolution image, only a portion of it appears in the view, so only a subset of the image tiles are displayed. In the following figure, the full-resolution, level 0 image is shown on the left. Only two of the 1024 by 1024 tiles are loaded to support what is shown in the 800 by 800 pixel drawing area, indicated by the dotted box.

Figure 4-21: Dotted Box Showing Size of Drawing Area and Visible Tiles

Figure 4-21: Dotted Box Showing Size of Drawing Area and Visible Tiles

If you zoom out to a zoom level of 50% or less, IDL can show the level 1 image (which is half the resolution of the level 0 image). Only a single tile is required to fill the drawing area. If you reduce the zoom level by another 50%, the level 2 image can be displayed, and the entire image is visible in the drawing area.

  IDL Online Help (June 16, 2005)