ENVIOptimizedLinearStretchRaster

This function constructs an ENVIRaster from a source raster that has an optimized linear stretch applied. This is similar to a linear stretch but provides more settings to control midtones, shadows, and highlights in an image. It computes the stretch minimum and maximum based on four values that ENVI sets by default. See the Stretch Type Background topic for details.

The result is a virtual raster, which has some additional considerations with regard to methods and properties. See Virtual Rasters for more information, including how they differ from ENVITasks.

The equivalent task is OptimizedLinearStretchRaster.

Example

; Start the application

e = ENVI()

 

; Open a file

filename = FILEPATH('qb_boulder_msi', $

  ROOT_DIR=e.ROOT_DIR, SUBDIRECTORY = ['data'])

raster = e.openraster(filename)

 

; Create the stretch raster

stretchRaster = ENVIOptimizedLinearStretchRaster(raster, $

  BRIGHTNESS=70)

 

; Display the results

view = e.GetView()

layer = view.CreateLayer(stretchRaster)

Syntax

Result = ENVIOptimizedLinearStretchRaster(Input_Raster, BRIGHTNESS=value)

Return Value

This routine returns an ENVIRaster that has had an Optimize Linear stretch applied.

Arguments

Input_Raster

Specify the input ENVIRaster.

Methods

This virtual raster inherits methods and properties from ENVIRaster; however the following methods will override the ENVIRaster methods:

Dehydrate

Hydrate

Keywords

BRIGHTNESS (optional)

Set this keyword to an integer value from 0 to 100, indicating the brightness level to display. The default value is 50 if no brightness is specified. You can also set this value to a scalar or an array with the same number of elements as the raster has bands.

NAME

Specify a string that identifies the raster.

Version History

ENVI 5.2

Introduced

ENVI 5.3.1

Documented the dehydrated form of this virtual raster

ENVI 5.4

Added Dehydrate and Hydrate methods; added NAME keyword

API Version

4.2

See Also

OptimizedLinearStretchRaster Task, ENVIEqualizationStretchRaster, ENVIGaussianStretchRaster, ENVILinearPercentStretchRaster, ENVILinearRangeStretchRaster, ENVILogStretchRaster, ENVIRaster, ENVIRootStretchRaster