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

round downsamples ?!? #63

Open
4 tasks
ap-- opened this issue Feb 13, 2023 · 0 comments
Open
4 tasks

round downsamples ?!? #63

ap-- opened this issue Feb 13, 2023 · 0 comments
Assignees
Labels
help wanted Extra attention is needed investigate 🕵️ Needs some investigation

Comments

@ap--
Copy link
Collaborator

ap-- commented Feb 13, 2023

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.
@ap-- ap-- added help wanted Extra attention is needed investigate 🕵️ Needs some investigation labels Feb 13, 2023
@ap-- ap-- self-assigned this Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed investigate 🕵️ Needs some investigation
Projects
None yet
Development

No branches or pull requests

1 participant