RasterThresholdToVector Task
This task vectorizes the result of thresholding a raster.
Example
; Start the application
e = ENVI()
; Open an input file
File = Filepath('qb_boulder_pan', Subdir=['data'], Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
; Create a threshold Vector
Task = ENVITask('RasterThresholdToVector')
Task.INPUT_RASTER = Raster
Task.THRESHOLD_MIN = 1000
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_VECTOR
; Display the result
View = e.GetView()
Layer1 = View.CreateLayer(Raster)
Layer2 = View.CreateLayer(Task.OUTPUT_VECTOR)
View.Zoom, /FULL_EXTENT
Syntax
Result = ENVITask('RasterThresholdToVector')
Input properties (Set, Get): INPUT_RASTER, KERNEL_SIZE, MINIMUM_PIXELS, THRESHOLD_MIN, THRESHOLD_MAX
Output properties (Get only): OUTPUT_VECTOR
Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.
Methods
This task inherits the following methods from ENVITask:
Properties
This task inherits the following properties from ENVITask:
This task also contains the following properties:
INPUT_RASTER (required)
Specify a single-band raster to vectorize.
KERNEL_SIZE (optional)
The smooth kernel size, using an odd number (e.g., 3 = 3x3 pixels). If set to 0, no smoothing will be performed. The default is 3
.
MINIMUM_PIXELS (optional)
Specify the minimum size in pixels. Regions with fewer pixels than this value will be set to 0. The default is 3
.
THRESHOLD_MIN (optional)
Specify a value for the minimum threshold. Pixels lower than this value will be set to 0.
THRESHOLD_MAX (optional)
Specify a value for the maximum threshold. Pixels higher than this value will be set to 0.
OUTPUT_VECTOR
This is a reference to the output vector.
OUTPUT_VECTOR_URI (optional)
Specify a string with the fully qualified path and filename for OUTPUT_VECTOR.
Version History
ENVI 5.6.3 |
Introduced |
API Version
4.2