PixelPurityIndex Task

This task performs a pixel purity index (PPI) calculation on an input minimum noise fraction (MNF) result.

Example

This example runs a forward MNF transform on an area of disturbed earth in an AVIRIS hyperspectral image. It then creates a PPI image.

; Start the application

e = ENVI()

 

; Open an input file

File = Filepath('AVIRISReflectanceSubset.dat', $

  SUBDIR=['data','hyperspectral'], $

  ROOT_DIR=e.Root_Dir)

Raster = e.OpenRaster(File)

 

; Run a Forward MNF on the subset

mnfTask = EnviTask('ForwardMNFTransform')

mnfTask.INPUT_RASTER = Raster

mnfTask.Execute

 

; Run the PPI on the MNF result

ppiTask = ENVITask('PixelPurityIndex')

ppiTask.INPUT_RASTER = mnfTask.OUTPUT_RASTER

ppiTask.Execute

 

; Get the data collection

dataColl = e.Data

 

; Add the output to the data collection

dataColl.Add, ppiTask.OUTPUT_RASTER

 

; Display the result

View = e.GetView()

Layer = View.CreateLayer(ppiTask.OUTPUT_RASTER)

Syntax

Result = ENVITask('PixelPurityIndex')

Input properties (Set, Get): INPUT_RASTER, ITERATIONS, OUTPUT_RASTER_URI, RESIZE_FACTOR, THRESHOLD

Output properties (Get only): OUTPUT_HISTOGRAM, OUTPUT_RASTER

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:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties

This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_RASTER (required)

ITERATIONS (optional)

Specify the number of iterations for the pixel purity index calculation. The default value is 1000.

OUTPUT_HISTOGRAM

Specify an array to receive the histogram of the pixel purity index result.

OUTPUT_RASTER

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

OUTPUT_RASTER_URI (optional)

Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER. If you do not specify this property, or set it to an exclamation symbol (!), a temporary file will be created.

RESIZE_FACTOR (optional)

Specify a resize factor to subsample the input raster so that the entire file will fit into memory. The default value is 1.0.

THRESHOLD (optional)

Specify the threshold factor in data units for pure pixel selection. The default value is 2.5.

Version History

ENVI 5.5

Introduced

API Version

4.2

See Also

ENVITask, ForwardMNFTransform Task