I have a HDF5 file, which contains a dataset of compound datatype, for example, the dataset is 'MyData', which has (200 x 5) elements(or say dimension is 200 rows, 5 columns), the dataset has 5 members, I would like to demonstrate that in C/C++ data structure
struct MyDataType {
int nID;
double myTime;
char szName[12];
int Reserved;
int nCRC;
};
I know in HDF5 we can read only partial of the data, say the member nID into a int nIDs[200][5] array, without reading the whole dataset, yet I do NOT know which API to use, can anyone be kindly to show me the way, thanks.
You define a datatype that contains only the members you want to read and then specify this datatype on reading the data.
Cheers,
Werner
···
On 25.12.2014 10:49, 暮如雪 wrote:
Hi,
I have a HDF5 file, which contains a dataset of compound datatype, for example, the dataset is 'MyData', which has (200 x 5) elements(or say dimension is 200 rows, 5 columns), the dataset has 5 members, I would like to demonstrate that in C/C++ data structure
struct MyDataType {
int nID;
double myTime;
char szName[12];
int Reserved;
int nCRC;
};
I know in HDF5 we can read only partial of the data, say the member nID into a int nIDs[200][5] array, without reading the whole dataset, yet I do NOT know which API to use, can anyone be kindly to show me the way, thanks.
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362