jhdf icon indicating copy to clipboard operation
jhdf copied to clipboard

suggestion add support for scala-offset filter

Open sfc-gh-mrojas opened this issue 1 year ago • 4 comments

What is the suggestion? Well I tried using some files like https://fly.mpi-cbg.de/~pietzsch/bdv-example/drosophila.h5 However when I try to get the dataset i cant because we dont have a scale-offset filter.

How would it be an improvement?

If support for that filter can be added that will be great, so this library can be used in larger scenarios

Additional context

The file is big so download it from: https://fly.mpi-cbg.de/~pietzsch/bdv-example/

sfc-gh-mrojas avatar Nov 25 '23 15:11 sfc-gh-mrojas

I tried to implement this once for a different project and gave up eventually. It is a complex, heavily macro-overloaded 1700 LOC monster (https://github.com/HDFGroup/hdf5/blob/develop/src/H5Zscaleoffset.c). However, maybe I was too impatient and in the end it is easier than I found it at that time. It would be great to see a non-C scale offset filter implementation.

Apollo3zehn avatar Nov 26 '23 07:11 Apollo3zehn

Thanks for looking at jHDF and finding this issue. Your right scale and offset filter is not currently implemented. Thanks for providing an example file. I will take a look at how involved an implementation would be when I get a little time.

jamesmudd avatar Nov 26 '23 08:11 jamesmudd

For ref https://docs.hdfgroup.org/hdf5/develop/group___d_c_p_l.html#ga5c10165b670e0e984db431aee818cc7e

jamesmudd avatar Nov 29 '23 11:11 jamesmudd

I have taken a bit of a look at this and its not trivial. I am finding it difficult to get a spec about the on disk format so trying to reverse engineer it but that is proving harder than I expected. So just an update I don't expect this to be added quickly.

jamesmudd avatar Jan 04 '24 20:01 jamesmudd