Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.


  >  Docs Center  >  ENVI API  >  Data Control  >  ENVILinearRangeStretchRaster

ENVILinearRangeStretchRaster

ENVILinearRangeStretchRaster

This function constructs an ENVIRaster from a source raster that has a Linear Range stretch applied. With a linear range stretch, the minimum and maximum histogram values define the dynamic range of the image. Pixel values greater than the maximum value are assigned a value of 255. Pixel values less than the minimum value are assigned a value of 0. Pixel values between these points are linearly stretched. By distributing pixel values across the entire histogram range, the image becomes brighter and more contrasted.

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 ENVILinearRangeStretchRasterTask.

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 = ENVILinearRangeStretchRaster(raster, $
  MIN=[187,250,103,52], MAX=[321,508,409,1807])
 
; Display the results
view = e.GetView()
layer = view.CreateLayer(stretchRaster)

Syntax


Result = ENVILinearRangeStretchRaster(Input_Raster [, Keywords=value])

Return Value


This routine returns an ENVIRaster that has had a Linear Range 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.

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.

MIN (required)

Set this keyword to the minimum value to be considered, also known as the "black point." If this value is a scalar, it applies to all bands. If it is an array, it must have the same number of elements as the input raster has bands.

MAX (required)

Set this keyword to the maximum value to be considered, also known as the "white point." If the value is a scalar, it applies to all bands. If it is an array, it must have the same number of elements as the input raster has bands.

NAME

Specify a string that identifies the raster.

Version History


ENVI 5.2

Introduced

ENVI 5.3, Service Pack 1

Documented the dehydrated form of this virtual raster.

ENVI 5.4

Added Dehydrate and Hydrate methods; added NAME keyword

API Version


3.3

See Also


ENVILinearRangeStretchRasterTask, ENVIEqualizationStretchRaster, ENVIGaussianStretchRaster, ENVILinearPercentStretchRaster, ENVILogStretchRaster, ENVIOptimizedLinearStretchRaster, ENVIRaster, ENVIRootStretchRaster

 



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us