+
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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5b11289
[WIP] - use large_image as an optional dependency to handle a wide ra…
kheffah Jul 24, 2021
11fbb48
[WIP] - allow control of large_image usage for Slide even if large_im…
kheffah Jul 24, 2021
9aa6721
[WIP] - allow control of large_image usage for Slide even if large_im…
kheffah Jul 24, 2021
282f5a1
[WIP] - fix testing now that large_image usage is an option
kheffah Jul 24, 2021
ab82ec8
revert tests/expectations/svs-images/small-region-svs-resampled-array…
kheffah Jul 24, 2021
5e2a18e
OK now all tests pass without large_image usage. next, we'll incorpor…
kheffah Jul 24, 2021
d5d12ff
Unit tests for Slide module with large_image usage
kheffah Jul 25, 2021
dabc2b5
[WIP] - Unit tests for tiler modules with large_image usage
kheffah Jul 25, 2021
33e6373
Unit tests for tiler modules with large_image usage
kheffah Jul 25, 2021
5eeb37e
minor style change for linting
kheffah Jul 25, 2021
8075a75
minor style change for linting
kheffah Jul 25, 2021
a2381c3
minor style change for linting
kheffah Jul 25, 2021
52480f6
catch miscellaneous errors from openslide other than PIL.Unidentified…
kheffah Jul 25, 2021
9927986
unit tests assume large_image is installed to make sure any future de…
kheffah Aug 4, 2021
80456e9
reorder slide and tiler methods alphabetically for consistency
kheffah Aug 4, 2021
3f50a45
address comments from code review
kheffah Aug 6, 2021
a88f4bc
additional unit tests for slide
kheffah Aug 6, 2021
b6f73a4
fix additional unit tests for slide
kheffah Aug 6, 2021
1f325f9
better exception messages when large_image is needed for slide module
kheffah Aug 6, 2021
04472c8
use getters and setters for updating tile size depening on slide if mpp
kheffah Aug 6, 2021
10f783c
linting and better naming
kheffah Aug 6, 2021
0a3d158
reorder exceptions alphabetically
kheffah Aug 7, 2021
7be2c01
instead of using exception types that dont really fit, create a Mayne…
kheffah Aug 7, 2021
e71efbc
bug fix: instead of catching all ValueErrors in _tiles_generator when…
kheffah Aug 7, 2021
077e22a
add docstring for base_mpp
kheffah Aug 9, 2021
239eb30
get rid of extra magnif variable in _resample
kheffah Aug 9, 2021
dcae08a
fix extract signature to be compliant with the abstractmethod
ernestoarbitrio Aug 9, 2021
edfd067
add large-image in CI
ernestoarbitrio Aug 9, 2021
bbb240d
test fix python3.6 on the CI
ernestoarbitrio Aug 9, 2021
c64749d
simplyfy all(tile_size[i] == j for i, j in enumerate(image.size))
ernestoarbitrio Aug 9, 2021
4d59c15
add use_largeimage param documentation
kheffah Aug 10, 2021
97d1dfe
handle if unknown mpp despite using large_image
kheffah Aug 10, 2021
891f602
linting and more descriptive docs
kheffah Aug 10, 2021
8a8d0d7
Only resize tiles fetched by mpp if within certain tolerance of reque…
kheffah Aug 10, 2021
c59d1e9
Try to reach full test coverage. Add test_extract_tiles_at_mpp_not_re…
kheffah Aug 10, 2021
9f8a3c6
Apply suggestions from code review
kheffah Aug 11, 2021
00a7cd7
improve docstrings
kheffah Aug 11, 2021
fe8e9d9
fix broken tests
ernestoarbitrio Aug 29, 2021
b466ee6
address alessia's comments and fix dirty tests
ernestoarbitrio Aug 29, 2021
1637e97
refactor tiler tile_size and pixel_overlap
ernestoarbitrio Aug 29, 2021
cc787d0
tiny slide.py reformat
ernestoarbitrio Aug 29, 2021
419402b
fix flake8 failures
ernestoarbitrio Aug 29, 2021
434da27
fix other weird tests
ernestoarbitrio Aug 29, 2021
dbe52f1
fix lgtm alert
ernestoarbitrio Aug 29, 2021
bf8485c
address alessia's comments pt 2
ernestoarbitrio Aug 30, 2021
6e085ca
address alessia's comments pt3
ernestoarbitrio Aug 30, 2021
30c19d4
Fix error message
alessiamarcolini Nov 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions histolab/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def file_hash(fname: str, alg: str = "sha256") -> str:

def _create_image_fetcher():
try:
import pooch
from pooch import create, os_cache
except ImportError:
# Without pooch, fallback on the standard data directory
# which for now, includes a few limited data samples
Expand All @@ -77,14 +77,14 @@ def _create_image_fetcher():
url = "https://github.com/histolab/histolab/raw/{version}/histolab/"

# Create a new friend to manage your sample data storage
image_fetcher = pooch.create(
image_fetcher = create(
# Pooch uses appdirs to select an appropriate directory for the cache
# on each platform.
# https://github.com/ActiveState/appdirs
# On linux this converges to
# '$HOME/.cache/histolab-image'
# With a version qualifier
path=pooch.os_cache("histolab-images"),
path=os_cache("histolab-images"),
base_url=url,
version=pooch_version,
env="HISTOLAB_DATADIR",
Expand Down
16 changes: 10 additions & 6 deletions histolab/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,21 @@ def __str__(self):
return ""


class FilterCompositionError(HistolabException):
"""Raised when a filter composition for the class is not available"""


class LevelError(HistolabException):
"""Raised when a requested level is not available"""


class SlidePropertyError(HistolabException):
"""Raised when a requested slide property is not available"""
class MayNeedLargeImageError(HistolabException):
"""Raised when a method likely requires usage of large_image module"""


class FilterCompositionError(HistolabException):
"""Raised when a filter composition for the class is not available"""
class SlidePropertyError(HistolabException):
"""Raised when a requested slide property is not available"""


class TileSizeError(HistolabException):
"""Raised when the tile size is larger than the slide size"""
class TileSizeOrCoordinatesError(HistolabException):
"""Raised when the tile size or coordinates are incorrect relative to slide."""
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载