Describe the properties of the different H5 objects
H5 objects have some accessible properties. All the properties name are case insensitive (except for the path or objects names).
The following properties can be accessed:
name: the filename;
size: the file size;
version: the HDF5 library version;
root: the root 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.
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); | ![]() | ![]() |
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.
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.
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 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); | ![]() | ![]() |
Version | Description |
5.5.0 | HDF5 module introduced. |