diff --git a/ome_zarr/scale.py b/ome_zarr/scale.py index 0fb3e85e..8a2d55ca 100644 --- a/ome_zarr/scale.py +++ b/ome_zarr/scale.py @@ -209,7 +209,7 @@ def gaussian(self, base: np.ndarray) -> list[np.ndarray]: base, downscale=self.downscale, max_layer=self.max_layer, - multichannel=False, + channel_axis=None, ) ) @@ -220,7 +220,7 @@ def laplacian(self, base: np.ndarray) -> list[np.ndarray]: base, downscale=self.downscale, max_layer=self.max_layer, - multichannel=False, + channel_axis=None, ) ) diff --git a/pyproject.toml b/pyproject.toml index 3a5e40a5..affcf269 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ # See https://github.com/fsspec/filesystem_spec/issues/819 "aiohttp<4", "requests", - "scikit-image", + "scikit-image>=0.19.0", "toolz", ] classifiers = [ diff --git a/tests/test_scaler.py b/tests/test_scaler.py index c3ab1759..4e125085 100644 --- a/tests/test_scaler.py +++ b/tests/test_scaler.py @@ -1,8 +1,13 @@ +import pathlib + import dask.array as da import numpy as np import pytest +import zarr +from ome_zarr.io import parse_url from ome_zarr.scale import Scaler +from ome_zarr.writer import write_image class TestScaler: @@ -146,3 +151,24 @@ def test_big_dask_pyramid(self, tmpdir): # to zarr invokes compute data_dir = tmpdir.mkdir("test_big_dask_pyramid") da.to_zarr(level_1, str(data_dir)) + + @pytest.mark.parametrize("method", ["gaussian", "laplacian"]) + def test_pyramid_args(self, shape, tmpdir, method): + path = pathlib.Path(tmpdir.mkdir("data")) + store = parse_url(path, mode="w").store + group = zarr.group(store=store, overwrite=True) + data = self.create_data(shape) + + scaler = Scaler( + downscale=2, + method=method, + max_layer=2, + ) + + axes = "tczyx"[-len(shape) :] + write_image( + image=data, + group=group, + scaler=scaler, + axes=axes, + )