|
IDL Reference Guide: Procedures and Functions |
|
The H5_BROWSER function presents a graphical user interface for viewing and reading HDF5 files. The browser provides a tree view of the HDF5 file or files, a data preview window, and an information window for the selected objects. The browser may be created as either a selection dialog with Open/Cancel buttons, or as a standalone browser that can import data to the IDL main program level.
| Note This function is not part of the standard HDF5 interface, but is provided as a programming convenience. |
Result = H5_BROWSER([Files] [, /DIALOG_READ] )
If the DIALOG_READ keyword is specified then the Result is a structure containing the selected group or dataset (as described in the H5_PARSE function), or a zero if the Cancel button was pressed. If the DIALOG_READ keyword is not specified then the Result is the widget ID of the HDF5 browser.
An optional scalar string or string array giving the name of the files to initially open. Additional files may be opened interactively. If Files is not provided then the user is automatically presented with a File Open dialog upon startup.
If this keyword is set then the HDF5 browser is created as a modal Open/Cancel dialog instead of a standalone GUI. In this case, the IDL command line is blocked, and no further input is taken until the Open or Cancel button is pressed. If the GROUP_LEADER keyword is specified, then that widget ID is used as the group leader, otherwise a default group leader base is created.
All keywords to WIDGET_BASE, such as GROUP_LEADER and TITLE, are passed on to the top-level base.
The following example starts up the HDF5 browser on a sample file:
File = FILEPATH('hdf5_test.h5', SUBDIR=['examples','data'])
Result = H5_BROWSER(File)
When you call H5_BROWSER with the preceding code, an interface similar to the following appears.
The following steps import image data into IDL.
Eskimo and Eskimo_Palette appear in the variable watch window. (Position your cursor in the command line and hit the enter key if you need to refresh the variable watch window to display the structures.) The following figure show a subset of the variable watch window with the Eskimo structure expanded and the _Data element selected.
IIMAGE, Eskimo._Data, RGB_TABLE=Eskimo_Palette._Data, /ORDER
The following table describes elements that are always available fields in a HDF5 Browser dialog.
If the DIALOG_READ keyword is present then the following options are available:
If the DIALOG_READ keyword is not present then the following options are available:
H5_PARSE, Hierarchical Data Format - HDF5
IDL Online Help (March 06, 2007)