This task extracts an array of single-band rasters from an ENVI raster, with each band represented as a separate raster.

Example


This example opens a raster from sample data included with your installation of ENVI and then extracts all the individual bands, returning them each as ENVI rasters.

; Start the application
e = ENVI()
 
File = Filepath('qb_boulder_msi', SUBDIRECTORY=['data'], $
  ROOT_DIR = e.Root_Dir)
 
; Create a raster series object
Raster = e.OpenRaster(File)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('ExtractBandsFromRaster')
 
; Define inputs
Task.INPUT_RASTER = Raster
 
; Run the task
Task.Execute
 
; Get the bands of the input raster
RasterBands = Task.OUTPUT_RASTERS

Syntax


Result = ENVITask('ExtractBandsFromRaster')

Input parameters (Set, Get): INPUT_RASTER

Output parameters (Get only): OUTPUT_RASTERS

Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.

Input Parameters


INPUT_RASTER (required)

Specify an ENVIRaster from which to extract the individual bands.

Output Parameters


OUTPUT_RASTERS

This is an array of ENVI rasters.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 5.4.2

Introduced

See Also


ENVITask, Masking Support in ENVITasks