This task will create an array of subrects based on regions of interest (ROIs).

Example


; Start the application
e = ENVI()
 
; Open an input file
File = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
 
RoiFile = Filepath('qb_boulder_roi.xml', $
  ROOT_DIR=e.Root_Dir, $
  SUBDIRECTORY=['data'])
Rois = e.OpenRoi(RoiFile)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('CreateSubrectsFromROI')
 
; Define inputs
Task.INPUT_RASTER = Raster
Task.INPUT_ROI = Rois 
 
; Run the task
Task.Execute
 
; Get the resulting subrects
Subrects = Task.SUBRECTS
 
; Get a list of names 
SubNames = Task.SUBRECT_NAMES
 
; Print information about the subrects
Help, Subrects

IDL prints:

SUBRECTS   LONG   =Array[4, 3]

Syntax


Result = ENVITask('CreateSubrectsFromROI')

Input properties (Set, Get): INPUT_RASTER, INPUT_ROI

Output properties (Get only):SUBRECTS, SUBRECT_NAMES

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

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_RASTER (required)

Specify the input raster.

INPUT_ROI (required)

Specify an ROI or array of ROIs that define the areas for the subrects.

SUBRECTS

This property contains an array of output subrects.

SUBRECT_NAMES

This property contains the names of each output subrect.

API Version


4.2

Version History


ENVI 5.5

Introduced

See Also


ENVITask, ENVITask::Parameter, CreateSubrectsFromDistance Task, CreateSubrectsFromPixels Task, CreateSubrectsFromTileCount Task, CreateSubrectsFromVector Task