H5Group

H5Group

Representation of a group inside a HDF5 file. This is an abstract interface that should not be created directly.

Members

attributes :Array

Description:
  • Array containing the names of all attributes of this object.

Source:

Array containing the names of all attributes of this object.

Type:
  • Array

Methods

children() → {Array}

Source:
Returns:

Names of the children of this group.

Type
Array

close()

Source:
Returns:

Closes the group handle. Any subsequent method invocations on this group or its children are considered invalid.

createDataSet(name, type, shape, optionsopt) → {H5DataSet}

Source:
Parameters:
Name Type Attributes Default Description
name string

Name of the dataset to create.

type string | object

Type of dataset to create. This can be "IntX" or "UintX" for X of 8, 16, 32, or 64; or "FloatX" for X of 32 or 64; or "String".

shape Array

Array containing the dimensions of the dataset to create. This can be set to an empty array to create a scalar dataset.

options object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
maxStringLength number <optional>
null

Maximum length of the strings to be saved. Only used when type = "String". If null, this should be inferred from the maximum length of strings in options.data. If options.data is null, this must be provided for type = "String".

data Array | TypedArray <optional>
<nullable>
null

Array to be written to the dataset. This is equivalent to calling H5DataSet.write immediately after the dataset is created.

Returns:

A dataset of the specified type and shape is created as an immediate child of the current group. A H5DataSet object is returned representing this new dataset.

Type
H5DataSet

createGroup(name)

Source:
Parameters:
Name Type Description
name string

Name of the group to create.

Returns:

{@H5Group} A group is created as an immediate child of the current group. A H5Group object is returned representing this new group. If a group already exists at name, it is returned directly.

open(name) → {H5Group|H5DataSet}

Source:
Parameters:
Name Type Description
name string

Name of the child element to open.

Returns:

Object representing the child element.

Type
H5Group | H5DataSet

readAttribute(attr) → {object}

Source:
Parameters:
Name Type Description
attr string

Name of the attribute.

Returns:

Object containing:

  • values, an Array or TypedArray containing the attribute data. This should have length equal to the product of shape for non-scalar attributes.
  • shape, an Array containing the dimensions of the attribute. This is empty for scalar attributes, in which case values will have length 1.
Type
object

writeAttribute(attr, type, shapenullable, x, optionsopt)

Source:
Parameters:
Name Type Attributes Default Description
attr string

Name of the attribute.

type string

Type of attribute to create. This can be "IntX" or "UintX" for X of 8, 16, 32, or 64; or "FloatX" for X of 32 or 64; or "String".

shape Array <nullable>

Array containing the dimensions of the attribute to create. If set to an empty array, this will create a scalar dataset.

x TypedArray | Array

Values to be written to the new attribute. This should be of length equal to the product of shape - unless shape is empty, in which case it should be of length 1.

options object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
maxStringLength number <optional>
<nullable>
null

Maximum length of the strings to be saved. Only used when type = "String". If null, this is inferred from the maximum length of strings in data.