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

Be more forgiving of incorrect SampleFormat length #363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffpeck10x
Copy link

This is to address the issue noted in:
#159

and allows geotiff to handle a situation where there is an interleaved tiff that has SampleFormat of [1], despite there being multiple samples per channel.

The situation described in the issue is that BitsPerSample is [8, 8, 8], yet SampleFormat is only [1], whereas it should have the same number of values (i.e. [1, 1, 1]). Rather than fail in this situation, be more forgiving of the incorrect format and try to infer from the value that was set.

This was noticed in some OME-TIFF files generated by qupath with Creator="OME Bio-Formats 6.11.1" in the OME-XML. These files can be opened by qupath, FIJI, and Python's tifffie, so it only makes sense that geotiff.js should handle them as well, despite the incorrect SampleFormat length.

…alues populated, such as in bioformats ome tif files
@jeffpeck10x jeffpeck10x force-pushed the more-forgiving-tiff-reading branch from fa75154 to e2aed8b Compare May 12, 2023 22:37
@m-mohr
Copy link
Contributor

m-mohr commented Jun 29, 2023

Seems related/similar to #303

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

Successfully merging this pull request may close these issues.

2 participants