-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for the question. I think what you want is |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
Thanks for the question. I think what you want is
io.jhdf.api.dataset.ContiguousDataset#getDataAddress
you will need to cast theDataset
you have to aContiguousDataset
as getting the address for the data doesn't make sense for all types of Dataset. You might prefer to callio.jhdf.api.dataset.ContiguousDataset#getBuffer
to let jHDF give you aByteBuffer
I think you want. Let me know if this answers your question.