Skip to content

Commit

Permalink
Merge pull request #885 from girder/tifffile-source
Browse files Browse the repository at this point in the history
Add a tifffile tile source.
  • Loading branch information
manthey authored Jul 7, 2022
2 parents d6888be + 681738f commit e7531fb
Show file tree
Hide file tree
Showing 14 changed files with 570 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .circleci/make_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ cd "$ROOTPATH/sources/test"
pip wheel . --no-deps -w ~/wheels && rm -rf build
cd "$ROOTPATH/sources/tiff"
pip wheel . --no-deps -w ~/wheels && rm -rf build
cd "$ROOTPATH/sources/tifffile"
pip wheel . --no-deps -w ~/wheels && rm -rf build
cd "$ROOTPATH/sources/vips"
pip wheel . --no-deps -w ~/wheels && rm -rf build
6 changes: 6 additions & 0 deletions .circleci/release_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ cp "$ROOTPATH/LICENSE" .
python setup.py sdist
pip wheel . --no-deps -w dist
twine upload --verbose dist/*
cd "$ROOTPATH/sources/tifffile"
cp "$ROOTPATH/README.rst" .
cp "$ROOTPATH/LICENSE" .
python setup.py sdist
pip wheel . --no-deps -w dist
twine upload --verbose dist/*
cd "$ROOTPATH/sources/vips"
cp "$ROOTPATH/README.rst" .
cp "$ROOTPATH/LICENSE" .
Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ Large Image consists of several Python modules designed to work together. These

- ``large-image-source-vips``: A tile source for reading any files handled by libvips. This also can be used for writing tiled images from numpy arrays.

- ``large-image-source-tifffile``: A tile source using the tifffile library that can handle a wide variety of tiff-like files.

- ``large-image-source-test``: A tile source that generates test tiles, including a simple fractal pattern. Useful for testing extreme zoom levels.

- ``large-image-source-dummy``: A tile source that does nothing.
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
_build/large_image_source_pil/modules
_build/large_image_source_test/modules
_build/large_image_source_tiff/modules
_build/large_image_source_tifffile/modules
_build/large_image_source_vips/modules
_build/large_image_converter/modules
_build/large_image_tasks/modules
Expand Down
1 change: 1 addition & 0 deletions docs/make_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ sphinx-apidoc -f -o _build/large_image_source_openslide ../sources/openslide/lar
sphinx-apidoc -f -o _build/large_image_source_pil ../sources/pil/large_image_source_pil
sphinx-apidoc -f -o _build/large_image_source_test ../sources/test/large_image_source_test
sphinx-apidoc -f -o _build/large_image_source_tiff ../sources/tiff/large_image_source_tiff
sphinx-apidoc -f -o _build/large_image_source_tifffile ../sources/tifffile/large_image_source_tifffile
sphinx-apidoc -f -o _build/large_image_source_vips ../sources/vips/large_image_source_vips
sphinx-apidoc -f -o _build/large_image_converter ../utilities/converter/large_image_converter
sphinx-apidoc -f -o _build/large_image_tasks ../utilities/tasks/large_image_tasks
Expand Down
1 change: 1 addition & 0 deletions requirements-dev-core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
-e sources/pil
-e sources/test
-e sources/tiff
-e sources/tifffile
-e sources/vips
# must be after sources/tiff
-e sources/ometiff
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ girder-jobs>=3.0.3
-e sources/pil
-e sources/test
-e sources/tiff
-e sources/tifffile ; python_version >= '3.7'
-e sources/vips
# must be after sources/tiff
-e sources/ometiff
Expand Down
1 change: 1 addition & 0 deletions requirements-worker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
-e sources/pil
-e sources/test
-e sources/tiff
-e sources/tifffile
-e sources/vips
# must be after sources/tiff
-e sources/ometiff
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def prerelease_local_scheme(version):
'pil': [f'large-image-source-pil{limit_version}'],
'test': [f'large-image-source-test{limit_version}'],
'tiff': [f'large-image-source-tiff{limit_version}'],
'tifffile': [f'large-image-source-tifffile{limit_version}'],
'vips': [f'large-image-source-vips{limit_version}'],
}
if sys.version_info >= (3, 7):
Expand Down
1 change: 0 additions & 1 deletion sources/tiff/large_image_source_tiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,6 @@ def _getAssociatedImage(self, imageKey):
return PIL.Image.open(io.BytesIO(base64.b64decode(td._embeddedImages[imageKey])))
if imageKey in self._associatedImages:
return PIL.Image.fromarray(self._associatedImages[imageKey])
return None


def open(*args, **kwargs):
Expand Down
Loading

0 comments on commit e7531fb

Please sign in to comment.