comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Problem reading HDF5
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Problem reading HDF5 [message #88450] Sun, 27 April 2014 23:34 Go to next message
KCotar is currently offline  KCotar
Messages: 1
Registered: April 2014
Junior Member
I am trying to read an image inside HDF5 file. According to the IDL Reference this should be pretty straight forward using the following code.

file = '***.HDF5'
fileId = H5F_OPEN(file)
ndviDataset = H5D_OPEN(fileId, '/LEVEL3/NDVI/NDVI')
ndviImage = H5D_READ(ndviDataset)
H5F_CLOSE, fileId

When running this code, I always get error: H5D_READ: can't read data: Object ID:83886129

The same thing happens if I try to open the image using graphical interface H5_BROWSER(file). Any idea what is wrong? It looks like broken data, however
HDFView can open it without read error.

Thanks.
Re: Problem reading HDF5 [message #88451 is a reply to message #88450] Mon, 28 April 2014 01:01 Go to previous message
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
On Monday, April 28, 2014 8:34:32 AM UTC+2, KCotar wrote:
> I am trying to read an image inside HDF5 file. According to the IDL Reference this should be pretty straight forward using the following code.
>
>
>
> file = '***.HDF5'
>
> fileId = H5F_OPEN(file)
>
> ndviDataset = H5D_OPEN(fileId, '/LEVEL3/NDVI/NDVI')
>
> ndviImage = H5D_READ(ndviDataset)
>
> H5F_CLOSE, fileId
>
>
>
> When running this code, I always get error: H5D_READ: can't read data: Object ID:83886129
>
>
>
> The same thing happens if I try to open the image using graphical interface H5_BROWSER(file). Any idea what is wrong? It looks like broken data, however
>
> HDFView can open it without read error.
>
>
>
> Thanks.


Perhaps you need to open the group, LEVEL3, and then the group NVDI, before you can read it? i.e. using the H5G* commands?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Incrementing an element multiple times without a loop?
Next Topic: FFT and Parseval

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:11:21 PDT 2025

Total time taken to generate the page: 0.01081 seconds