-
Notifications
You must be signed in to change notification settings - Fork 37
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
Can't open uint16 dataset, Fiji crashes #102
Comments
How was your hdf5 file created? There is a similar issue with tips on resolving it here: |
The files are from the Luxendo software. We directly copy the It seems the bdv reader assumes
I will try the suggestions in the linked thread to see if that helps, thanks for the info. |
I made a minimal example that shows this breakage (attached) and discussed it a bit at https://forum.image.sc/t/bigstitcher-image-fusion-produces-black-bars/85726/10 and PreibischLab/BigStitcher#129. The int16 file opens perfectly, while the uint16 file crashes BDV. Ultimately, I fixed my writer in the same fashion as described at PreibischLab/BigStitcher#60: I explicitly cast everything to int16 before writing to file. Should we be able to pass things into BDV as int16? Or should only uint16 be supported. |
The behaviour you describe (assuming I added proper support for more datatypes a while ago in #157. However, for this to be picked up, the datatype must be added as an attribute to each setup group. E.g., the info (pyramid resolutions, etc) for the first setup is under group "/s00" in the h5 file. If "/s00" has a "dataType" string attribute with value "uint8", that means that the datasets for this setup are So, you can make your
Please don't do this... Moving forward, it would be better to add the Something like IHDF5Writer hdf5Writer = HDF5Factory.open( "test_uint16.h5" );
hdf5Writer.string().setAttr( "s00", "dataType", "uint16" ); in Java, or hdf5_writer['s00'].attrs['dataType'] = 'uint16' in python |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/bigstitcher-image-fusion-produces-black-bars/85726/14 |
Yep--that attribute specification fixes it. Thanks! |
This is great, thanks a lot! I think this issue can be closed, since the new spec seems to cover this use case. Is there a place with an up to date specification for the BigDataViewer format? Until now we just used the original Nature Methods paper, plus the export from Fiji function, but those don't cover all use cases. Thanks again! |
When opening a
unit16
dataset, BigDataViewer tries to convert it toint16
, which can fail if a value is too large for anint16
. It produces the error below for each pixel where the value is larger than 32767. Because the error happens for each pixel, this can make Fiji unresponsive and it can crash. The datasets can be loaded with the HDF5 plugin correctly.Environment:
Update Fiji
on 2020-08-03The text was updated successfully, but these errors were encountered: