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

OpenSlide and TiffSlide #18

Closed
alanocallaghan opened this issue Oct 24, 2024 · 1 comment
Closed

OpenSlide and TiffSlide #18

alanocallaghan opened this issue Oct 24, 2024 · 1 comment

Comments

@alanocallaghan
Copy link
Contributor

Spotted in #16, #15 and #14...

In the current tests, we write pyramidal RGB tiffs:

tif.write(
pixels,
metadata=metadata,
subifds=number_of_subresolutions,
resolution=(number_of_pixels_per_cm, number_of_pixels_per_cm),
resolutionunit=3, # indicate that the resolution above is in cm^-1,
photometric='rgb',
tile=(128, 128)
)

When photometric='rgb', OpenSlide works fine. TiffSlide fails with NotImplementedError: series with axes='SYX' not supported yet.
Without setting this flag, TiffSlide "works", but returns all zeros for all pixels. OpenSlide fails with openslide.lowlevel.OpenSlideUnsupportedFormatError: Unsupported or missing image file.

An unrelated issue with OpenSlide on Linux was resolved in #14, where the apt version of OpenSlide fails to read the pixel calibration from the image properties. Theoretically we could parse this from the image metadata ourselves, but it's probably more prudent to wait for 4.0.0 binaries to be out on apt (and linked up with python).

Now reading the openslide-python README might make you think that you can pip install openslide-python openslide-bin and get a working openslide install. But we have to wait for openslide-python 1.4.0 for that! Given openslide-bin was released 3 weeks ago, that should be soonish

https://github.com/openslide/openslide-python/blob/797ea3ddb981713ba0b07a91d79f9396338dda9b/README.md?plain=1#L49-L56

@alanocallaghan
Copy link
Contributor Author

Leaving tiffslide in place just in case

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

1 participant