X
4468

PC transform on HDF file with spectral subset incorrectly uses all bands

Topic:

In ENVI 4.8 or earlier versions, it is possible to get incorrect results from a principal components transform, if you use an HDF format file as the input image, and also choose a spectral subset. In this case, the principal component transform does not honor the spectral subset. In other words, it includes all bands from the HDF file in the calculation of the transform. This Help Article describes some simple things you can do to avoid this problem.

Discussion:

We recently discovered that the HDF file reader in ENVI was not allowing the principal components transform tool to honor, during the principal components calculation, any spectral subset of bands in the HDF file that the user may have specified for input. This problem does not occur for input files in any format other than HDF. That means that if you have performed any processing of your HDF file in ENVI prior to applying the principal components transform, the output file from that processing will not trigger this problem. This problem does not occur with HDF format files if all of the bands in the HDF file are use in the transform. This problem is resolved in the ENVI 5 release.

In earliert versions of ENVI, there are a couple of things you can do to avoid running into this problem.

1.       You can avoid using an HDF file as input to the transform by writing the HDF file out to an ENVI format (or any other supported format) file first.

a.       Start ENVI and open your HDF file.

b.      Choose File > Save File As > ENVI Standard (or any other supported file format).

c.       In the resulting New File Builder dialog, click Import file.

d.      Select your HDF file, then click OK.

e.      Back in the New File Builder dialog, enter an output filename for your new file, then click OK.

 

2.       If you do not wish to duplicate on your hard disk the full data in the HDF file, you could make a new ENVI format (or any other supported format) file containing only the bands that you wish to include in the principal components transform.

a.       Start ENVI and open your HDF file.

b.      Choose File > Save File As > ENVI Standard (or any other file format).

c.       In the resulting New File Builder dialog, click Import file.

d.      In the resulting Create New File Input File dialog, change the Select By option from “File to “Band”. You will now see all of the bands in your open files.

e.      Select the bands that you wish to include in the principal components transform (hold down the Ctrl button to select multiple bands), then click OK.

f.        Back in the New File Builder dialog, enter an output filename for your new spectral subset file, then click OK.