H5_BROWSER
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
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.
Syntax
Result = H5_BROWSER([Files] [, /DIALOG_READ] )
Return Value
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.
Arguments
Files
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.
Keywords
DIALOG_READ
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.
Examples
The following example starts up the HDF5 browser on a sample file:
File = FILEPATH('hdf5_test.h5', SUBDIR=['examples','data'])
Result = H5_BROWSER(File)
Using the HDF5 Browser Interface
When you call H5_BROWSER with the preceding code, an interface similar to the following appears.
The following steps import image data into IDL.
- Navigate to the image data. Expand the top-level item, and the images item.
- Select an image file. In this example, select Eskimo. A preview is automatically displayed.
- Import the image data. Make sure the Include data option is selected, accept the default Variable name for import value and click Import to IDL.
- Import the image palette. Repeat the previous two steps, but select Eskimo palette.
- Dismiss the dialog. After importing all your data, click Done. The structure
EskimoandEskimo_Paletteappear 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 theEskimostructure expanded and the_Dataelement selected.
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:
Version History
See Also

