Hello,
I have a compound dataset where h5dump generates the following information:
DATASET "SUBCASE" {
DATATYPE H5T_COMPOUND { ...
H5T_STRING {
STRSIZE 128;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "TITLE";
The other entries in this COMPOUND dataset consists of arrays of integers and
floats; I have no problem reading any of them.
But I am trying to read ONLY the "TITLE" entry. So I do the following:
hid_t memtype;hid_t native;
memtype = H5Tcreate (h5T_COMPOUND,128);native = H5Tcopy (H5T_C_S1);H5Tinsert
(memtype,"TITLE",128,native);
My dataset is opened under hid_t did. I then do
hid_t space;char data[200];
space = H5Dget_space (did);H5Dread
(did,memtype,H5S_ALL,H5S_ALL,H5P_DEFAULT,data);
The problem is that "data" comes back with all blanks. But h5dump and HDFView
show that the title has a real, non-blank string there.
This is my first time reading H5T_STRINGs. Clearly, I'm doing something wrong.
Can somebody point me towards the solution to this so that "data" will contain
the string I'm looking for?
Thanks.
-Arthur_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5