Introduction to HDF5 HDF5 User Guide Other HDF5 documents and links |
And in this document, the
HDF5 Reference Manual
H5 H5A H5D H5E H5F H5G H5I H5P H5R H5RA H5S H5T H5Z Tools |
H5Dcreate
(hid_t loc_id
,
const char *name
,
hid_ttype_id
,
hid_tspace_id
,
hid_tcreate_plist_id
)
H5Dcreate
creates a data set with a name,
name
, in the file or in the group specified by
the identifier loc_id
.
The dataset has the datatype and dataspace identified by
type_id
and space_id
, respectively.
The specified datatype and dataspace are the datatype and
dataspace of the dataset as it will exist in the file,
which may be different than in application memory.
Dataset creation properties are specified by the argument
create_plist_id
.
create_plist_id
is a H5P_DATASET_CREATE
property list created with H5Pcreate()
and
initialized with the various functions described above.
H5Dcreate()
returns a dataset identifier for success
or negative for failure. The identifier should eventually be
closed by calling H5Dclose()
to release resources
it uses.
loc_id
name
type_id
space_id
create_plist_id
H5Dopen
(hid_t loc_id
,
const char *name
)
H5Dopen
opens an existing dataset for access in the file
or group specified in loc_id
. name
is
a dataset name and is used to identify the dataset in the file.
loc_id
name
H5Dget_space
(hid_t dataset_id
)
H5Dget_space
returns an identifier for a copy of the
dataspace for a dataset.
The dataspace identifier should be released with the
H5Sclose()
function.
dataset_id
H5Dget_type
(hid_t dataset_id
)
H5Dget_type
returns an identifier for a copy of the
datatype for a dataset.
The datatype should be released with the H5Tclose()
function.
If a dataset has a named datatype, then an identifier to the opened datatype is returned. Otherwise, the returned datatype is read-only. If atomization of the datatype fails, then the datatype is closed.
dataset_id
H5Dget_create_plist
(hid_t dataset_id
)
H5Dget_create_plist
returns an identifier for a
copy of the dataset creation property list for a dataset.
The creation property list identifier should be released with
the H5Pclose()
function.
dataset_id
H5Dread
(hid_t dataset_id
,
hid_t mem_type_id
,
hid_t mem_space_id
,
hid_t file_space_id
,
hid_t xfer_plist_id
,
void * buf
)
buf
,
converting from file datatype and dataspace to
memory datatype and dataspace.
H5Dread
reads a (partial) dataset, specified by its
identifier dataset_id
, from the file into the
application memory buffer buf
.
Data transfer properties are defined by the argument
xfer_plist_id
.
The memory datatype of the (partial) dataset is identified by
the identifier mem_type_id
.
The part of the dataset to read is defined by
mem_space_id
and file_space_id
.
file_space_id
can be the constant H5S_ALL
,
which indicates that the entire file data space is to be referenced.
mem_space_id
can be the constant H5S_ALL
,
in which case the memory data space is the same as the file data space
defined when the dataset was created.
The number of elements in the memory data space must match the number of elements in the file data space.
xfer_plist_id
can be the constant H5P_DEFAULT
,
in which case the default data transfer properties are used.
Datatype conversion takes place at the time of a read or write and is automatic. See the Data Conversion section of The Data Type Interface (H5T) in the HDF5 User's Guide for a discussion of data conversion, including the range of conversions currently supported by the HDF5 libraries.
dataset_id
mem_type_id
mem_space_id
file_space_id
xfer_plist_id
buf
H5Dwrite
(hid_t dataset_id
,
hid_t mem_type_id
,
hid_t mem_space_id
,
hid_t file_space_id
,
hid_t xfer_plist_id
,
const void * buf
)
buf
to
the specified dataset, converting from
memory datatype and dataspace to file datatype and dataspace.
H5Dwrite
writes a (partial) dataset, specified by its
identifier dataset_id
, from the
application memory buffer buf
into the file.
Data transfer properties are defined by the argument
xfer_plist_id
.
The memory datatype of the (partial) dataset is identified by
the identifier mem_type_id
.
The part of the dataset to write is defined by
mem_space_id
and file_space_id
.
file_space_id
can be the constant H5S_ALL
.
which indicates that the entire file data space is to be referenced.
mem_space_id
can be the constant H5S_ALL
,
in which case the memory data space is the same as the file data space
defined when the dataset was created.
The number of elements in the memory data space must match the number of elements in the file data space.
xfer_plist_id
can be the constant H5P_DEFAULT
.
in which case the default data transfer properties are used.
Writing to an external dataset will fail if the HDF5 file is not open for writing.
Datatype conversion takes place at the time of a read or write and is automatic. See the Data Conversion section of The Data Type Interface (H5T) in the HDF5 User's Guide for a discussion of data conversion, including the range of conversions currently supported by the HDF5 libraries.
dataset_id
mem_type_id
mem_space_id
file_space_id
xfer_plist_id
buf
H5Dextend
(hid_t dataset_id
,
const hsize_t * size
)
H5Dextend
verifies that the dataset is at least of size
size
.
The dimensionality of size
is the same as that of
the dataspace of the dataset being changed.
This function cannot be applied to a dataset with fixed dimensions.
dataset_id
size
H5Dclose
(hid_t dataset_id
)
H5Dclose
ends access to a dataset specified by
dataset_id
and releases resources used by it.
Further use of the dataset identifier is illegal in calls to
the dataset API.
dataset_id
Introduction to HDF5 HDF5 User Guide Other HDF5 documents and links |
And in this document, the
HDF5 Reference Manual
H5 H5A H5D H5E H5F H5G H5I H5P H5R H5RA H5S H5T H5Z Tools |