Using the ERDAS IMAGINE Viewer

Producer Field Guide

Producer Field Guide

The Viewer is a window for displaying raster, vector, and annotation layers. In ERDAS IMAGINE ribbon Workspace, the Viewer types are:

  • 2D View displays raster, vector, and annotation data in a 2-dimensional view window.
  • 3D View renders 3-dimensional DEMs, raster overlays, vector layers, and annotation feature layers.
  • Map View is designed to create maps and presentation graphics.

You can open as many Viewer windows as their window manager supports.

The more Viewers that are opened simultaneously, the more RAM memory is necessary.

The Viewer not only makes digital images visible quickly, but it can also be used as a tool for image processing and raster GIS modeling. Uses of the Viewer are listed briefly in this section, and described in greater detail in other topics.


ERDAS IMAGINE does not use the entire colormap because there are other applications that also need to use it, including the window manager, terminal windows, or a clock. Therefore, there are some limitations to the number of colors that the Viewer can display simultaneously, and flickering may occur as well.

Color Flickering

If an application requests a new color that does not exist in the colormap, the server assigns that color to an empty colorcell. However, if there are not any available colorcells and the application requires a private colorcell, then a private colormap is created for the application window. Since this is a private colormap, when the cursor is moved out of the window, the server uses the main colormap and the brightness values assigned to the colorcells. Therefore, colors in the private colormap are not applied and the screen flickers. Once the cursor is moved into the application window, the correct colors are applied for that window.


When a raster layer or layers are displayed, file pixels may be resampled for display on the screen. Resampling is used to calculate pixel values when one raster grid must be fitted to another. In this case, the raster grid defined by the file must be fit to the grid of screen pixels in the Viewer.

All Viewer operations are file-based. So, any time an image is resampled in the Viewer, the Viewer uses the file as its source. If the raster layer is magnified or reduced, the Viewer refits the file grid to the new screen grid.

The resampling methods available are:

  • Nearest Neighbor—uses the value of the closest pixel to assign to the output pixel value.
  • Bilinear Interpolation—uses the data file values of four pixels in a 2 × 2 window to calculate an output value with a bilinear function.
  • Cubic Convolution—uses the data file values of 16 pixels in a 4 × 4 window to calculate an output value with a cubic function.

These are discussed in detail in Rectification.

Preference Editor

Use Preference Editor to set parameters for the Viewer that affect the way the Viewer operates.

See ERDAS IMAGINE Help for Preference Editor for information on how to set preferences for the Viewer.

Pyramid Layers

Sometimes a large image file may take a long time to display in the Viewer or to be resampled by an application. Use the Compute Pyramid Layer option to display large images faster and allow certain applications to rapidly access the resampled data. Pyramid layers are image layers which are copies of the original layer successively reduced by the power of 2 and then resampled.

IMAGINE native pyramid layers, IMAGINE Photogrammetry, and Stereo Analyst pyramid layers are generated with a reduction factor of 2; however, each uses different filters and different layer options.

The Compute Pyramid Layers option in IMAGINE has three options for continuous image data (raster images): 2x2, 3x3, or 4x4 kernel size filtering methods. The 3x3 kernel size is recommended for IMAGINE Photogrammetry and Stereo Analyst photogrammetry functions.

IMAGINE Photogrammetry and Stereo Analyst pyramid layers as well as the 3x3 kernel are discussed in Image Pyramid.

A 2 x 2 kernel calculates the average of 4 pixels in a 2x2 pixel window of the higher resolution level and applies the average to one pixel for the current level of pyramid. The filter can be represented as:


The computation is simple, resulting in fast pyramid layer processing time. This kernel is suitable for image visual observation, however it can result in a high degree of smoothing or sharpening which is not necessarily desirable for digital photogrammetric processing.

A 4 x 4 kernel uses 16 neighboring pixels of the higher resolution level to arrive at one pixel for the current pyramid level. The processing time for this method is much longer than the others, since the computation requires a greater number of pixel operations and is based on double precision arithmetic. This method is not recommended for multi-resolution image matching. (Wang, Y. and Yang, X. 1997)

If the raster layer is thematic, then it is resampled using Nearest Neighbor method.

See Rectification for more information on Nearest Neighbor.

The number of pyramid layers created depends on the size of the original image. A larger image produces more pyramid layers. When the Compute Pyramid Layer option is selected, ERDAS IMAGINE automatically creates successively reduced layers until the final pyramid layer is as small as a block size of 64 x 64 pixels. The default block size is 512 × 512 pixels.

Pyramid layers are added as additional layers in the image file. However, these layers cannot be accessed for display. The file size is increased by approximately one-third when pyramid layers are created. The actual increase in file size can be determined by multiplying the layer size by this formula



n = number of pyramid layers

This equation is applicable to all types of pyramid layers: internal and external.

Pyramid layers do not appear as layers which can be processed: they are for viewing purposes only. Therefore, they do not appear as layers in other parts of ERDAS IMAGINE software.

SHARED Tip The Image Files (General) category of Preference Editor contains a preference for Initial Pyramid Layer Number. By default, the value is set to 1. This means that all reduced pyramid layers generated are retained.

Pyramid layers can be deleted in Image Metadata dialog. However, when pyramid layers are deleted, they are not deleted from the image file; therefore, the image file size does not change, but ERDAS IMAGINE utilizes this file space, if necessary. Pyramid layers are deleted from viewing and resampling access only - that is, they can no longer be viewed or used in an application.

Pyramid Layer Sizes Per Layer


For example, a file that is 4K × 4K pixels could take longer to display when the image is fit to the Viewer. The Compute Pyramid Layers option creates additional layers successively reduced from 4K × 4K, to 2K × 2K, 1K × 1K, 512 × 512, 128 × 128, down to 64 × 64. ERDAS IMAGINE then selects the pyramid layer size most appropriate for display in the Viewer window when the image is displayed.

SHARED Tip Compute Pyramid Layers option is available in Image Metadata dialog and Edit Image Metadata dialog.

For more information about .img format, see Raster Data.

External Pyramid Layers

Pyramid layers can be either internal or external. If you choose external pyramid layers, they are stored with the same name in the same directory as the image with which they are associated, but with the .rrd extension. For example, an image named tm_image1.img has external pyramid layers contained in a file named tm_image1.rrd.

The extension .rrd stands for reduced resolution data set. You can delete the external pyramid layers associated with an image by using Image Metadata dialog. Unlike internal pyramid layers, external pyramid layers do not affect the size of the associated image.

Some raster formats create internal pyramid layers by default and may not allow applications to control pyramid layers. This case will ignore your Pyramid Layer Preference settings.


A display is capable of viewing only a limited number of colors simultaneously. For example, an 8-bit display has a colormap with 256 colorcells, therefore, a maximum of 256 colors can be displayed at the same time. If some colors are being used for auto update color adjustment while other colors are being used for other imagery, color quality degrades.

Dithering lets a smaller set of colors appear to be a larger set of colors. If the desired display color is not available, a dithering algorithm mixes available colors to provide something that looks like the desired color.

For a simple example, assume the system can display only two colors: black and white, and you want to display gray. This can be accomplished by alternating the display of black and white pixels.

Example of Dithering


In the figure above, dithering is used between a black pixel and a white pixel to obtain a gray pixel.

The colors that the Viewer dithers between are similar to each other, and are dithered on the pixel level. Using similar colors and dithering on the pixel level makes the image appear smooth.

Dithering allows multiple images to be displayed in different Viewers without refreshing the currently displayed images each time a new image is displayed.

Color Patches

When the Viewer performs dithering, it uses patches of 2 × 2 pixels. If the desired color has an exact match, then all of the values in the patch match it. If the desired color is halfway between two of the usable colors, the patch contains two pixels of each of the surrounding usable colors. If it is 3/4 of the way between two usable colors, the patch contains 3 pixels of the color it is closest to, and 1 pixel of the color that is second closest. The figure below shows what the color patches would look like if usable colors were black and white and the desired color was gray.

Example of Color Patches


If the desired color is not an even multiple of 1/4 of the way between two allowable colors, it is rounded to the nearest 1/4. The Viewer separately dithers the red, green, and blue components of a desired color.

Color Artifacts

Since the Viewer requires 2×2 pixel patches to represent a color, and actual images typically have a different color for each pixel, artifacts may appear in an image that has been dithered. Usually, the difference in color resolution is insignificant, because adjacent pixels are normally similar to each other. Similarity between adjacent pixels usually smooths out artifacts that appear.

Viewing Layers

The Viewer displays layers as one of the following types of view layers:

  • annotation
  • vector
  • pseudo color
  • gray scale
  • true color

Annotation View Layer

When an annotation layer (xxx.ovr) is displayed in the Viewer, it is displayed as an annotation view layer.

Vector View Layer

A Vector layer is displayed in the Viewer as a vector view layer.

Pseudo Color View Layer

When a raster layer is displayed as a pseudo color layer in the Viewer, the colormap uses RGB brightness values for the one layer in the RGB table. This is most appropriate for thematic layers. If the layer is a continuous raster layer, the layer would initially appear gray, since there are not any values in the RGB table.

Gray Scale View Layer

When a raster layer is displayed as a gray scale layer in the Viewer, the colormap uses brightness values in the contrast table for one layer. This layer is then displayed in all three color guns, producing a gray scale image. A continuous raster layer may be displayed as a gray scale view layer.

True Color View Layer

Continuous raster layers should be displayed as true color layers in the Viewer. The colormap uses the RGB brightness values for three layers in the contrast table: one for each color gun to display the set of layers.

Viewing Multiple Layers

It is possible to view as many layers of all types (with the exception of vector layers, which have a limit of 10) at one time in a single Viewer.

To overlay multiple layers in one Viewer, they must all be referenced to the same map coordinate system. The layers are positioned geographically within the window, and resampled to the same scale as previously displayed layers. Therefore, raster layers in one Viewer can have different cell sizes.

When multiple layers are magnified or reduced, raster layers are resampled from the file to fit to the new scale.

Overlapping Layers

When layers overlap, the order in which the layers are opened is very important. The last layer that is opened always appears to be on top of the previously opened layers.

In a raster layer, it is possible to make file values of zero (0) transparent in the Viewer, meaning that they have no opacity. Thus, if a raster layer containing zeros is displayed over other layers, the areas containing the zero values will instead show the underlying layers.

Opacity is a measure of how opaque, that is, solid or transparent, a color displays in a raster layer. Opacity is a component of the colorspace of categorical data displayed in pseudo color, or in the fill style of annotation, AOI, and vector layers.

By changing the opacity, you can compare two or more layers of raster data that are open in a View. Opacity can be set at any value in the range of 0% to 100%.

  • 100% opacity means that a color is completely opaque. Underlying layers cannot be seen.
  • 50% opacity means some of the top layer color shows, and some of the underlying layer shows through. The effect is like looking at the underlying layers through a colored fog.
  • 0% opacity means underlying layers will show completely.

By changing the opacity, you can compare two or more layers of raster data that are displayed in a single Viewer. Opacity can be set at any value in the range of 0% to 100%. Use the Contents Panel to restack layers in a Viewer so that they overlap in a different order, if needed.

Non-Overlapping Layers

Multiple layers that are opened in the same Viewer do not have to overlap. Layers that cover distinct geographic areas can be opened in the same Viewer. The layers are automatically positioned in the Viewer window according to their map coordinates, and are positioned relative to one another geographically. The map coordinate systems for the layers must be the same.

Zoom and Roam

Zooming enlarges an image on the display. When an image is zoomed, it can be roamed (scrolled) so that the desired portion of the image appears on the display screen. Any image that does not fit entirely in the Viewer can be roamed and/or zoomed. Roaming and zooming have no effect on how the image is stored in the file.

The zoom ratio describes the size of the image on the screen in terms of the number of file pixels used to store the image. It is the ratio of the number of screen pixels in X or Y dimension to the number that are used to display the corresponding file pixels.

A zoom ratio greater than 1 is a magnification, which makes the image features appear larger in the Viewer. A zoom ratio less than 1 is a reduction, which makes the image features appear smaller in the Viewer.

  • Zoom ratio 1 - each file pixel is displayed with 1 screen pixel in the Viewer
  • Zoom ratio 2 - each file pixel is displayed with a block of 2 × 2 screen pixels. Effectively, the image is displayed at 200%
  • Zoom ratio 0.5 - each block of 2 × 2 file pixels is displayed with 1 screen pixel. Effectively, the image is displayed at 50%

ERDAS IMAGINE can use floating point zoom ratios, so that images can be zoomed at virtually any scale (that is, continuous fractional zoom). Resampling is necessary whenever an image is displayed with a new pixel grid. The resampling method used when an image is zoomed is the same one used when the image is displayed, as specified in Open Layer dialog. The default resampling method is Nearest Neighbor.

Zoom the data in the Viewer by scrolling the mouse wheel, or using zoom options in Home tab or right-click menu.

Geographic Information

To prepare to run many programs, it may be necessary to determine the data file coordinates, map coordinates, or data file values for a particular pixel or a group of pixels. By displaying the image in the Viewer and then selecting the pixel or pixels of interest, important information about the pixels can be viewed.

To view information about a specific pixel, use the Inquire Cursor. To see information about classes in a thematic layer, open the Raster Attributes table.

See Geographic Information Systems for information about attribute data.

Enhancing Continuous Raster Layers

Working with the brightness values in the colormap is useful for image enhancement. Often, a trial and error approach is needed to produce an image that has the right contrast and highlights the right features. By using the tools in the Viewer, it is possible to quickly view the effects of different enhancement techniques, undo enhancements that are not helpful, and then save the best results to disk.

SHARED Tip Use Raster tab options to enhance continuous raster layers.

See Enhancement for more information on enhancing continuous raster layers.

Creating New Image Files

It is easy to create a new image file (.img) from the layer or layers displayed in the Viewer. The new image file contains three continuous raster layers (RGB), regardless of how many layers are currently displayed. Use the Image Metadata dialog to generate statistics for the new image file before the file is enhanced.

Annotation layers can be converted to raster format, and written to an image file. Or, vector data can be gridded into an image, overwriting the values of the pixels in the image plane, and incorporated into the same band as the image.

SHARED Tip Use View As Image option to create a new image file from the currently displayed raster layers.