Skip to content

Commit

Permalink
Add a Zarr tile source.
Browse files Browse the repository at this point in the history
This mostly reads omezarr (ome-ngff).
  • Loading branch information
manthey committed Oct 30, 2023
1 parent df16ea8 commit 05e0f1d
Show file tree
Hide file tree
Showing 16 changed files with 565 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .circleci/make_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ 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
cd "$ROOTPATH/sources/zarr"
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 @@ -136,3 +136,9 @@ cp "$ROOTPATH/LICENSE" .
python setup.py sdist
pip wheel . --no-deps -w dist
twine upload --verbose dist/*
cd "$ROOTPATH/sources/zarr"
cp "$ROOTPATH/README.rst" .
cp "$ROOTPATH/LICENSE" .
python setup.py sdist
pip wheel . --no-deps -w dist
twine upload --verbose dist/*
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log

## 1.25.1
## 1.26.0

### Features
- Add a Zarr tile source (including ome.zarr) ([#1350](../../pull/1350))

### Improvements
- Style can specify a dtype of 'source' to maintain the original dtype even when compositing frames ([#1326](../../pull/1326))
Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,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-zarr``: A tile source using the zarr library that can handle OME-Zarr (OME-NGFF) files as well as some other zarr 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 @@ -34,6 +34,7 @@
_build/large_image_source_tiff/modules
_build/large_image_source_tifffile/modules
_build/large_image_source_vips/modules
_build/large_image_source_zarr/modules
_build/large_image_converter/modules
_build/large_image_tasks/modules
_build/girder_large_image/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 @@ -35,6 +35,7 @@ sphinx-apidoc -f -o _build/large_image_source_test ../sources/test/large_image_s
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_source_zarr ../sources/zarr/large_image_source_zarr
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
sphinx-apidoc -f -o _build/girder_large_image ../girder/girder_large_image
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ girder-jobs>=3.0.3
-e sources/tiff
-e sources/tifffile
-e sources/vips
-e sources/zarr
# must be after sources/tiff
-e sources/ometiff
# must be after source/gdal
Expand Down
1 change: 1 addition & 0 deletions requirements-test-core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sources/test
sources/tiff
sources/tifffile ; python_version >= '3.7'
sources/vips
sources/zarr
# must be after sources/tiff
sources/ometiff
# must be after source/gdal
Expand Down
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ sources/test
sources/tiff
sources/tifffile ; python_version >= '3.7'
sources/vips
sources/zarr
# must be after sources/tiff
sources/ometiff
# must be after source/gdal
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def prerelease_local_scheme(version):
'tiff': [f'large-image-source-tiff{limit_version}'],
'tifffile': [f'large-image-source-tifffile{limit_version} ; python_version >= "3.7"'],
'vips': [f'large-image-source-vips{limit_version}'],
'zarr': [f'large-image-source-zarr{limit_version}'],
}
extraReqs.update(sources)
extraReqs['sources'] = list(set(itertools.chain.from_iterable(sources.values())))
Expand All @@ -74,7 +75,7 @@ def prerelease_local_scheme(version):
# from pypi with all needed dependencies.
extraReqs['common'] = list(set(itertools.chain.from_iterable(extraReqs[key] for key in {
'memcached', 'colormaps', 'performance',
'deepzoom', 'dicom', 'multi', 'nd2', 'test', 'tifffile',
'deepzoom', 'dicom', 'multi', 'nd2', 'test', 'tifffile', 'zarr',
})) | {
f'large-image-source-pil[all]{limit_version}',
f'large-image-source-rasterio[all]{limit_version} ; python_version >= "3.8"',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

# Default to ignoring files with no extension and some specific extensions.
config.ConfigValues['source_bioformats_ignored_names'] = \
r'(^[^.]*|\.(jpg|jpeg|jpe|png|tif|tiff|ndpi|nd2|ome|nc|json|isyntax|mrxs))$'
r'(^[^.]*|\.(jpg|jpeg|jpe|png|tif|tiff|ndpi|nd2|ome|nc|json|isyntax|mrxs|zarr(\.db|\.zip)))$'


def _monitor_thread():
Expand Down
Loading

0 comments on commit 05e0f1d

Please sign in to comment.