Raster Color Slices

Use the Raster Color Slices tool to select data ranges and colors to highlight areas of an image. You can save the color slices visualization to a classification or to a shapefile.

Click on any of the following links for details:

You can also write a script to define color slices using the ColorSliceClassification task. Use the GetColorSlices task to open density slice range (DSR) files and to retrieve their data ranges and colors. Use the ExportColorSlices task to define your own color slices and ranges, and to export them to a DSR file.

Create a Raster Color Slice

  1. Generate raster color slices using one of the following:

    • In the Layer Manager, right-click the raster name and select New Raster Color Slice.
    • In the Data Manager, right-click a band and select Load Raster Color Slice.
    • From the Toolbox, select Classification > Raster Color Slices.
  2. Select the input file and band in the Data Selection dialog, then click OK.The Edit Raster Color Slices dialog appears. The following default settings are used for the histogram; you can change them as needed, described in Change Default Color Slices Settings:

    • Number of slices = 16
    • Color table = Rainbow
    • Minimum and maximum data ranges, calculated from the input image
  3. Click OK to create the raster color slices. ENVI adds a Raster Color Slice folder to the Layer Manager and loads the layer into the Image window. Click OK again in the Edit Raster Color Slices dialog to keep the layer in the Layer Manager and close the dialog; if you click Cancel, the layer will be removed.

To hide or show raster color slices in the Image window:

Edit Color Slices

To change the settings for a raster color slice, right-click the Slices folder in the Layer Manager and select Edit Color Slices. The Edit Raster Color Slices dialog appears. To select a color slice, click the table row to highlight it in the histogram, or click the color slice in the histogram to select it in the table row.

You can save the colors and data ranges you define for raster color slices. You can restore saved raster color slices on the same raster, or on another raster of the same size.

Plot controls:

To edit the data ranges:

To change colors:

To refine color slices:

To save and restore raster color slices:

Change Default Color Slices Settings

To edit the default settings for raster color slices, click the New Default Color Slices button in the Edit Raster Color Slices dialog. The Default Raster Color Slices dialog appears. Change the settings as needed, then click OK.

Export Raster Color Slices

You can export the raster color slices to a classification image or to a shapefile.

Calculate Class Statistics

You can calculate class statistics for the color slices, including:.

For details, see Class Statistics.

See Also

Classification, Classification Tools