HDF5 documents and links Introduction to HDF5 HDF5 User Guide Other High-level API documents |
And in this document, the
HDF5 Reference Manual
H5DS H5IM H5LT H5PT H5TB H5 H5A H5D H5E H5F H5G H5I H5L H5O H5P H5R H5S H5T H5Z Tools Datatypes |
Programming Hints:
To use any of these functions or subroutines, you must first include the relevant include file (C) or module (Fortran) in your application.
The following line includes the HDF5 Dimension Scale package, H5DS,
in C applications:
#include "hdf5_hl.h"
This line includes the H5DS module in Fortran applications:
use h5ds
The C Interfaces:
The FORTRAN90 Interfaces:
If dimname is specified, then an attribute called NAME is created, with the value dimname.
Fails if:
If the dataset was created with the Table, Image, or Palette interface [9], it is not recommended to convert to a Dimension Scale. (These Datasets will have a CLASS Table, Image, or Palette.)
hid_t dsid; | IN: the dataset to be made a Dimension Scale |
char *dimname; | IN: the dimension name (optional), NULL if the dimension has no name. |
SUBROUTINE H5DSset_scale_f(dsid, errcode, dimname) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made ! a Dimension Scale INTEGER :: errcode ! Error code CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name END SUBROUTINE H5DSset_scale_f
Entries are created in the DIMENSION_LIST and REFERENCE_LIST attributes, as defined in section 4.2.
Fails if:
Note: The Dimension Scale dsid can be attached to the same dimension more than once, which has no effect.
hid_t did; | IN: the dataset |
hid_t dsid; | IN: the scale to be attached |
unsigned int idx; | IN: the dimension of did that dsid is associated with. |
SUBROUTINE H5DSattach_scale_f(did, dsid, idx, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The dataset INTEGER(hid_t), INTENT(in) :: dsid ! The scale to be attached INTEGER , INTENT(in) :: idx ! The dimension of did that ! dsid is associated with. INTEGER :: errcode ! Error code END SUBROUTINE H5DSattach_scale_f
Fails if:
Note that a scale may be associated with more than dimension of the same dataset. If so, the detach operation only deletes one of the associations, for did.
hid_t did; | IN: the dataset |
hid_t dsid; | IN: the scale to be detached |
unsigned int idx; | IN: the dimension of did to detach |
SUBROUTINE H5DSdetach_scale_f(did, dsid, idx, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The dataset INTEGER(hid_t), INTENT(in) :: dsid ! The scale to be detached INTEGER , INTENT(in) :: idx ! The dimension of did to detach INTEGER :: errcode ! Error code END SUBROUTINE H5DSdetach_scale_f
Fails if:
hid_t did; | IN: the dataset |
hid_t dsid; | IN: the scale to be attached |
unsigned int idx; | IN: the dimension of did that dsid is associated with. |
SUBROUTINE H5DSdetach_scale_f(did, dsid, idx, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The dataset INTEGER(hid_t), INTENT(in) :: dsid ! The scale to be detached INTEGER , INTENT(in) :: idx ! The dimension of did to detach INTEGER :: errcode ! Error code END SUBROUTINE H5DSdetach_scale_f
The operation receives the Dimension Scale dataset identifier, dsid, and the pointer to the operator data passed in to H5DDiterate_scales, visitor_data.
The return values from an operator are:
H5DSiterate_scales assumes that the scales of the dimension identified by dim remain unchanged through the iteration. If the membership changes during the iteration, the function's behavior is undefined.
hid_t did; | IN: the dataset |
unsigned dim; | IN: the dimension of dataset did |
int *idx; | IN/OUT: input the index to start iterating, output the next index to visit. If NULL, start at the first position. |
H5DS_iterate_t visitor; | IN: the visitor function |
void *visitor_data; | IN: arbitrary data to pass to the visitor function. |
Fails if:
hid_t did; | IN: the dataset |
unsigned int idx; | IN: the dimension |
char *label; | IN: the label |
SUBROUTINE H5DSset_label_f(did, idx, label, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The dataset INTEGER , INTENT(in) :: idx ! The dimension CHARACTER(LEN=*), INTENT(in) :: label ! The label INTEGER :: errcode ! Error code END SUBROUTINE H5DSset_label_f
If did has no label, the return value of label is NULL.
Fails if:
hid_t did; | IN: the dataset |
unsigned int idx; | IN: the dimension |
char *label; | OUT: the label |
size_t size; | IN: the length of the label buffer. |
SUBROUTINE H5DSget_label_f(did, idx, label, size, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The dataget INTEGER , INTENT(in) :: idx ! The dimension CHARACTER(LEN=*), INTENT(in) :: label ! The label INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer INTEGER :: errcode ! Error code END SUBROUTINE H5DSget_label_f
int did; | IN: dimension scale identifier |
char *name; | OUT: the name, or NULL if there is no name set. |
size_t size; | IN: the maximum characters to copy into name. |
SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The dataget CHARACTER(LEN=*), INTENT(out) :: name ! The name INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer INTEGER :: errcode ! Error code END SUBROUTINE H5DSget_scale_name_f
hid_t did; | IN: the data set to query |
SUBROUTINE H5DSis_scale_f(did, is_scale, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The data set to query LOGICAL , INTENT(out) :: is_scale ! Logical: ! .TRUE. if did is a Dimension Scale INTEGER :: errcode ! Error code END SUBROUTINE H5DSis_scale_f
hid_t did; | IN: the data set to query |
unsigned int idx; | IN: the dimension of did to query. |
SUBROUTINE H5DSget_num_scales_f(did, idx, num_scales, errcode) IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: did ! The dataset INTEGER , INTENT(in) :: idx ! The dimension of did to query INTEGER , INTENT(out) :: num_scales ! The number of Dimension Scales ! associated with did INTEGER :: errcode ! Error code END SUBROUTINE H5DSget_num_scales_f
HDF5 documents and links Introduction to HDF5 HDF5 User Guide Other High-level API documents |
And in this document, the
HDF5 Reference Manual
H5DS H5IM H5LT H5PT H5TB H5 H5A H5D H5E H5F H5G H5I H5L H5O H5P H5R H5S H5T H5Z Tools Datatypes |