This topic contains the following sections:

Spatial Subset


Use spatial subsetting to limit applying a function to a spatial subset of the image. In the Data Selection dialog, click Spatial Subset to open the Spatial Subset dialog.

You can also write a script to define a spatial subset using ENVISubsetRaster, the GeographicSubsetRaster task, or the SubsetRaster task.

Tip: If the image colors make visualization difficult in the thumbnail that appears in the Spatial Subset dialog, select an option from the Update Stretch drop-down list to change the stretch applied to the thumbnail.

Specify the subset in the following ways:

  • Enter the beginning and ending Columns in zero-based file coordinates in the from and to fields.
  • Enter the beginning and ending Rows in zero-based file coordinates in the from and to fields.
  • Enter a value in the total field to adjust the ending numbers for the Columns and Rows, accordingly.
  • Interactively select the subset on the image thumbnail. If a pyramid file exists for the selected raster, a thumbnail appears in the Spatial Subset dialog (if a pyramid file does not exist, the outline of the raster appears). Click and drag in the thumbnail to draw a box around the area to subset. You can move and resize the box by dragging its handles.
  • Click Use Full Extent to use the entire image.
  • Click Use View Extent to use the portion of the image visible in the Image window view as the subset. Use View Extent is available when the image to subset is in the active view and it is visible in the view. It is not available if the image has been rotated, or if it has arbitrary pixel-based projection.
  • Click Subset By Raster to use an image subset from a raster file. The subset file must have spatial extents that overlap with the base file and cannot have arbitrary, pseudo or pixel-based projection. The Data Selection dialog appears for you to navigate and choose the raster.
  • Click Subset By Vector to use an image subset from a vector file. The subset file must have spatial extents that overlap with the base file and cannot have an arbitrary, pseudo or pixel-based projection. The Data Selection dialog appears for you to navigate and choose the vector.
  • Click Subset By ROI to use an image subset from one or more region of interest (ROI) files already opened in ENVI. If more than one ROI file is selected, the union of the files will be used to define the subset.
  • Click Enter Map Coordinates to define the subset by entering map coordinates. Enter Map Coordinates is not available if the image to subset has no coordinate system information. Files with a geographic coordinate system can only be subset using degree coordinates. Files with a projected coordinate system can be subset using degrees or the projection units of the selected image.

Spectral Subset


Use spectral subsetting to limit applying a function to selected bands of the image. In the Data Selection dialog, click Spectral Subsetto open the Spectral Subset dialog.

You can also write a script to define a spectral subset using the ENVISubsetRaster routine.

Tip: Applying a spectral subset before running spectral processing and analysis tools (for example, FLAASH or QUAC atmospheric correction or ACE target detection) can significantly change the processing results since the pixel spectral information changes after subsetting. If the raster has a bad bands list defined, you should exclude those bad bands in subsequent processing and analysis.

In the Data Selection dialog, all of the bands are selected by default, which specifies that there will be no subsetting.

  • Click to select a single band to use for the subset, or use Ctrl+click or Shift+click to select multiple bands.
  • If the image has a list of bad bands (specified by a bbl entry in the associated header file), then an Apply Bad Bands List button is available for you to exclude bad bands from processing. Creating a list of bad bands is highly recommended for hyperspectral imagery, especially if the imagery is used in a workflow such as Anomaly Detection or Feature Extraction.
  • Click Select All to select all bands (no subsetting).
  • Click Clear to clear band selections.