hdf5
hdf5
Classes
| Name | |
|---|---|
| struct | hdf5::HDF5LoadOptions |
| struct | hdf5::HDF5FlatUnsignedOptions Options for loading flat unsigned sample arrays (e.g. Wavesurfer digitalScans). |
Functions
| Name | |
|---|---|
| std::vector< hsize_t > | get_ragged_dims(H5::DataSet & dataset) get_ragged_dims |
| template <typename T > H5::VarLenType |
get_varlen_type() Get the variable length type for template type T. |
| template <typename T > H5::PredType |
get_datatype() Get the HDF5 predefined type for template type T. |
| template <typename T > std::vector< std::vector< T > > |
load_ragged_array(H5::DataSet & dataset) Load a ragged array from an HDF5 dataset. |
| template <typename T > std::vector< T > |
load_array(H5::DataSet & dataset) Load a regular array from an HDF5 dataset. |
| template <typename T > std::vector< T > |
load_array(HDF5LoadOptions const & opts) Load a regular array from an HDF5 file. |
| template <typename T > std::vector< std::vector< T > > |
load_ragged_array(HDF5LoadOptions const & opts) Load a ragged array from an HDF5 file. |
| std::vector< hsize_t > | get_dataset_dims(H5::DataSet & dataset) Get the dimensions of an HDF5 dataset. |
| std::vector< hsize_t > | get_dataset_dims(HDF5LoadOptions const & opts) Get the dimensions of an HDF5 dataset by file path and key. |
| std::optional< std::size_t > | get_identity_sample_count(HDF5FlatUnsignedOptions const & opts) Compute the number of samples in a dataset for identity TimeFrame creation. |
| std::vector< uint16_t > | load_flat_unsigned_array(HDF5FlatUnsignedOptions const & opts) Load a flat unsigned array from an HDF5 dataset as uint16 samples. |
Functions Documentation
function get_ragged_dims
std::vector< hsize_t > get_ragged_dims(
H5::DataSet & dataset
)get_ragged_dims
Parameters:
- dataset
- dataset HDF5 dataset
Return:
- Vector of dimensions
Get the dimensions of a dataset for ragged arrays.
function get_varlen_type
template <typename T >
H5::VarLenType get_varlen_type()Get the variable length type for template type T.
Template Parameters:
- T The data type (float, double, int)
Return: H5::VarLenType for the specified type
function get_datatype
template <typename T >
H5::PredType get_datatype()Get the HDF5 predefined type for template type T.
Template Parameters:
- T The data type (float, double, int)
Return: H5::PredType for the specified type
function load_ragged_array
template <typename T >
std::vector< std::vector< T > > load_ragged_array(
H5::DataSet & dataset
)Load a ragged array from an HDF5 dataset.
Parameters:
- dataset HDF5 dataset
Template Parameters:
- T The data type (float, double, int)
Return: Vector of vectors containing the ragged array data
function load_array
template <typename T >
std::vector< T > load_array(
H5::DataSet & dataset
)Load a regular array from an HDF5 dataset.
Parameters:
- dataset HDF5 dataset
Template Parameters:
- T The data type (float, double, int)
Return: Vector containing the array data
function load_array
template <typename T >
std::vector< T > load_array(
HDF5LoadOptions const & opts
)Load a regular array from an HDF5 file.
Parameters:
- opts Load options containing file path and key
Template Parameters:
- T The data type (float, double, int)
Return: Vector containing the array data
function load_ragged_array
template <typename T >
std::vector< std::vector< T > > load_ragged_array(
HDF5LoadOptions const & opts
)Load a ragged array from an HDF5 file.
Parameters:
- opts Load options containing file path and key
Template Parameters:
- T The data type (float, double, int)
Return: Vector of vectors containing the ragged array data
function get_dataset_dims
std::vector< hsize_t > get_dataset_dims(
H5::DataSet & dataset
)Get the dimensions of an HDF5 dataset.
Parameters:
- dataset HDF5 dataset handle
Return: Vector of dimension sizes
function get_dataset_dims
std::vector< hsize_t > get_dataset_dims(
HDF5LoadOptions const & opts
)Get the dimensions of an HDF5 dataset by file path and key.
Parameters:
- opts Load options containing file path and dataset key
Return: Vector of dimension sizes
function get_identity_sample_count
std::optional< std::size_t > get_identity_sample_count(
HDF5FlatUnsignedOptions const & opts
)Compute the number of samples in a dataset for identity TimeFrame creation.
Parameters:
- opts Flat unsigned load options (uses sweep_row for 2D datasets)
Return: Number of samples along the fast axis, or nullopt on error
function load_flat_unsigned_array
std::vector< uint16_t > load_flat_unsigned_array(
HDF5FlatUnsignedOptions const & opts
)Load a flat unsigned array from an HDF5 dataset as uint16 samples.
Parameters:
- opts Flat unsigned load options
Return: Vector of uint16 samples
Supports native uint8 (zero-extended) and uint16 storage. For 2D datasets, reads the row specified by sweep_row. For 1D datasets, reads all elements.
Updated on 2026-11-13 at 20:25:42 +0000