This is a reference to a raster layer object. Use the ENVIView::CreateLayer method to create a new raster layer.

Example


; Launch the application
e = ENVI()
 
; Create an ENVIRaster
file = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data'])
raster = e.OpenRaster(file)
view = e.GetView()
 
; Create true-color layer
layer = view.CreateLayer(raster)
 
; Change transparency
layer.Transparency = 50

Return Value


This function returns a reference to an ENVIRasterLayer object.

Methods


AddROI

Close

Export

GetLayer

GetView

MoveDown

MoveToBottom

MoveToTop

MoveUp

Properties


Properties marked as (Get) can be retrieved, but not set.

BANDS (Get)

The three-element array of band indices in the layer—red, green, and blue. Band indices are zero-based. See Open Files for details on how ENVI automatically determines the bands to display. If the 'default bands' field is set in the associated ENVI header file, then those bands will be displayed.

BRIGHTNESS (Get, Set)

Set this property to an integer value from 0 to 100, indicating the brightness level to display. The default value is 50 if no stretch is specified.

CONTRAST (Get, Set)

Set this property to an integer value from 0 to 100, indicating the contrast level to display. The default value is 20 if no stretch is specified.

DATA (Get)

The ENVIRaster displayed on this layer.

HIDE (Get, Set)

Set this property to 1 to hide the layer, and to 0 to display it. The default value is 0.

NAME (Get, Set)

Specify a string value with the name of the layer.

SHARPEN (Get, Set)

Set this property to an integer value between 0 and 100, indicating the sharpening level to display. The default value is 10 if no stretch is specified.

QUICK_STRETCH (Get, Set)

Specify a string value with the type of quick stretch to apply. The valid strings are:

QUICK_STRETCH String Values
'equalization'
'gaussian'
'linear'
'linear 1%'
'linear 2%'
'linear 5%'
'logarithmic'
'no stretch'
'optimized linear'
'square root'

TRANSPARENCY (Get, Set)

Specify a floating-point value between 0 (opaque) and 100 (invisible) that defines the transparency of the layer. The default value is 0.

ZOOM_PERCENT (Get)

The current zoom percentage of the layer. For example, ZOOM_PERCENT=200 means the layer is zoomed by 200%.

Version History


ENVI 5

Introduced

ENVI 5.1

Added AddROI method

Added GetLayer method

Added NAME property

ENVI 5.3.1 Added Export method

API Version


4.2

See Also


ENVI::OpenRaster, ENVIRaster, ENVIView::CreateLayer, ENVIROILayer, ENVIAnnotationLayer, ENVIVectorLayer