+
Skip to content

Support fetching exact MPP resolutions #301

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

Merged
merged 47 commits into from
Nov 16, 2021
Merged

Support fetching exact MPP resolutions #301

merged 47 commits into from
Nov 16, 2021

Conversation

kheffah
Copy link
Collaborator

@kheffah kheffah commented Jul 25, 2021

This PR supports fetching exact micron-per-pixel (MPP) resolutions from the WSI using large_image as an optional dependency. The rationale here is that different WSIs have different encodings for the internal levels and different scan resolutions. large_image handles this by parsing the internal metadata for a wide range of formats beyond those supported by openslide and interpolating between levels when needed to fetch exact MPP resolutions independent of the slide format, scan resolution, manufacturer etc.

If the user doesn't have large_image installed but asks for an mpp resolution, they are prompted to install it.

@alessiamarcolini @ernestoarbitrio @nicolebussola This is the key feature from the forked version. I added tests for (hopefully) everything, but they are skipped if large_image is not installed. So if you'd like all the tests to run to maintain coverage, I suggest adding the large_image installation to test environment.

Description

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@codecov
Copy link

codecov bot commented Jul 25, 2021

Codecov Report

Merging #301 (30c19d4) into master (97abd62) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #301   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines         1331      1407   +76     
  Branches       134       152   +18     
=========================================
+ Hits          1331      1407   +76     
Impacted Files Coverage Δ
histolab/data/__init__.py 100.00% <100.00%> (ø)
histolab/exceptions.py 100.00% <100.00%> (ø)
histolab/slide.py 100.00% <100.00%> (ø)
histolab/tiler.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97abd62...30c19d4. Read the comment docs.

@alessiamarcolini alessiamarcolini added dependencies Pull requests that update a dependency file enhancement New feature or request labels Jul 26, 2021
Copy link
Member

@ernestoarbitrio ernestoarbitrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I ran out of time. I'll take another look once these comments are addressed 😄

@kheffah
Copy link
Collaborator Author

kheffah commented Aug 6, 2021

Ok I ran out of time. I'll take another look once these comments are addressed

@ernestoarbitrio Thanks, all addressed.

Copy link
Member

@ernestoarbitrio ernestoarbitrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second iteration: some minor comments + 1 major concern. Please let me know if my comments are clear and if you have enough info to go through those. Thanks

Copy link
Member

@ernestoarbitrio ernestoarbitrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I think this should be the last iteration :D

@alessiamarcolini alessiamarcolini self-requested a review August 10, 2021 12:58
@ernestoarbitrio ernestoarbitrio force-pushed the support-mpp branch 3 times, most recently from 34ef8c5 to f070710 Compare August 29, 2021 21:02
@lgtm-com
Copy link

lgtm-com bot commented Aug 29, 2021

This pull request introduces 1 alert when merging 7c8c93b into 6625b40 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

Copy link
Collaborator

@alessiamarcolini alessiamarcolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very last review round ;p

@ernestoarbitrio ernestoarbitrio added ready-for-merge and removed WIP work in progress labels Aug 30, 2021
@ernestoarbitrio ernestoarbitrio added this to the 0.2.8 milestone Aug 30, 2021
@alessiamarcolini alessiamarcolini modified the milestones: 0.2.8, 0.4.0 Nov 8, 2021
kheffah and others added 27 commits November 16, 2021 15:56
…edLargeImage exception to use with slide whenever large_image may be needed. This is also a bug fix, because it prevents ignoring the exception when the catch-call except ValueError is invoked in like 503 in GridTiler
… tries slide.extract_tile, only catch the specific TileSizeOrCoordinatesError class.
…specting_given_tile_size and test_raise_error_if_mpp_and_discordant_tile_size.
Co-authored-by: Alessia Marcolini <98marcolini@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request ready-for-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载