LabelBadBands
Résumé
Creates a raster object that labels bad bands in a multidimensional or hyperspectral raster based on a selected subset of bands. The output maintains the same band order as the input.
Discussion
This function allows you to specify a set of bands using ranges or lists to be labeled as bad. The output will have the band property IsBadBand set to 1. The property will be created if it does not already exist. This function supports both multispectral and hyperspectral images, and maintains the same band order as input.
The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.
For more information about how this function works, see the Label Bad Bands raster function.
Syntaxe
LabelBadBands(raster, {method}, {bands})
| Le paramètre | Explication | Type de données |
|---|---|---|
|
raster |
The input multidimensional or hyperspectral image. |
Raster |
|
method |
Specifies the method that will be used to label bad bands in the input image.
The default value is BY_IDS. |
String |
|
bands |
The bands that will be labeled as bad bands based on the specified
The When specifying the When specifying bands by wavelength, the units—such as microns or nanometers—will be the same as the input units. The default value is None. |
String |
Valeur de retour
| Type de données | Explication |
|---|---|
|
Raster |
The output image with bad bands labeled. |
Exemple de code
This example extracts the bands from the input raster using the BY_IDS option.
labeled_bands = arcpy.ia.LabelBadBands(raster=img_lyr, method="BY_IDS", bands="100 105 110 120-130")
This example extracts the bands from the input raster using the BY_WAVELENGTH option.
labeled_bands = arcpy.ia.LabelBadBands(raster=img_lyr, method="BY_WAVELENGTHS", bands="400-700")