-
Notifications
You must be signed in to change notification settings - Fork 12
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
garbled tiles from CAMELYON16 dataset using tiffslide but not openslide #86
Comments
i suspect the jpeg2000 compression has something to do with this, because i cannot reproduce in images that have other compression schemes. the camelyon16 dataset uses jpeg2000. |
the difference is much more pronounced in
x, y = 56606, 43386
s = 566
tslide = tiffslide.TiffSlide("test_034.tif")
oslide = openslide.OpenSlide("test_034.tif")
tslide.read_region((x, y), level=0, size=(s, s))
oslide.read_region((x, y), level=0, size=(s, s)) TiffSlideOpenslide |
Interesting... Seems there is something different about the lowest level in the tif file. This is broken in import tiffslide
import PIL.Image
s = tiffslide.open_slide("./test_034.tif")
PIL.Image.fromarray(s.zarr_group[1][::32,::32,:]).save("out1.png")
PIL.Image.fromarray(s.zarr_group[0][::64,::64,:]).save("out0.png") level=1level=0 (
|
that's great! thanks for this. i'm glad the fix is already out. feel free to close the issue if there is nothing else to do. |
Until tiffslide requires a newer tifffile version we'll keep this open so that people find it more easily. |
And thank you for reporting, and providing a reproducible example ❤️ |
i have come across unexpected behavior when reading a tile from the CAMELYON16 dataset, slide
test_019.tif
. please see code to reproduce below.download image
test_019.tif
using:Tile read using tiffslide
Tile read using openslide
takeaway
as you can see, the tile read using tiffslide is different from that using openslide. i wonder if jpeg2000 compression is an issue here?
The text was updated successfully, but these errors were encountered: