tiffslide
tiffslide copied to clipboard
round downsamples ?!?
I believe the way openslide calculates downsamples is not correct. I assume that there is a reason why the downsample factor in openslide is calculated as seen below. But my guess is that this is incorrect and should actually be rounded to whole numbers.
downsamples: https://github.com/bayer-science-for-a-better-life/tiffslide/blob/ff2b18c0c067cd9a29f38fe6abe6f9dddf59cd5d/tiffslide/tiffslide.py#L231-L234
lower level offsets: https://github.com/bayer-science-for-a-better-life/tiffslide/blob/ff2b18c0c067cd9a29f38fe6abe6f9dddf59cd5d/tiffslide/tiffslide.py#L434-L438
Other References:
- https://github.com/openslide/openslide/issues/417
- https://github.com/bayer-science-for-a-better-life/tiffslide/issues/51
TODO:
- [ ] try to find examples of whole slide images that DO NOT have (almost) integer scaling.
- [ ] try to figure out why openslide calculates downsampling as it does
- [ ] implement a switch in tiffslide that rounds downsamples and switches to (more correct?) integer scaling between levels
- [ ] create a test script using openslide for finding examples that would contradict my intuition and ask image.sc users to run this on as many images as possible.