ddn.data.hdf5.dimension_scale
HDF5 Dimension Scale Wrapper
This module provides a D wrapper for HDF5 Dimension Scale operations. Dimension scales associate coordinate values with dataset dimensions, providing a way to label and reference axes in multi-dimensional data.
License
BSD-3-Clause
struct DimensionScale
Types 1
structDimensionScale
Static wrapper for HDF5 Dimension Scale operations.
This struct provides static methods for creating and managing dimension scales in HDF5 files. Dimension scales allow you to associate coordinate values with dataset dimensions.
Example:
// Create a dataset and convert it to a dimension scale
auto scaleDset = createScaleDataset(file, "x_coords", xData);
DimensionScale.setScale(scaleDset, "x");
// Attach the scale to dimension 0 of a data dataset
DimensionScale.attachScale(dataDset, scaleDset, 0);
// Set a label for dimension 0
DimensionScale.setLabel(dataDset, 0, "X Axis");Methods
void setScale(hid_t dsid, string name = null)Converts a dataset to a dimension scale.bool isScale(hid_t did)Checks if a dataset is a dimension scale.string getScaleName(hid_t did)Gets the name of a dimension scale.void attachScale(hid_t did, hid_t dsid, uint idx)Attaches a dimension scale to a dataset dimension.void detachScale(hid_t did, hid_t dsid, uint idx)Detaches a dimension scale from a dataset dimension.bool isAttached(hid_t did, hid_t dsid, uint idx)Checks if a dimension scale is attached to a dataset dimension.int getNumScales(hid_t did, uint idx)Gets the number of dimension scales attached to a dimension.void setLabel(hid_t did, uint idx, string label)Sets a label for a dataset dimension.string getLabel(hid_t did, uint idx)Gets the label for a dataset dimension.