Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

HDF_READ


Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also

The HDF_READ function allows extraction of Hierarchical Data Format (HDF), HDF-EOS, and NetCDF data and metadata into an output structure based upon information provided through a graphical user interface or through a file template generated by HDF_BROWSER. The output structure is a single level structure corresponding to the data elements and names specified by HDF_BROWSER or its output template. Templates generated by HDF_BROWSER may be re-used for HDF files of identical format.

Graphical User Interface Menu Options

The following options are available from the graphical user interface menus.

Pulldown Menu

The following table shows the options available with the pulldown menu.

Menu Selection
Description
HDF/NetCDF Summary
DF24 (24-bit Images)
24-bit images and their attributes
DFR8 (8-bit Images)
8-bit images and their attributes
DFP (Palettes)
Image palettes
SD (Variables/Attributes)
Scientific Datasets and attributes
AN (Annotations)
Annotations
GR (Generic Raster)
Images
GR Global (File) Attributes
Image attributes
VGroups
Generic data groups
VData
Generic data and attributes
HDF-EOS Summary
Point
EOS point data and attributes
Swath
EOS swath data and attributes
Grid
EOS grid data and attributes

Preview Button

If you have selected an image, 2D data set, or 3xnxm data set from the pulldown menu, click on this button to view the image. If you have selected a data item that can be plotted in two dimensions, click on this button to view a 2D plot of the data (the default) or click on the "Surface" radio button to display a surface plot, click on the "Contour" radio button to display a contour plot, or click on the "Show3" radio button for an image, surface, and contour display. You can also select the "Fit to Window" checkbox to fit the image to the window.

Read Checkbox

Select this checkbox to extract the current data or metadata item from the HDF file.

Extract As

Specify a name for the extracted data or metadata item

Note
The Read Checkbox must be selected for the item to be extracted. Default names are generated for all data items, but may be changed at any time by the user.

Syntax

Result = HDF_READ( [Filename] [, DFR8=variable] [, DF24=variable] [, PREFIX=string] [, TEMPLATE =value] )

Return Value

Returns an output structure containing the specified Hierarchical Data Format (HDF), HDF-EOS, and NetCDF data and metadata.

Arguments

Filename

A string containing the name of a HDF file to extract data from. If Filename is not specified, a dialog allows you to specify a file. Note that if a template is specified, the template must match the HDF file selected.

Keywords

DFR8

Set this keyword to a named variable that will contain a 2 x n string array of extracted DFR8 images and their palettes. The first column will contain the extracted DFR8 image names, while the second column will contain the extracted name of the associated palette. If no palette is associated with a DFR8 image the palette name will be set to the null string. If no DFR8 images were extracted from the HDF file, this returned string will be the null string array ['', ''].

DF24

Set this keyword to a named variable that will contain a string array of the names of all the extracted DF24 24-bit images. This is useful in determining whether a (3,n,m) extracted data element is a 24-bit image or another type of data. If no DF24 24-bit images were extracted from the HDF file, the returned string will be the null string ('').

PREFIX

When HDF_READ is called without a template, it calls HDF_BROWSER to review the contents of an HDF file and create the default output names for the various data elements. By default, these names begin with a prefix derived from the filename. Set this keyword to a string value to be used in place of the default prefix.

TEMPLATE

Set this keyword to specify the HDF file template (generated by the function HDF_BROWSER), that defines which data elements to extract from the selected HDF file. Templates may be used on any files that have a format identical to the file the template was created from.

Examples

template = HDF_BROWSER('my.hdf')  
output_structure = HDF_READ(TEMPLATE=template) 

       or,

output_structure = HDF_READ('my.hdf') 

       or,

;Select'my.hdf' with the file locator 
output_structure = HDF_READ() 

       or,

output_structure = HDF_READ('just_like_my.hdf', TEMPLATE=template) 

Version History

Introduced: 5.1

See Also

HDF_BROWSER


Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]