Skip to content

derive_label doesn't respect non-integer naming of levelsΒ #114

@imagejan

Description

@imagejan

I can create an OME-Zarr container with named scale levels, e.g.:

create_empty_ome_zarr(
  store=...,
  shape=...,
  xy_pixelsize=...,
  levels=["s0", "s1"],
)

.. but when I derive a label from it with derive_label, the levels are always named ["0", "1"] and there's no option to get named levels.

I would expect the levels of the new label to be the same as in the parent image by default (possibly with an option to override the default behavior).


It seems the levels of the new Label are set here:

levels=ref_meta.levels,

.. where the levels is defined as int, not as Sequence[str]:

@property
def levels(self) -> int:
"""Return the number of levels in the image."""
return self._meta_handler.meta.levels

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions