![]() |
![]() |
![]() |
![]() |
Rd_HDF5_Field, Rd_HDF5_Time_Field
Synopsis
Rd_HDF5_Field reads an Express field out of an HDF5 file. Rd_HDF5_Time_Field is similar to Rd_HDF5_Field except that it only reads time-dependent fields and its output is always a time-dependent field.
Input Port
Parameters
Output Port
Description
The Rd_HDF5_Field reads an Express field out of an HDF5 file. Please note that the HDF5 file must be written using a specific set of Express conventions. This is not a tool for importing arbitrary HDF5 files written by 3rd-party applications. It is comparable to the familiar MODS.Read_Field, although it handles time-dependent fields somewhat differently and has a more complex user interface that MODS.Read_Field.
When Rd_HDF5_Field is first instanced, the user is presented with a simple user interface. The meaning of filename typein box, the browse button, and the "Read File" button are all fairly self-explanatory. Note: The file will not be read until the "Read File" button is pressed, just specifying a file name is not enough.
Once a file name is specified, the rest of the user interface will appear. The details of the UI depend on the contents of the file, If the field in the HDF5 file is a time-dependent field, then the first element in the detailed user interface is a UIslider to specify a time step. The default value is 0, which means the first time step.
If the field in the HDF5 file has node data, the next element in the user interface is a UIoptionBox giving the user a choice of which node data components to read in. The interface is similar to the interface of MODS.extract_components. The default is to read in all the components. Due to a bug in UIoptionBox the defaults are not always reinitialized correctly when switching files. If the field in the HDF5 file has cell data, the next element in the user interface is a UIoptionBox giving the user a choice of whichcell data components to read in. The interface should be similar to the interface of MODS.extract_cell_components. The default is to read in all the components. It is possible, although uncommon, that a field will have neither node data or cell data.
The next sets of UI controls are for controlling the subsetting (crop/downsize) functionality that is integrated into the reader. The controls are only present if the field has dimensions. Only structured fields (including uniform, rectilinear and irregular/struct) have dimensions.
The first set of the subsetting UI controls are sliders for controlling the crop parameters. The interface should be almost exactly the same as the interface of the MODS.crop macro. For each dimension of the field there are two sliders, one for the min crop parameter and one for the max crop parameter. By default, the parameters are set so that the entire field is read in.
The second set of subsetting UI controls are sliders for controlling the downsize parameters. The interface should be almost exactly the same as the interface of the MODS.downsize macro. For each dimension of the field there is one slider. A downsize factor of means not to downsize in that dimension. By default, the parameters are set so that the entire field is read in.
The downsize algorithm implemented in the reader is a bit simpler than DVdownsize so the results may not match exactly when comparing the integrated downsize to a seperate downsize module.
It is very similar to Rd_HDF5_Field except that it only reads time-dependent fields and its output always is a time-dependent field. The user interface is the same as Rd_HDF5_Field except there is never a time step slider.
For code samples that show how to write an HDF5 file compatible with this reader see the directory src/hdf5/examp.
Input
Parameters
UIcheckBox. Gives the user a choice of which node data components to be read in if the file has node data.
UIcheckBox. Gives the user a choice of which node data components to be read in if the file has cell data.
Crop I min
Crop J min
Crop I max
Crop J maxUIsliders. Used to set crop dimensions. I min and J min, set the lower bound array index in their respective dimensions; I max and J max set the upper bound array index in their respective dimensions.
Float UIsliders to specify the scaling coefficient. The output field's values (and coordinates for irregular data) are: dims_out[i] = dims_in[i] / factor [i] where i cycles through the dims of the field, either 1D, 2D, or 3D.
Output Port
The new field that results from reading an input file. The type of the field is totally dependent on the contents of the input file.
Example
File
See also related modules
![]() |
![]() |
![]() |
![]() |