Previous ENVI User's Guide: Getting Started with ENVI Next

ENVI Basics

This section describes standard ENVI file opening procedures and options and ENVI functions common in many ENVI windows and dialogs.

Selecting Files in ENVI

Before you apply any of ENVI's functions to a specific data set, you must first select the file containing the data. To ensure consistency, nearly every ENVI image processing function uses a standard input file selection dialog. In the input selection dialog, you can select an input file or a single band, perform a spatial or spectral subset, and in some cases, mask the input data.

The title bar of the input file selection dialog changes to reflect the current function and/or input file type. For example, the title bars in the following two figures specify whether the input selection is by band or by file (respectively). (This was accomplished using the ENVI_SELECT procedure with the TITLE keyword.)

Figure 1-4: Input Selection by Band

Figure 1-4: Input Selection by Band

Figure 1-5: Input Selection by File

Figure 1-5: Input Selection by File

Selecting Bands or Files for Processing

  1. Use the Select By arrow-toggle button to select File or Band input.
  2.  

  3. Select the desired file or band name in the column labeled Select Input File or Select Input Band. When you are selecting by Band, data sets appear in an unfolded state by default. The names of unfolded data sets appear in this format:
  4.  

    - filename.ext
        Band
        Band

     

  5. To fold a data set, single-click on the minus symbol (-) next to the filename, or double-click on the filename of the data set. All of the bands of the data set are compressed and the data set appears in the list in this format:
  6.  

    + filename.ext

     

  7. To unfold a data set and make it available for processing, single-click on the plus symbol (+) next to the filename or double-click on the filename.
  8.  

  9. Select the input band or file by clicking on the name.
  10.  


    Note
    If the Select By toggle in the dialog is set to File, you can select a subset by clicking the Spatial Subset or Spectral Subset buttons and using the standard subsetting procedures (see Selecting a Spatial Subset or Selecting a Spectral Subset).

     


    Note
    To automatically start the selected function without selecting any subsetting, double-click on the file or band name.

     

  11. Click OK.

Opening Files for Processing

The Open drop-down button contains selections enabling you to open a new image file, a previously opened file, a spectral library, an ROI file, or an EVF file.

Opening New Files

Follow these steps to open a new file for processing.

  1. In the Input Selection dialog, click the Open drop-down button, and select New File from the menu options. The file selection dialog appears.
  2.  

  3. Select the desired filename and click Open.
Previously Opened Files

To open a previously opened file, click the Open drop-down button, and select Previous File from the menu options to reveal the last 20 files used in previous ENVI sessions. Selecting a file from the list opens that file.

Opening a Spectral Library

Follow these steps to open a spectral library for processing.

  1. In the Input Selection dialog, click the Open drop-down button, and select Spectral Library from the menu options. The file selection dialog appears.
  2.  

  3. Select the desired spectral library and click Open.
Opening a Region of Interest

Follow these steps to open an ROI file to use when subsetting the selected image.

  1. In the Input Selection dialog, click the Open drop-down button, and select ROI File from the drop-down menu. An ROI file selection dialog appears.
  2.  

  3. Navigate to the desired ROI file and click Open.
Opening an EVF File

Follow these steps to open an EVF file to use when subsetting the selected image.

  1. In the Input Selection dialog, click the Open drop-down button, and select EVF File from the drop-down menu. A vector filename selection dialog appears.
  2.  

  3. Select the desired ENVI vector file and click Open.

To exit the Input Selection dialog without loading any files, click Cancel.

For detailed information about how to apply the selected function to only a portion of the entire file or band, see Selecting a Spatial Subset or Selecting a Spectral Subset.

Selecting a Spatial Subset

Use spatial subsetting to limit application of a function to a spatial subset of the image. Spatial subsets can be selected using the following methods: entering samples and line values, selecting interactively from the image, entering map coordinates, using the same spatial subset that was previously used on another file, using the image shown in the meta scroll window (see Scroll Window Meta Zoom), or by using the bounding box around a region of interest.

For subsetting by spectral bands instead of by spatial regions, see Selecting a Spectral Subset.

  1. In the file selection dialog, click Spatial Subset. The Spatial Subset dialog appears. Its appearance varies depending on whether the current data is sample-line-based or georeferenced.
  2.  

  3. Select a subset using one of the methods described in the following sections.
  4.  

  5. Click OK to enter the selected subset into the Spatial Subset dialog.
  6.  

  7. Click OK to return to the file selection dialog.
  8.  

    Figure 1-6: Spatial Subset Dialog for a Georeferenced Image

    Figure 1-6: Spatial Subset Dialog for a Georeferenced Image
Subsetting by Samples/Lines

To select by starting and ending values of the subset, enter the starting and ending values of the samples and/or lines into the appropriate text boxes or enter the desired number of lines or pixels in the boxes labeled NS or NL respectively.

The size of the original data set and the size of the currently-selected subset appear below the text boxes.

Subsetting by Images

To select the spatial subset interactively from the image:

  1. In the Select Spatial Subset dialog, select the image to subset by from the Subset by Image drop-down list, then click Image. The Subset by Image dialog appears. A subsampled version of the selected image band is displayed. A box on the image outlines the currently selected subset.
  2.  

    Figure 1-7: Subset by Image Dialog

    Figure 1-7: Subset by Image Dialog

     

  3. To change the subset size or location, select from the following options:
    • In the Subset by Image dialog, click and grab on one of the corners of the box and drag to the desired location.
    •  

    • To move the box around the image, click on the box and drag it to the desired location.
    •  

    • Change the values in the Samples or Lines text boxes.

     

  4. Click OK.

The starting and ending sample and line coordinates appear in the text boxes labeled Samples and Lines.

Subsetting by Map Coordinates

For georeferenced images, you may select the subset by map coordinates or latitude/longitude coordinates:

  1. In the Select Spatial Subset dialog, click Map. The Spatial Subset By Map Coordinates dialog appears. It is divided into two sections: one for the upper-left map coordinate and the other for the lower-right coordinate.
  2.  

  3. Enter the upper-left coordinate and lower-right coordinate (the corners) of the subset into the corresponding text boxes.
  4.  


    Note
    The default values displayed are the upper-left and lower-right coordinates of the full image.

     

  5. Use the arrow toggle buttons to select the subset by latitude and longitude values for each coordinate.
  6.  


    Note
    To change the map projection of the coordinates, click the corresponding Change Proj button and follow the instructions in Selecting Map Projection Types.

     

  7. Click OK.
  8.  

    Figure 1-8: Spatial Subset by Map Coordinates Dialog

    Figure 1-8: Spatial Subset by Map Coordinates Dialog
Subsetting Using Another File's Subset

There are two options for subsetting a file based on the subset area of a previously subset image: use the first option to subset your image based on a subset of an image that was originally the same size as the one you are subsetting; use the second to subset your image based on an image of the same or smaller size that was previously subset by map or pixel values.

Using the Subset of an Image of the Same Size

To use the same spatial subset previously entered for a file with the same spatial size, click Previous in the File Selection dialog or the Select Spatial Subset dialog.

Using the Subset of an Image of the Same or Smaller Size
  1. In the Select Spatial Subset dialog, click File.
  2.  

  3. In the file selection dialog, select the previously subsetted file (which must have originally been the same size as or smaller than the current file).

The input file is subset based on the subset parameters of the file you select.

Subsetting Using ROIs

To make previously saved ROIs available for selection in the Subset Image by ROI/EVF Extent dialog, click Open in the Select Spatial Subset dialog, select ROI File or EVF File, and choose the desired file in the subsequent file selection dialog.

To subset a file using the bounding box (i.e., the area encompassing an ROI or group of ROIs) follow these steps:

  1. In the Select Spatial Subset dialog, click ROI/EVF.
  2.  

    Figure 1-9: Subset Image by ROI/EVF Extent Dialog

    Figure 1-9: Subset Image by ROI/EVF Extent Dialog

     

  3. In the Subset Image by ROI/EVF Extent dialog, select the ROI(s) and click OK. The file is subset to the area encompassing the selected ROI(s).
Subsetting by Scroll Window

To subset a file based on the image currently shown in the meta zoomed scroll window for the selected file, click Scroll in the Select Spatial Subset dialog. The starting and ending values are set to include only the Scroll window subset.


Note
This option is only available if the Scroll window displaying the selected file has been meta zoomed (for further information, see Scroll Window Meta Zoom). If the file is displayed in multiple meta zoomed Scroll windows, the subset of the first window is used.

Selecting a Spectral Subset

Use spectral subsetting to limit application of a function to selected bands of an image. For subsetting by spatial regions instead of spectral bands, see Selecting a Spatial Subset.

  1. From within the file selection dialog, click Spectral Subset. The File Spectral Subset dialog appears. The appearance of this dialog varies depending on whether the image has a bad bands list. A bad band is not included in the processing. A list of bands available for selection appear in the center of the dialog.
  2.  

    Figure 1-10: Spectral Subset Dialog with Three Selected Bands

    Figure 1-10: Spectral Subset Dialog with Three Selected Bands

     

  3. Select a spectral subset using one of the following methods:
    • Use the mouse to select a series of bands by left-clicking and dragging across the desired bands. Select multiple, non-adjacent bands by left-clicking on individual bands while depressing the Ctrl key.
    •  

    • Enter the min and max band numbers in the text fields to the left of the Add Range button to select a series of bands. The series is selected when you click Add Range.
    •  


      Note
      For images with a Bad Bands list, click Apply BBL to apply the Bad Bands List (see Editing Ancillary Header Information). ENVI automatically deselects individual bands that are marked Bad. Bad bands do not appear in the output image.

     

  4. Click OK to return to the file selection dialog.
Using Previous Subsets

To select the same spectral subset previously used for a file with the same number of spectral bands, click the Open drop-down button and select Previous File to reveal the last 20 files and subsets used in previous ENVI sessions. Selecting a file from the list opens the file.

Subsetting by Ranges

When selecting a range of bands to subset, the dialog default initially shows all bands selected. To select a specific range of bands instead of the default:

  1. In the File Spectral Subset dialog, select Clear to reset the default setting.
  2.  

  3. Enter the starting and ending band numbers into the two text boxes next to the Add Range button.
  4.  

  5. Click Add Range.
Subsetting from ASCII

Spectral subsetting from an ASCII file is useful if you have defined several special-use spectral subsets for a file with a large number of bands. To spectrally subset your data using an ASCII file:

  1. In the File Spectral Subset dialog, click Import ASCII.
  2.  

  3. When the Enter ASCII Filename dialog appears, select the ASCII file.
  4.  


    Note
    The format of the ASCII file must have the same number of lines in the file as the number of bands in the image.

     

  5. Columns in the ASCII file define possible spectral subsets. Multiple columns can be entered to allow specifying different band selections. For each column in the ASCII file a 0 indicates the band is not selected and a 1 indicates the band is selected.
  6.  

    For instance, a 5-band AVHRR file could use an ASCII file with the following data:

    0 1 1  
    0 0 1  
    0 1 1  
    1 0 0  
    1 1 0  
    

     

    Selecting column 1 deselects bands 1, 2 and 3, and selects bands 4 and 5.

     

    Selecting column 2 selects bands 1, 3 and 5, and deselects bands 2 and 4.

     

    Selecting column 3 selects bands 1, 2 and 3, and deselects bands 4 and 5.

     

    Regardless of the number of rows in the ASCII file, only the top 5 bands are shown in the Input ASCII File dialog.

Selecting a Mask

When you select a file to process you can apply a spatial mask. When a mask is used, ENVI does not apply the selected function to the masked portion of the image. A mask must be previously defined using Basic Tools  Masking  Build Mask. You can build a spatial mask from data ranges, Regions of Interest, and other types of input. See Masking for more details about building masks.


Note
Only certain ENVI functions allow spatial masking before processing. These functions include statistics, classification, un-mixing, matched filtering, continuum removal, and spectral feature fitting.

To apply a previously built spatial mask to your image:

  1. In the file selection dialog, click Select Mask Band. The Select Mask Input Band dialog appears with a list of all bands that are the same spatial size as the input image.
  2.  

  3. Select the band containing the mask.
  4.  


    Note
    To remove the mask, click Clear Mask Band.

Selecting Multiple Items in Lists

When using ENVI, you often have to select from a list of items. Some lists in ENVI allow you to select more than one item. The following describes the different ways to select multiple items in a list.

Figure 1-11: Selecting Individual and Multiple Items in a Dialog

Figure 1-11: Selecting Individual and Multiple Items in a Dialog

Selecting Items

To select a group of files that are listed consecutively, select the first file in the group, press and hold the Shift key, and click the last file in the group. Or, click and drag the cursor over the group of items with the left mouse button. The items are selected when they are highlighted.

To select multiple files that are not listed consecutively, press and hold the Ctrl key on your keyboard and click on each desired file.

If the dialog you are working in displays a Select All Items button, click the button to select all of the items in the list.


Note
You cannot select multiple items from the Available Bands List or the Available Vectors List.

De-Selecting Items

To de-select a single item, hold the Ctrl key down and click on the item.

If the dialog you're working in displays a Clear All Items or Clear button, click it to de-select all of the items in the list.

Selecting File or Memory Output

You are given the option to save your images and data to File or Memory. Saving an image to memory saves it in your computer's system memory and allows the image to be displayed from the Available Bands List or the Available Vectors List. When you close ENVI, the image is deleted. Saving an image to a file saves the image to your hard drive. When you close ENVI, the item is not deleted. For more information, see File vs. Memory.

  1. In any dialog where you are given the option to select output to File or Memory, select File or Memory.
  2.  

  3. If you select output to File, enter the desired output filename in the Enter Output Filename text box or click Choose to select an output filename.
  4.  

    Figure 1-12: Output to File or Memory (left) and Output Filename (right) Dialogs

    Figure 1-12: Output to File or Memory (left) and Output Filename (right) Dialogs
      

Placing Un-executed Functions in Queue

Use the Queue button to save the parameters that you've set for a particular function (without executing the function) so that you can execute the function later. To execute the function later, use the ENVI Queue Manager (see Using the ENVI Queue Manager).

  1. Start an ENVI function (for example, Basic Tools  Stretch Data).
  2.  

  3. In the file selection dialog, select the input file.
  4.  

  5. Enter the parameters for the function (for example, enter the stretch parameters in the Data Stretching dialog).
  6.  

  7. Instead of clicking OK to execute the function, click Queue.

The dialog closes, the parameters are saved, and the function can be executed later from the ENVI Queue Manager.


Note
If you exit ENVI without executing the queued functions, a warning appears.

Compressing Output

Use the Compress check box to compress your output. ENVI applies a lossless GZIP format compression to the output file. When a compressed file is opened in ENVI, ENVI reads the file and un-compresses it on-the-fly.


Warning
Be aware that ENVI cannot read compressed files that are larger than two gigabytes. If you compress a large file and it remains larger than two gigabytes when compressed, you will not be able to read it with ENVI.

To output a file in compressed format: In any dialog where the Compress check box appears, select the Compress check box before clicking OK.


Note
Compressed files are slower to output and input than un-compressed files; the Compress check box is only available in functions that output files sequentially.

  ENVI Online Help (August 12, 2005)