Re: [Hdf-forum] c# read different datatypes
Can anyone show how to read string data and compound data,cause all my attempts end up with unreadable output and without this data i can't go ahead -__- to make some calculations. TRAAAVO128F93133D4.h5 http://hdf-forum.184993.n3.nabble.com/file/n4026086/TRAAAVO128F93133D4.h5 The majority of similar questions in this forum are unanswered ( -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026086.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
Here is a C# class that i created for my application to read / write some 2D and 3D arrays and basic data types. It has functions to read / write strings. I have not used compound data. Hope this helps a bit. Shashi class HDFFileHandler { public enum DataTypes { STRING, INTEGER, DOUBLE, BYTE, USHORT, FLOAT } public H5FileId CreateFile(string filename) { return H5F.create(filename, H5F.CreateMode.ACC_TRUNC); } public H5GroupId CreateGroup(string groupName, H5LocId parentGroup) { return H5G.create(parentGroup, groupName); } public H5DataSetId Create1DDataSet(string datasetName, H5FileOrGroupId parentGroup, DataTypes datatype, int size) { long[] dims = new long[1]; dims[0] = size; H5DataSpaceId spaceId = H5S.create_simple(1, dims); H5DataTypeId typeId = null; switch (datatype) { case DataTypes.BYTE: typeId = H5T.copy(H5T.H5Type.NATIVE_UCHAR); break; case DataTypes.DOUBLE: typeId = H5T.copy(H5T.H5Type.NATIVE_DOUBLE); break; case DataTypes.INTEGER: typeId = H5T.copy(H5T.H5Type.NATIVE_INT); break; case DataTypes.STRING: typeId = H5T.copy(H5T.H5Type.C_S1); break; case DataTypes.FLOAT: typeId = H5T.copy(H5T.H5Type.NATIVE_FLOAT); break; case DataTypes.USHORT: typeId = H5T.copy(H5T.H5Type.NATIVE_USHORT); break; default: break; } return H5D.create(parentGroup, datasetName, typeId, spaceId); } public H5DataSetId Create2DDataSet(string datasetName, H5FileOrGroupId parentGroup, DataTypes datatype, int sizeX, int sizeY) { long[] dims = new long[2]; dims[0] = sizeX; dims[1] = sizeY; H5DataSpaceId spaceId = H5S.create_simple(2, dims); H5DataTypeId typeId = null; switch (datatype) { case DataTypes.BYTE: typeId = H5T.copy(H5T.H5Type.NATIVE_UCHAR); break; case DataTypes.DOUBLE: typeId = H5T.copy(H5T.H5Type.NATIVE_DOUBLE); break; case DataTypes.INTEGER: typeId = H5T.copy(H5T.H5Type.NATIVE_INT); break; case DataTypes.STRING: typeId = H5T.copy(H5T.H5Type.C_S1); break; case DataTypes.FLOAT: typeId = H5T.copy(H5T.H5Type.NATIVE_FLOAT); break; case DataTypes.USHORT: typeId = H5T.copy(H5T.H5Type.NATIVE_USHORT); break; default: break; } return H5D.create(parentGroup, datasetName, typeId, spaceId); } public H5DataSetId Create3DDataSet(string datasetName, H5FileOrGroupId parentGroup, DataTypes datatype, int sizeX, int sizeY, int nSizeZ) { long[] dims = new long[3]; dims[0] = sizeX; dims[1] = sizeY; dims[2] = nSizeZ; H5DataSpaceId spaceId = H5S.create_simple(3, dims); H5DataTypeId typeId = null; switch (datatype) { case DataTypes.BYTE: typeId = H5T.copy(H5T.H5Type.NATIVE_UCHAR); break; case DataTypes.DOUBLE: typeId = H5T.copy(H5T.H5Type.NATIVE_DOUBLE); break; case DataTypes.INTEGER: typeId = H5T.copy(H5T.H5Type.NATIVE_INT); break; case DataTypes.STRING: typeId = H5T.copy(H5T.H5Type.C_S1); break; case DataTypes.FLOAT: typeId = H5T.copy(H5T.H5Type.NATIVE_FLOAT); break; case DataTypes.USHORT: typeId = H5T.copy(H5T.H5Type.NATIVE_USHORT); break; default: break; } return H5D.create(parentGroup, datasetName, typeId, spaceId); } public void CloseFile(H5FileId fileId) { H5F.close(fileId); } public void CloseGroup(H5GroupId grpId) { H5G.close(grpId); } public void CloseDataset(H5DataSetId datasetId) { H5D.close(datasetId); } public H5FileId OpenFile(string filename,
Re: [Hdf-forum] c# read different datatypes
Thx,unfortunately,i have already tried reading string as byte array and it returns 0 . -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026088.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
I use that class in my project to read and write strings..And it works perfectly. If you had written the string using the write method i have in my class the read should work..May be the way you have written is different than mine. -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026089.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
The problem is ,that i don't write data,i only have a file to read) but finaly i got the byte array [,] and got data from string table, now i need just to transfer the values in [] array and use System.Text.Encoding.ASCII.GetString(); to make them readable I hope it will be fine. Then i`ll try byte array with compound dataset,just need time) -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026090.html Sent from the hdf-forum mailing list archive at Nabble.com.___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
Is it possible to read only 1 definite data field and not the hole dataset of a table? -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026091.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
If you watch the file in Hdfview string has different length *32* and *1024*. Can it influence the results? -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026081.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
I got stuck with it.When i use calls1[0].a.ToString() ,it returns ,the rest of the data wich distinguishes from CharArray is not also correct.How should i define the datatype of the dataset in another way?Should i define the datatype only for string data and is it possible? H5AttributeId attributeId=null; H5DataTypeId dataType = null; H5DataSetId dsetId = H5D.open(fileID, /metadata/songs); dt = H5D.getType(dsetId); H5D.read(dsetId, dataType, new H5Arraymetadata(s1)); -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026071.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
It looks ok at first glance. Do you define s1? I have no code I can extract for a simple example, but I have many where I use strings in a compound data type. S -Original Message- From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of Insane Sent: Wednesday, April 10, 2013 4:57 PM To: hdf-forum@hdfgroup.org Subject: Re: [Hdf-forum] c# read different datatypes I got stuck with it.When i use calls1[0].a.ToString() ,it returns ,the rest of the data wich distinguishes from CharArray is not also correct.How should i define the datatype of the dataset in another way?Should i define the datatype only for string data and is it possible? H5AttributeId attributeId=null; H5DataTypeId dataType = null; H5DataSetId dsetId = H5D.open(fileID, /metadata/songs); dt = H5D.getType(dsetId); H5D.read(dsetId, dataType, new H5Arraymetadata(s1)); -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c- read-different-datatypes-tp4026057p4026071.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
The only thing I saw in examples was next: H5DataTypeId typeId = H5T.copy(H5T.H5Type.C_S1); But i don't actually know how it can help.Can u explain exactly how it should be defined ? -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026073.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
You need to allocate a buffer where H5D.read() stores the data. H5Array doesn't do that, it's just a wrapper. You should have something like: Metadata[] s1 = new Metadata[datasetSize]; H5DataSetId dsetId = H5D.open(fileID, /metadata/songs); H5DataTypeId dataType = H5D.getType(dsetId); H5D.read(dsetId, dataType, new H5Arraymetadata(s1)); Scott -Original Message- From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of Insane Sent: Wednesday, April 10, 2013 5:17 PM To: hdf-forum@hdfgroup.org Subject: Re: [Hdf-forum] c# read different datatypes The only thing I saw in examples was next: H5DataTypeId typeId = H5T.copy(H5T.H5Type.C_S1); But i don't actually know how it can help.Can u explain exactly how it should be defined ? -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c- read-different-datatypes-tp4026057p4026073.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
Ah,i have done it already,i just didn't get your question from the very beginning. Sure, i defined s1 metadata[] s1 = new metadata[1]; After H5D.read ,i have data in s1 but the data is not correct. -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026075.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
example of h5 file,i took it from million song dataset TRAAAVO128F93133D4.h5 http://hdf-forum.184993.n3.nabble.com/file/n4026076/TRAAAVO128F93133D4.h5 table is /metadata/songs even when i debug ToString the data is wrong. Should i set fixed sizes for strings or do smth else? -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026076.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
With the string/Chararray fix, I think things will work. String is probably screwing up the offset of the rest of the fields. I think if you had an int/float/etc. first that one would work, but all after the string go 'bad'. Perhaps you need to add a [StructLayout(LayoutKind.Sequential)] to your struct. I do, but I'm not sure it's necessary. Scott -Original Message- From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of Insane Sent: Tuesday, April 09, 2013 11:31 AM To: hdf-forum@hdfgroup.org Subject: Re: [Hdf-forum] c# read different datatypes Thx,I got the idea with string ,hope i`ll cope with this, but how should i solve the problem with other data types? -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c- read-different-datatypes-tp4026057p4026059.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
Maybe, I am misunderstanding smth. I used this code [StructLayout(LayoutKind.Sequential)] public unsafe struct Chararray { private double* recordedText; //an initializer to get and set the char* since it is unsafe public double* RecordedText { get { return recordedText; } set { recordedText = value; } } public override string ToString() { string s = ; //the HDF5 STRING is not a string but in fact a char * //since it is we need to translate the return into a pointeraddress IntPtr ipp = (IntPtr)this.recordedText; //This call is used to transform the pointer into the valueof the pointer. //NOTE: this only works with null-terminated strings. s =System.Runtime.InteropServices.Marshal.PtrToStringAnsi(ipp); return s; } } - and added CharArray instead of char now the returning value of CharArray (is 0x07ce double*) -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026061.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
[StructLayout(LayoutKind.Sequential)] should be at the head of your metadata struct not Chararray. So, [StructLayout(LayoutKind.Sequential)] struct metadata { public Chararray a; public int b; public float c; public float d; public Chararray f; (and so on) } And define your strings within the HDF dataType as C_S1 and H5T.setVariableSize(). Scott -Original Message- From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of Insane Sent: Tuesday, April 09, 2013 3:58 PM To: hdf-forum@hdfgroup.org Subject: Re: [Hdf-forum] c# read different datatypes Maybe, I am misunderstanding smth. I used this code [StructLayout(LayoutKind.Sequential)] public unsafe struct Chararray { private double* recordedText; //an initializer to get and set the char* since it is unsafe public double* RecordedText { get { return recordedText; } set { recordedText = value; } } public override string ToString() { string s = ; //the HDF5 STRING is not a string but in fact a char * //since it is we need to translate the return into a pointeraddress IntPtr ipp = (IntPtr)this.recordedText; //This call is used to transform the pointer into the valueof the pointer. //NOTE: this only works with null-terminated strings. s =System.Runtime.InteropServices.Marshal.PtrToStringAnsi(ipp); return s; } } - and added CharArray instead of char now the returning value of CharArray (is 0x07ce double*) -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c- read-different-datatypes-tp4026057p4026061.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
Also I'm not sure why you're using a double* in Chararray. It should be a char* and is only used as a replacement for string. This is what I use: /// summary /// Chararray is a helper struct to marshal the strings into/out of unmanaged HDF. /// /summary [StructLayout(LayoutKind.Sequential)] public unsafe struct Chararray { /// summary /// internal C-string pointer. /// /summary [System.Runtime.InteropServices.MarshalAs(UnmanagedType.LPStr)] private char* mText; /// summary /// Creator to Load text value /// /summary /// param name=textstring to load/param public Chararray(string text) { // Duplicate 'Load' functionality IntPtr ipp = System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi(text); this.mText = (char*)ipp; } /// summary /// an initializer to get and set the char* since it is unsafe /// /summary public char* Text { get { return mText; } } /// summary /// free the text entered with Load /// /summary public void Cleanup() { if (mText != null) { System.Runtime.InteropServices.Marshal.FreeHGlobal((IntPtr)mText); mText = null; } } /// summary /// Override of ToString to get a .NET string from C. /// /summary /// returnsa .NET string/returns public override string ToString() { string s; //the HDF5 STRING is not a string but in fact a char * //since it is we need to translate the return into a pointer address IntPtr ipp = (IntPtr)this.Text; //This call is used to transform the pointer into the value of the pointer. //NOTE: this only works with null-terminated strings. s = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(ipp); return s; } }// Chararray Scott -Original Message- From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of Insane Sent: Tuesday, April 09, 2013 3:58 PM To: hdf-forum@hdfgroup.org Subject: Re: [Hdf-forum] c# read different datatypes Maybe, I am misunderstanding smth. I used this code [StructLayout(LayoutKind.Sequential)] public unsafe struct Chararray { private double* recordedText; //an initializer to get and set the char* since it is unsafe public double* RecordedText { get { return recordedText; } set { recordedText = value; } } public override string ToString() { string s = ; //the HDF5 STRING is not a string but in fact a char * //since it is we need to translate the return into a pointeraddress IntPtr ipp = (IntPtr)this.recordedText; //This call is used to transform the pointer into the valueof the pointer. //NOTE: this only works with null-terminated strings. s =System.Runtime.InteropServices.Marshal.PtrToStringAnsi(ipp); return s; } } - and added CharArray instead of char now the returning value of CharArray (is 0x07ce double*) -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c- read-different-datatypes-tp4026057p4026061.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http
Re: [Hdf-forum] c# read different datatypes
Sorry,what do you mean by And define your strings within the HDF dataType as C_S1 and H5T.setVariableSize(). ? I got the dataType this way: var dataType = H5D.getType(datasetID); -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026066.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
In my code I build the dataset via brute force to write the data. So I build out the H5T struct(s) that I use. -Original Message- From: Hdf-forum [mailto:hdf-forum-boun...@hdfgroup.org] On Behalf Of Insane Sent: Tuesday, April 09, 2013 4:46 PM To: hdf-forum@hdfgroup.org Subject: Re: [Hdf-forum] c# read different datatypes Sorry,what do you mean by And define your strings within the HDF dataType as C_S1 and H5T.setVariableSize(). ? I got the dataType this way: var dataType = H5D.getType(datasetID); -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c- read-different-datatypes-tp4026057p4026066.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
Re: [Hdf-forum] c# read different datatypes
I still can't get the idea ,what is not correct,where and how u define the datatype If i get the datatype from the dataset, what for should we make strict definition? Btw,are there any examples with method? -- View this message in context: http://hdf-forum.184993.n3.nabble.com/c-read-different-datatypes-tp4026057p4026068.html Sent from the hdf-forum mailing list archive at Nabble.com. ___ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org