TopographicShadingUsingHSV Task

This task blends an HSV (hue/saturation/value) color representation of a digital elevation model (DEM) with a topographic feature (typically, shaded relief). The result is a color image that provides a better visual appearance of the shape and texture of topographic features than using the DEM alone.

Example

; Start the application

e = ENVI()

 

; Open an input file

File = Filepath('bhdemsub.img', $

  Subdir=['classic', 'data'], $

  Root_Dir=e.Root_Dir)

Raster = e.OpenRaster(File)

 

; Run the GetColorTable task

ColorTask = ENVITask('GetColorTable')

ColorTask.COLOR_TABLE_NAME = 'Mac Style'

ColorTask.Execute

 

; Set the DEM stretch parameters

DEMStretch = ENVIStretchParameters( $

  STRETCH_TYPE='Equalization', $

  MIN_VALUE=1241, $

  MAX_VALUE=1503)

 

; Set the topographic stretch parameters

TopoStretch = ENVIStretchParameters( $

  STRETCH_TYPE='Linear', $

  MIN_PERCENT=2.0, $

  MAX_PERCENT=98.0)

 

; Get the topographic shading task from the catalog of ENVITasks

Task = ENVITask('TopographicShadingUsingHSV')

 

; Define inputs

Task.INPUT_RASTER = Raster

Task.DEM_STRETCH = DEMStretch

Task.DEM_COLOR_TABLE = ColorTask.OUTPUT_COLOR_TABLE

Task.TOPOGRAPHIC_PRODUCT = 'Shaded Relief'

Task.TOPOGRAPHIC_STRETCH = TopoStretch

Task.INVERT_SATURATION = 'True'

Task.KERNEL_SIZE = 5

 

; Run the task

Task.Execute

 

; Get the collection of data objects currently available in the Data Manager

DataColl = e.Data

 

; Add the output to the Data Manager

DataColl.Add, Task.OUTPUT_RASTER

 

; Display the result

View = e.GetView()

Layer = View.CreateLayer(Task.OUTPUT_RASTER)

Syntax

Result = ENVITask('TopographicShadingUsingHSV')

Input parameters (Set, Get): AZIMUTH, DEM_COLOR_TABLE, DEM_STRETCH, ELEVATION, INPUT_RASTER, INVERT_SATURATION, INVERT_VALUE, KERNEL_SIZE, OUTPUT_RASTER_URI, TOPOGRAPHIC_PRODUCT, TOPOGRAPHIC_STRETCH

Output parameters (Get only): OUTPUT_RASTER

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

Input Parameters

AZIMUTH (optional)

Specify the azimuth angle of the model in degrees. The value will only be used for the Shaded Relief product. The default value is 45.0.

DEM_COLOR_TABLE (required)

Specify a color table to apply to the input raster. This parameter only acccepts a [*, 3] array of color table values. To use a predefined color table, you can run the GetColorTable task, then pass the resulting array to DEM_COLOR_TABLE.

DEM_STRETCH (required)

Specify an ENVIStretchParameters object with the stretch to apply to the input raster before applying a color table.

ELEVATION (optional)

Specify the elevation angle of the model in degrees. The value will only be used for the Shaded Relief product. The default value is 45.0.

INPUT_RASTER (required)

Specify a raster on which to perform topographic shading; for example, a DEM, gridded bathymetry data, or gridded magnetic anomaly data.

INVERT_SATURATION (optional)

Set to true if you want to invert the saturation band during color blending.

INVERT_VALUE (optional)

Set to true if you want to invert the value band during color blending.

KERNEL_SIZE (optional)

Specify the size of the kernel used for topographic processing. The default value is 3.

OUTPUT_RASTER_URI (optional)

Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER.

TOPOGRAPHIC_PRODUCT (optional)

Specify a string with the topographic product to calculate. The choices are as follows:

TOPOGRAPHIC_STRETCH (required)

Specify an ENVIStretchParameters object with the stretch to apply to the selected topographic product before blending.

Output Parameters

OUTPUT_RASTER

This is a reference to the output raster of filetype ENVI.

Methods

Execute

Parameter

ParameterNames

Properties

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History

ENVI 5.5. 1

Introduced

See Also

ENVITask, TopographicShadingUsingHLS Task, TopographicShadingUsingRGB Task, TopographicModeling Task, TopographicFeatures Task, GenerateContourLines Task, Masking Support in ENVITasks