tiffslide icon indicating copy to clipboard operation
tiffslide copied to clipboard

garbled tiles from CAMELYON16 dataset using tiffslide but not openslide

Open kaczmarj opened this issue 7 months ago • 6 comments

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:

# python -m pip install awscli
aws s3 cp --no-sign-request s3://camelyon-dataset/CAMELYON16/images/test_019.tif .

Tile read using tiffslide

import tiffslide

x, y = 166888, 50248
s = 566
tslide = tiffslide.TiffSlide("test_019.tif")
tslide.read_region((x, y), level=0, size=(s, s))

image

Tile read using openslide

import openslide

x, y = 166888, 50248
s = 566
oslide = openslide.OpenSlide("test_019.tif")
oslide.read_region((x, y), level=0, size=(s, s))

image

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?

kaczmarj avatar Jul 18 '24 00:07 kaczmarj