This routine is obsolete and has been replaced with the ENVIRaster::GetData method.

Use this function to retrieve spatial image data for any open file. The DIMS keyword allows full control over the spatial dimensions of the returned data, which allows you to retrieve a full band or any spatial subset. The band is specified with the POS keyword, and only a single band is returned. Additional optional parameters allow you to automatically resample the spatial data to smaller or larger pixel sizes. This function will work with any open image, regardless of the format or physical storage order of the file.

You can use this function, along with ENVI_GET_SLICE, in place of tiled processing. However, requests for large images may be limited by the amount of available RAM in your your system.

Syntax


Result = ENVI_GET_DATA(/COMPLEX, DIMS=array, FID=file ID [, INTERP={0 | 1 | 2 | 3}], POS=long integer [, XFACTOR=integer] [, YFACTOR=integer])

Keywords


COMPLEX

Set this keyword to return the output data as complex.

DIMS

The “dimensions” keyword is a five-element array of long integers that defines the spatial subset (of a file or array) to use for processing. Nearly every time you specify the keyword FID, you must also specify the spatial subset of the corresponding file (even if the entire file, with no spatial subsetting, is to be processed).

  • DIMS[0]: Unused for this routine; set to -1L.
  • DIMS[1]: The starting sample number. The first x pixel is 0.
  • DIMS[2]: The ending sample number
  • DIMS[3]: The starting line number. The first y pixel is 0.
  • DIMS[4]: The ending line number

To process an entire file (with no spatial subsetting), define DIMS as shown in the following code example. This example assumes you have already opened a file using ENVI_SELECT or ENVI_PICKFILE:

envi_file_query, fid, dims=dims

FID

The file ID (FID) is a long-integer scalar with a value greater than 0. An invalid FID has a value of -1. The FID is provided as a named variable by any routine used to open or select a file. Often, the FID is returned from the keyword R_FID in the ENVIRasterToFID routine. Files are processed by referring to their FIDs. If you work directly with the file in IDL, the FID is not equivalent to a logical unit number (LUN).

INTERP (optional)

Set this keyword to one of the following values to indicate the interpolation type. Use this keyword only when XFACTOR or YFACTOR is not equal to 1.

  • 0: Nearest neighbor
  • 1: Bilinear
  • 2: Cubic convolution
  • 3: Pixel aggregate

POS

Use this keyword to specify a scalar long integer that indicates the band number for the returned data.

XFACTOR (optional)

Use this keyword to specify the x magnification factor for the data. A value of 1 does not change the data. Values greater than 1 cause the size to increase; values less than 1 cause the size to decrease.

YFACTOR (optional)

Use this keyword to specify the y magnification factor for the data. A value of 1 does not change the data. Values greater than 1 cause the size to increase; values less than 1 cause the size to decrease.