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
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
{
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.
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:
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
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.
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.
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?
, 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
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:
-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
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:
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
)] 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
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
-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
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
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:
: [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
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:
20 matches
Mail list logo