This function method retrieves the data from a raster series.
Example
This example opens a spatiotemporal series file from the ENVI installation path. It then retrieves the data for all of the rasters in the series.
e = ENVI(/HEADLESS)
seriesFile = Filepath('AirTemp.series', Subdir=['data','time_series'], $
Root_Dir = e.Root_Dir)
series = ENVIRasterSeries(seriesFile)
data = series.GetData()
Help, data
Syntax
Result = ENVIRasterSeries.GetData([, Keywords = value])
Keywords
Keywords are applied only during the initial creation of the object.
BANDS (optional)
Set this keyword to a zero-based band number (or array of band numbers) whose data you want to retrieve.
ERROR (optional)
Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.
When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.
See Manage Errors for more information on error handling in ENVI programming.
INDEX (optional)
Specify an index number (or array of index numbers) of one or more rasters whose data you want to retrieve. If you do not specify this keyword, ENVI returns the data for the currently selected raster.
SUB_RECT (optional)
Set this keyword to a four-element array of pixel coordinates, expressing the spatial range of the raster data to retrieve. Pixel coordinates are zero-based. The array is of the form:
[x1, y1, x2, y2]
where:
x1: First pixel of the columns dimension
y1: First pixel of the rows dimension
x2: Last pixel of the columns dimension
y2: Last pixel of the rows dimension
Version History
API Version
4.3
See Also
ENVIRasterSeries, ENVIRaster