|
I'm looking for a way to get the offset (relative to the start of the file) of the data in a dataset, but not seeing this in the API. The specific case is in an image, where it looks like this (from I'm looking for a way to get what h5ls calls the "Address", which is essentially the first pixel component value. I do see The reason why I'm looking for this is to build a HEIF wrapper around an existing HDF5 file containing images. I don't need the data - I'm trying to use it by reference - but I do need to know where to find it. |
Replies: 2 comments
|
Thanks for the question. I think what you want is |
Thanks - that worked well. For the
I need the address (well, the byte range) to store in another file (like a metadata sidecar file) which the image reader application will use as an index, and treat the HDF5 file as an opaque container of bits.
It does (unless the assumption above is wrong). Thanks for the quick response - much appreciated. |
Thanks for the question. I think what you want is
io.jhdf.api.dataset.ContiguousDataset#getDataAddressyou will need to cast theDatasetyou have to aContiguousDatasetas getting the address for the data doesn't make sense for all types of Dataset. You might prefer to callio.jhdf.api.dataset.ContiguousDataset#getBufferto let jHDF give you aByteBufferI think you want. Let me know if this answers your question.