You can import endmember spectra from the following:

When using the Mahalanobis distance or maximum likelihood classifiers, you can only import the endmember spectra from ROIs or statistics files because these classifications use the endmember covariance statistics.

Import Spectra from Spectral Libraries


  1. Select Import > from Spectral Library. The Input File dialog appears.
  2. Choose the spectral library name.
  3. Click OK. The Input Spectral Library dialog appears. If the desired spectral library was not previously opened, select File > Open Spectral Library in the Input File dialog.
  4. Select endmember spectra by selecting the spectrum names.
  5. Change the Wavelength Units and Y Scale Factor parameters as needed.

    If the Reflectance Scale Factor parameter is set in both the spectral library header and the image data header, then ENVI will automatically scale the library data to match the image data. If one of the two data sources has no scale factor in its header, then no scaling will be done.

  6. Click OK to enter the selected spectra into the Endmember Spectra list.

Import Spectra from ROIs and Vectors


You can import mean spectra from previously defined ROIs or vectors open in the Available Vectors List. You can associate these ROIs and vectors with either the current input file or another file.

Import ROIs and Vectors Associated with Current File

  1. From the Endmember Collection dialog menu bar, select Import > from ROI/EVF from input file. The Select Regions for Stats Calculation dialog appears. The Select Regions for Stats Calculation dialog is only provided if more than one ROI or vector is available.
  2. Select endmember spectra (ROI or vector averages) by selecting the ROI or vector names. To open an ROI or EVF file, click Open ROI/EVF file. The Enter ROI/EVF Filenames dialog appears. Use this dialog to select and open ROI and EVF files. The Select Regions for Stats Calculation dialog is updated with the ROIs and vectors from the open files.
  3. Click OK to enter the ROI and vector means into the Endmember Spectra list.

Import ROIs and Vectors Associated with Another File

  1. From the Endmember Collection dialog menu bar, select Import > from ROI/EVF from other file. The Input File of associated ROI/EVF dialog appears.
  2. Select the input file. The Select Regions for Stats Calculation dialog appears. The Select Regions for Stats Calculation dialog is only provided if more than one ROI or vector is available.
  3. Select endmember spectra (ROI or vector averages) by selecting the ROI or vector names. To open an ROI or EVF file, click Open ROI/EVF file. The Enter ROI/EVF Filenames dialog appears. Use this dialog to select and open ROI and EVF files. The Select Regions for Stats Calculation dialog is updated with the ROIs and vectors from the open files.
  4. Click OK to enter the ROI and vector means into the Endmember Spectra list.

Import Spectra from ASCII Files


  1. From the Endmember Collection dialog menu bar, select Import > from ASCII File. The Select ASCII Files to Import dialog appears.
  2. Select an ASCII file or a group of ASCII files of the same format and click Open. The Input ASCII File dialog appears, with a list of the number of columns and rows and the first few data values of each column of data.
  3. Enter the X Axis Column number that contains the x axis data.
  4. Select the endmember spectra to import in the Select Y Axis Columns area.
  5. Change the Wavelength Units and Y Scale Factor parameters as needed.
  6. Click OK to enter the selected endmember spectra into the list on the Endmember Collection dialog.

Import Additional ASCII Files

To select another ASCII file and read the data using the settings previously defined the Input ASCII File dialog:

  1. From the Endmember Collection dialog menu bar, select Import > from ASCII file (previous template). The Select ASCII Files to Import dialog appears.
  2. Select an ASCII file and click Open. This option reads the data directly into the Endmember Collection dialog without the intermediate parameter dialog.

Import Spectra from ASD Binary Files


  1. From the Endmember Collection dialog menu bar, select Import > From ASD Binary File. The Enter ASD Files to Import dialog appears.
  2. Select the ASD file or files and click Open. ENVI automatically resamples the file to match the wavelengths from a data file, ASCII file, or first imported spectrum as designated when the Spectral Library Builder function was started. If importing the ASD file from the Endmember Collection dialog, ENVI automatically resamples the first input spectrum.

If the range of the ASD file does not match the range of the input wavelengths, all zeroes will result.

Import Spectra from Statistics Files


Use from Stats file to import the mean spectrum from a previous classification result that was calculated using the Statistics option in the Toolbox.

  1. Select Import > from Stats file. The Enter Statistics Filename dialog appears.

  2. Select one or more statistics files.

  3. Click OK. The mean spectrum from the statistics file is entered into the list on the Endmember Collection dialog.

Import Spectra from Plot Windows


You can import spectra from plot windows by using the right-click menu, by dragging and dropping the spectra from the plot window to the Endmember Spectra table, or by using a dialog box menu option, as described in the next sections.

Right-Click Menu

Use the following steps to derive spectra from the Spectral Profile plot window for your displayed image and import them into the Endmember Spectra table.

  1. If your image is displayed in a display group (only available from certain tools), you can right-click in the display group and select Z Profile (Spectrum). The Spectral Profile plot window appears.
  2. From the Spectral Profile plot window menu bar, select Options > Collect Spectra.
  3. Click on the spectra you want to collect for the Endmember Spectra table.
  4. In the Endmember Collection dialog, right-click on either an empty space in the table or on the upper-left corner of the table. The resulting menu contains all the available spectra from every displayed plot window.

    If no spectrum was available in any plot window, the right-click menu states that no spectrum is available.

  5. Left-click on the spectra you want to import into the table. The selected spectra appears in the Endmember Spectra table.
  6. Use the right-click menu to import all of the spectrum you want to include in the table.

Drag and Drop Spectra

You can also drag-and-drop a spectrum from the Spectral Profile plot window key to the Endmember Spectra table to collect it in the Endmember Collection dialog.

  1. From the Spectral Profile plot window menu bar, select Options > Plot Key. The key (legend) for the plot window appears to the right of the spectral plot.
  2. Click and drag the key of a spectrum into the Endmember Spectra table. The spectrum appears in the Endmember Collection table.

Endmember Collection Dialog Menu Option

You can also import multiple spectra by using an Endmember Collection dialog menu option.

  1. From the Endmember Collection dialog menu bar, select Import > from Plot Windows. The Import from Plot Windows dialog appears.
  2. Select one or more spectra.
  3. Click OK. The selected spectra appear in the Endmember Collection dialog.

Import Spectra from Endmember Collection Files


Use from Endmember Collection file to import an Endmember Collection file.

  1. From the Endmember Collection dialog menu bar, select Import > from Endmember Collection file. The Select Endmember Collection File to Import dialog appears.
  2. Select and open an Endmember Collection .txt file. ENVI updates the Endmember Collection dialog with the spectra from the specified file.