Previous ENVI User's Guide: Getting Started with ENVI Next

ENVI File Formats

ENVI supports several image file formats, which are described in this section. Also discussed in this section are ENVI header files, file naming conventions, and cross-platform portability issues.

ENVI Image Files

ENVI uses a generalized raster data format consisting of a simple flat binary file and a small associated ASCII (text) header file. This approach permits ENVI's flexible use of nearly any image format, including those with embedded header information. All data types are supported in their native formats (byte, signed and unsigned integer, long integer, floating point, double precision, 64-bit integer, unsigned 64-bit integer, complex, or double complex). The generalized raster data is stored as a binary stream of bytes either in BSQ, BIP, or BIL formats (see ENVI File Formats).

BSQ (Band Sequential Format)

In its simplest form, the data is in BSQ format, with each line of the data followed immediately by the next line in the same spectral band. This format is optimal for spatial (X, Y) access of any part of a single spectral band.

BIP (Band Interleaved by Pixel Format)

Images stored in BIP format have the first pixel for all bands in sequential order, followed by the second pixel for all bands, followed by the third pixel for all bands, etc., interleaved up to the number of pixels. This format provides optimum performance for spectral (Z) access of the image data.

BIL (Band Interleaved by Line Format)

Images stored in BIL format have the first line of the first band followed by the first line of the second band, followed by the first line of the third band, interleaved up to the number of bands. Subsequent lines for each band are interleaved in similar fashion. This format provides a compromise in performance between spatial and spectral processing and is the recommended file format for most ENVI processing tasks.

ENVI Header Files

The ENVI header file contains information used to read an image data file and is normally created the first time a data file is accessed by ENVI. The separate ENVI text header file provides information to ENVI about the dimensions of the image, the imbedded header if present, the data format, and other pertinent information. The required information is entered interactively or is automatically created with file ingest, and can be edited and changed later. You can generate an ENVI header outside ENVI using a text editor (see ENVI Header Format).

ENVI File Naming Conventions

ENVI's file handling routines are flexible. ENVI does not impose any constraints on the way that files are named, with the exception of the use of the.hdr extension used for header files. Some ENVI functions pre-load lists of files with specific extensions for ease of use. These are listed in the following table and should be used consistently when running ENVI to maximize file handling efficiency. This does not preclude you from using different filenames if desired.

Table 1-1: ENVI File Types 

Table 1-1: ENVI File Types 
File Type
Extension
ENVI Bad Lines List
.bll
ENVI Band Math or Spectral Math Expression
.exp
ENVI Calibration Factors
.cff
ENVI Contour Levels File
.lev
ENVI Density Slice Range File
.dsr
ENVI Display Group
.grp
ENVI Filter Kernels
.ker
ENVI GCP file
.pts
ENVI Grid File
.grd
ENVI Header File
.hdr
ENVI Image
None defined
ENVI Look Up Table
.lut
ENVI Map Key
.key
ENVI Mosaic Template File
.mos
ENVI n-D Visualizer State
.ndv
ENVI PPI Count File
.cnt
ENVI Region of Interest
.roi
ENVI Spectral Library
.sli
ENVI Statistics File
.sta
ENVI Statistics Report
.txt
ENVI Surface View Path File
.pat
ENVI Tape Script
.fmt
ENVI Vector File
.evf
ENVI Vector Template File
.vec
JPL AIRSAR Compressed Stokes Matrix Radar Data
.stk
SIR-C Compressed Data Product
.cdp

Cross-Platform File Portability

When naming files used with ENVI, consider cross-platform portability. The filenames on UNIX systems have a .hdr appended to the filename. On Windows systems the .hdr replaces the current extension. This is particularly important for preserving the relationship between image files and their corresponding header (.hdr) files. For example, a UNIX image file with the name image_1.img would have image_1.img.hdr. as its corresponding header file. A Windows image file named image_1.img would have image_1.hdr. as its corresponding header file. In Windows, the two images, image_1.img and image_1.dat, would have the same header filename of image_1.hdr and ENVI would have problems if the two images were of different sizes and characteristics. In UNIX, the same two files would have the corresponding header filenames of image_1.img.hdr and image_1.dat.hdr and no confusion would occur.

If cross platform portability of images is an issue, the easiest solution is not to include an extension in the image name. Thus the image file would have the same header filename in both UNIX and Windows. Alternatively, images and header files can be renamed to the Windows convention before moving the images from UNIX to Windows systems.

  ENVI Online Help (August 12, 2005)