This task collects endmembers from a variety of sources, resamples them to match a given raster, and outputs the spectra to be used in other tasks.
Example
e = ENVI(/HEADLESS)
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
RoiFile = Filepath('qb_boulder_roi.xml', $
ROOT_DIR=e.Root_Dir, $
SUBDIRECTORY=['data'])
Rois = e.OpenRoi(RoiFile)
specLibFile = FILEPATH('vegetation_beckman_3132.sli', ROOT_DIR=e.ROOT_DIR, $
SUBDIR=['resource', 'speclib', 'usgs_v6'])
specLib = ENVISpectralLibrary(specLibFile)
EndmemberCollectionTask = ENVITask('EndmemberCollection')
EndmemberCollectionTask.input_raster = Raster
EndmemberCollectionTask.rois = Rois
EndmemberCollectionTask.spectral_library = specLib
EndmemberCollectionTask.spectra_names = ['Aspen_Leaf-B DW92-3 [W1R1Ba AREF]', $
'Cheatgrass ANP92-11A [W1R1Ba AREF]', $
'Juniper_Bush IH91-4B [W1R1Ba AREF]']
EndmemberCollectionTask.Execute
SAMTask = ENVITask('SpectralAngleMapperClassification')
SAMTask.mean = EndmemberCollectionTask.endmembers
SAMTask.class_names = EndmemberCollectionTask.endmember_names
SAMTask.class_colors = EndmemberCollectionTask.endmember_colors
SAMTask.input_raster = Raster
SAMTask.Execute
DataColl = e.Data
DataColl.Add, SAMTask.OUTPUT_RASTER
View = e.GetView()
Layer = View.CreateLayer(SAMTask.OUTPUT_RASTER)
Syntax
Result = ENVITask('EndmemberCollection')
Input parameters (Set, Get): INPUT_RASTER, ROIS, SPECTRA_NAMES, SPECTRAL_LIBRARY, SPECTRAL_SIGNATURES
Output parameters (Get only): ENDMEMBER_COLORS, ENDMEMBER_NAMES, ENDMEMBERS
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
INPUT_RASTER
Specify the raster to use as a base for extracting endmembers.
ROIS
Specify one or more Regions of Interest. Endmembers will be generated by averaging the spectral signatures of the input raster at each ROI.
SPECTRA_NAMES
A string array representing the library spectra to retrieve.
SPECTRAL_LIBRARY
Specify a spectral library from which to retrieve a particular spectrum.
SPECTRAL_SIGNATURES
Specify an array of spectral signatures.
Output Parameters
ENDMEMBERS
A double array representing the selected and resampled spectra.
ENDMEMBER_COLORS
This is an array of RGB triplets representing the endmember colors.
ENDMEMBER_NAMES
The output endmember names.
Methods
Execute
Parameter
ParameterNames
Properties
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
Version History
See Also
ENVITask