Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8-bit hdf5 are read as 16-bit #128

Open
K-Meech opened this issue Dec 13, 2021 · 1 comment
Open

8-bit hdf5 are read as 16-bit #128

K-Meech opened this issue Dec 13, 2021 · 1 comment

Comments

@K-Meech
Copy link

K-Meech commented Dec 13, 2021

Opening an 8-bit image written to hdf5 with the fiji plugin under Plugins > BigDataViewer > Export Current Image as XML/HDF5 like so:

SpimData spimData = new XmlIoSpimData().load( xmlPath )
BdvFunctions.show(spimData)

gives UnsignedShortType (16-bit) imgLoaders inside, rather than UnsignedByteType (8-bit). This is not the case for converting and loading n5 via 'Export Current Image as XML/N5'.

Would it be possible to change this part: https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/hdf5/Hdf5ImageLoader.java#L378 to be more like the n5 equivalent https://github.com/bigdataviewer/bigdataviewer-core/blob/master/src/main/java/bdv/img/n5/N5ImageLoader.java#L200? This would make the images easier to handle in any downstream processing.

@mkitti
Copy link
Collaborator

mkitti commented Jul 13, 2022

Have you tried loading HDF5 files via N5-viewer rather than directly as HDF5. This would use https://github.com/saalfeldlab/n5-hdf5 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants