Envireadr
Jump to navigation
Jump to search
Purpose
Reads ENVI image files.
Synopsis
- out = envirdr
- out = envirdr(filenames)
- out = envirdr('filename')
- out = envirdr({'filename1' 'filename2'})
Description
ENVI format has two files, .hdr (header) and .img (binary image, sometimes given the extension .dat, .raw, or .pcf). All file pairs must have the same base filename.
NOTE: An image DSO will be created if MIA_Toolbox (Solo+MIA) is installed.
Header File Format (.hdr) description - A character string describing the image or the processing performed. samples - The number of samples (pixels) per image line for each band. lines - The number of lines per image for each band. bands - The number of bands per image file. header offset - The number of bytes of imbedded header information present in the file (for example, 128 bytes for ERDAS 7.5 .lan files). ENVI skips these bytes when reading the file. file type- The ENVI-defined file type, such as a certain data format and processing result. The available file types are listed in the filetype.txt file (see ENVI File Type File). The file type ASCII string must match an entry in the filetype.txt file verbatim, including case. data type - The type of data representation, where 1=8-bit byte; 2=16-bit signed integer; 3=32-bit signed long integer; 4=32-bit floating point; 5=64-bit double-precision floating point; 6=2x32-bit complex, real-imaginary pair of double precision; 9=2x64-bit double-precision complex, real-imaginary pair of double precision; 12=16-bit unsigned integer; 13=32-bit unsigned long integer; 14=64-bit signed long integer; and 15=64-bit unsigned long integer. interleave - Refers to whether the data are BSQ, BIP, or BIL. BSQ - format is the simplest format, where each line of the data is 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 - format provides optimal spectral processing performance. 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 - format provides a compromise in performance between spatial and spectral processing and is the recommended file format for most ENVI processing tasks. Images stored in 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. sensor type - Instrument types, such as Landsat TM, SPOT, RADARSAT, and so on. The available sensor types are the sensor.txt file described in ENVI Sensor File. The sensor type ASCII string defined here must match one of the entries in the sensor.txt file verbatim., including case. byte order - The order of the bytes in integer, long integer, 64-bit integer, unsigned 64-bit integer, floating point, double precision, and complex data types. Use one of the following: Byte order=0 (Host (Intel) in the Header Info dialog) is least significant byte first (LSF) data (DEC and MS-DOS systems).
Inputs
- filenames = a text string with the name of an HDR file or a cell of strings of HDR filenames. If (filenames) is omitted or an empty cell or array, the user will be prompted to select a folder and then one or more files in the identified folder. If (filenames) is a blank string , the user will be prompted to select a single file.
Outputs
- out = takes one of two forms:
- If input is a single file, the output is a dataset object.
- If the input consists of multiple files, the output is a cell array with a dataset object for each input file.
See Also
asfreadr, editds, jcampreadr, opotektiffrdr, spcreadr, xclreadr