Skip to content

round downsamples ?!? #63

@ap--

Description

@ap--

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:

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions