[hdf-forum] How to write hyperslabs?

Natalie Happenhofer nataliehapp at hotmail.com
Thu Oct 16 07:50:23 EDT 2008


Hi!
I need to write a 2-dimensional .h5 file, the data in it should look like the following array (concerning shape)

1 2 3 2 4 
1 2 5 2 4 
1 1 4 2 4 

My problem is that I need to allocate the space for my data array dynamically, i.e. it looks like this in C++:

float** Data = new float* [xdims]
for(int i=1; i<xdims; i++) Data[i] = new float [ydims];

as my data array is not necessarily contiguous in memory, I need a way to write it to my .h5 file with hyperslabs, as someone hinted earlier - I would write xdims rows with ydims values, but how do I write a hyperslab, which functions do I have to use? In the HDF5 Users Guide I have just found how to read hyperslabs from already existing data.

thx,
NH

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/attachments/20081016/e94aa871/attachment.html>


More information about the Hdf-forum mailing list