Hi everybody !

I've got a problem trying to read some compound dataset in HDF5 file using
HDF5DotNet Wrapper.

How to read a compound dataset without knowing in advance the memory
structure in C#?.

All the examples in C using structures already match the data structure of
the compound dataset.

Here is a snippet of code i've used:


                case H5T.H5TClass.COMPOUND:

                    TableFieldInfo oTableFieldInfo =
H5TB.getFieldInfo(oGroupId,"unite");

                    H5DataSetId oDatasetId = H5D.open(oGroupId,
a_strNomDataset);
                    H5DataTypeId oDataTypeId = H5D.getType(oDatasetId);

                    // Get the number of fields of the compound dataset
                    int numFields = H5T.getNMembers(oDataTypeId);

                    // Look at each of the member fields
                    for (int i = 0; i < numFields; i++)
                    {
                        H5T.H5TClass memberClass =
H5T.getMemberClass(oDataTypeId, i);

                        string memberName =
H5T.getMemberName(oDataTypeId,i);
                        H5DataTypeId memberDataTypeId =
H5T.getMemberType(oDataTypeId, i);
                        int nOffset = H5T.getMemberOffset(oDataTypeId, i);
                        int nLength = (int)H5T.getSize(memberDataTypeId);

                        Console.WriteLine(String.Format("Member Name: {0};
Class: {1}; Length: {2}", memberName, memberClass.ToString(),
nLength.ToString()));

                        H5T.close(memberDataTypeId);
                    }

                    H5D.read(oDataSetId, oDataTypeId, new
H5Array<????>(???));

                    /* For Testing purpose */
                    IntPtr[] off = oTableFieldInfo.fieldOffset;
                    IntPtr[] size = oTableFieldInfo.fieldSize;
                    IntPtr[] type_taille = oTableFieldInfo.typeSize;

                    break;
By what i can replace the interrogation marks at the line:
H5D.read(oDataSetId, oDataTypeId, new H5Array<????>(???));


I've rewrite the H5BTtead_fields_name high-level function in C# but the
problem remain because we need to put a structure for the H5D.read()
function!

Thanks for help !
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to