How to load HDF5 files in Java?

Hello,

I am using Eclipse and Java, and I need to load the contents
of an .hdf5 file into a double[][] matrix. From what I read so far,
it seems HDF5 is very complex. Where do I start learning?
I only need to load contents of a file into a matrix.

Thanks

Hi,

start out by looking into the examples, say,
http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/api18-java.html
I think you'll figure it out - it sure is a lot easier than writing your own data files.

I find the h5py docs nice for an introduction to what hdf5 is about. This may be of help to you.
http://www.h5py.org/docs/intro/quick.html

(Disclaimer: I've never used the Java API.)

Cheers
Paul

···

On 20. jan. 2013, at 00:57, Somebody wrote:

Hello,

I am using Eclipse and Java, and I need to load the contents
of an .hdf5 file into a double[][] matrix. From what I read so far,
it seems HDF5 is very complex. Where do I start learning?
I only need to load contents of a file into a matrix.

Thanks
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi,

You may want to have a look at the
JHDF5 library (https://wiki-bsse.ethz.ch/x/2QWWAQ).

Here is the code which covers your use case in JHDF5:
"""
IHDF5SimpleReader reader = HDF5Factory.openForReading("array.h5");
double[][] mydata = reader.readDoubleMatrix("mydata");
reader.close();
"""

Bernd

···

On 2013-01-20 00:57, Somebody wrote:

Hello,

I am using Eclipse and Java, and I need to load the contents
of an .hdf5 file into a double[][] matrix. From what I read so far,
it seems HDF5 is very complex. Where do I start learning?
I only need to load contents of a file into a matrix.

Thanks

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org