Skip to content
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

Layer name only contains first character from a multi-scale 2D image #80

Open
andy-sweet opened this issue Feb 24, 2023 · 0 comments · May be fixed by #117
Open

Layer name only contains first character from a multi-scale 2D image #80

andy-sweet opened this issue Feb 24, 2023 · 0 comments · May be fixed by #117

Comments

@andy-sweet
Copy link

When writing a multi-scale image with a name using ome_zarr.writer.write_multiscale, I'd expect to be get that name when reading the layer back in with the reader plugin in this repo.

However, instead the name is truncated to the first character.

Here's a test that I'd expect to pass, but fails because assert "k" == "kermit" fails.

def test_read_multiscale_2d_image_with_name(path: str):
    from ome_zarr.writer import write_multiscale
    from napari_ome_zarr import napari_get_reader
    import zarr
    data = [np.zeros((64, 32)), np.zeros((32, 16))]
    store = parse_url(path, mode="w").store
    root = zarr.group(store=store)
    write_multiscale(data, group=root, name="kermit")

    reader = napari_get_reader(path)
    layers = reader(path)

    assert len(layers) == 1
    _, read_metadata, _ = layers[0]
    assert read_metadata["name"] == "kermit"
@dstansby dstansby linked a pull request Jul 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant