We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
It seems that writing an image pyramid always uses nearest downsampling even if a different method is provided (e.g. gaussian):
nearest
gaussian
ome-zarr-py/ome_zarr/writer.py
Line 830 in 1f47e59
Changing this line to
mip = getattr(scaler, scaler.method)(image)
might already be enough.
Example:
import numpy as np from ome_zarr.scale import Scaler from ome_zarr.writer import write_image import zarr x = np.random.uniform(0,1,(100,100)) store = parse_url('foo1.zarr', mode="w").store root = zarr.group(store=store) write_image(image=x, group=root, axes="yx", storage_options=dict(overwrite=True), scaler=Scaler(method='nearest')) store = parse_url('foo2.zarr', mode="w").store root = zarr.group(store=store) write_image(image=x, group=root, axes="yx", storage_options=dict(overwrite=True), scaler=Scaler(method='gaussian')) print(np.abs(np.asarray(zarr.open('foo1.zarr/')[1])-np.asarray(zarr.open('foo2.zarr/')[1])).max())
The text was updated successfully, but these errors were encountered:
There is also the use of order=1 in this line (used in the case of dask arrays): https://github.com/ome/ome-zarr-py/blob/master/ome_zarr/scale.py#L153
order=1
Sorry, something went wrong.
No branches or pull requests
Hi,
It seems that writing an image pyramid always uses
nearest
downsampling even if a different method is provided (e.g.gaussian
):ome-zarr-py/ome_zarr/writer.py
Line 830 in 1f47e59
Changing this line to
might already be enough.
Example:
The text was updated successfully, but these errors were encountered: