Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
H5 Objects
Describe the properties of the different H5 objects
Description
H5 objects have some accessible properties. All the properties name are case insensitive (except for the path or objects names).
H5 File
The following properties can be accessed:
name: the filename;
size: the file size;
version: the HDF5 library version;
root: the root group "/".
H5 Group
The following properties can be accessed:
attributes: the attributes names;
groups: the subgroups names;
datasets: the datasets names;
types: the types names;
externals: the external links names;
softs: the soft links names;
danglings: the dangling links names;
hards: the hard links names;
links: the links names and types;
name: the group name;
path: the group path.
H5 Dataset
The following properties can be accessed:
attributes: the attributes names;
type: the dataset type;
dataspace: the dataset space;
data: the dataset data;
name: the group name;
path: the group path.
x = [1 2;3 4]; save(TMPDIR + "/x.sod", "x"); a = h5open(TMPDIR + "/x.sod"); dset_x = a.root.x; // dset_x is a dataset h5isSet(dset_x) // Access to the properties dset_x.attributes, dset_x.type, dset_x.dataspace, dset_x.data // Open the attribute x attr_x = dset_x.SCILAB_Class // Free all the resources h5close(a);
H5 Dataspace
The following properties can be accessed:
dims: the dataspace dimensions;
extents: the dataspace max dimensions;
type: the dataspace type: "scalar", "simple" or "null";
name: the parent name.
path: the parent path.
H5 Attribute
The following properties can be accessed:
type: the attribute type;
dataspace: the attribute dataspace;
data: the attribute data;
name: the attribute name.
path: the parent path.
H5 Type
The following properties can be accessed:
class: the type class;
type: the type name;
size: the size in bytes;
nativetype: the native type associated with this type;
nativesize: the size of the native type.
name: the parent name.
path: the parent path.
H5 Reference
H5 Reference object wrap an hypermatrix object where elements are a reference to an H5 object.
x = list([1 2;3 4], "Hello", uint32(123)); save(TMPDIR + "/x.sod", "x"); a = h5open(TMPDIR + "/x.sod"); dims_x = a.root.x.dataspace.dims ref_x = a.root.x.data; // ref_x is a reference h5isRef(ref_x) // Get the 3 elements x1 = ref_x(1), x2 = ref_x(2), x3 = ref_x(3) // Get the data x1.data, x2.data, x3.data // Free all the resources h5close(a);
See also
- h5attr — Create an attribute
- h5close — Close a HDF5 object
- h5cp — Copy an object
- h5dataset — Create a dataset and write the data
- h5dump — Dump the content of an H5 object on the standard output stream
- h5exists — Test the existence of named object
- h5flush — Flush all the buffers associated with a file
- h5get — Get a named object
- h5group — Create a group
- h5isAttr — Check if the HDF5 object is an attribute
- h5isFile — Check if the HDF5 object is a file
- h5isGroup — Check if the HDF5 object is a group
- h5isRef — Check if the HDF5 object is a reference object
- h5isSet — Check if the HDF5 object is a dataset
- h5isSpace — Check if the HDF5 object is a dataspace
- h5isType — Check if the HDF5 object is a type
- h5label — Label a dataset
- h5ln — Link an object to another one
- h5ls — List the content of an HDF5 object (group or dataset)
- h5mount — Mount a file on a group
- h5mv — Move an object
- h5open — Open an HDF5 file
- h5read — Read the data of an HDF5 attribute
- h5rm — Remove elements from an HDF5 file
- h5umount — Unmount a previously mounted file.
- h5write — Create a dataset (if it does not exist) and write the data
- h5writeattr — Write an attribute in a group or a dataset
History
Версия | Описание |
5.5.0 | HDF5 module introduced. |
Report an issue | ||
<< h5mv | HDF5 files | h5open >> |