Programming Previous page   Next Page

Using the HDF Import Tool

The HDF Import Tool is a graphical user interface that you can use to navigate through HDF4 or HDF-EOS data sets and import data from them. Importing data using the HDF Import Tool involves these steps:

The following sections provide more detail about each of these steps.

Step 1: Opening an HDF4 File in the HDF Import Tool

To open an HDF4 file, select the Import Data option from the MATLAB File menu. MATLAB displays a file selection dialog box. If you select an HDF4 file, the Import Wizard automatically starts the HDF Import Tool.

You can also open a file with the HDF Import Tool by entering the hdftool command at the MATLAB command line:

If you use the hdftool function without arguments, it starts the HDF Import Tool and automatically opens a file selection dialog box.You can open multiple files in the HDF Import Tool at the same time.

Overview of the HDF Import Tool.   Initially, the HDF Import Tool window contains three panes: the Contents pane, Metadata pane, and the Importing and Subsetting pane. Initially, the Contents pane contains the name of the file you opened and the other panes are empty, as illustrated in the following figure.

Step 2: Selecting a Data Set in an HDF File

To select a data set to import, use the Contents pane to navigate through the file. Click the plus sign at the left of the filename to expand the hierarchical table of contents and see a list of the data sets in the file. (For HDF-EOS files, you can choose how the HDF Import Tool displays the contents. See Specifying the View in the Contents Pane for more information.)

For example, this figure shows the expanded table of contents in the Contents pane, with the data set Example SDS selected. Note how the Metadata pane now displays information about the data set and the Importing and Subsetting pane displays subsetting options available for the data set.

Specifying the View in the Contents Pane.   If you are opening an HDF-EOS file, you can specify whether you want to view the contents of the file as an HDF4 file or as an HDF-EOS file, or both, as illustrated in the following figure. Note, however, that the contents of HDF4 files cannot be viewed as HDF-EOS files.

Step 3: Specifying a Subset of the Data

When you select a data set, the Importing and Subsetting pane displays the subsetting options available for that type of data set. The subsetting options available depend on the type of data set. For more information, see Using the HDF4 Import Tool Subsetting Options.

Step 4: Importing Data and Metadata

To import the data set you have selected, click the Import button in the bottom right corner of the Importing and Subsetting pane, as illustrated in the following figure. Using the Importing and Subsetting pane, you can


Previous page  Importing HDF4 and HDF-EOS Data Using the HDF4 Import Tool Subsetting Options Next page

© 1994-2005 The MathWorks, Inc.