Skip to content

fix: load omero metadata for NGFF 0.5 data#960

Open
krokicki wants to merge 1 commit into
google:masterfrom
krokicki:fix-omero-loading
Open

fix: load omero metadata for NGFF 0.5 data#960
krokicki wants to merge 1 commit into
google:masterfrom
krokicki:fix-omero-loading

Conversation

@krokicki
Copy link
Copy Markdown

This PR fixes #959 which prevents transitional OMERO metadata from being correctly loaded for NGFF 0.5.

Previously parseOmeMetadata read multiscales from either attrs.ome.multiscales (v0.5+) or attrs.multiscales (≤v0.4), but always read omero from attrs.omero. As a result, channel rendering metadata (colors, windows, labels) was silently dropped for OME-Zarr 0.5 datasets.

This PR mirrors the existing multiscales pattern for omero.

@StephanPreibisch @mkitti

@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 19, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

const ome = attrs.ome;
const multiscales = ome == undefined ? attrs.multiscales : ome.multiscales; // >0.4
const omero = attrs.omero;
const omero = ome == undefined ? attrs.omero : ome.omero; // >0.4
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @krokicki

I think we can clean this section now by using something like

  const {ome} = attrs;
  const metadata = attrs.ome ?? attrs; // >0.4
  const { multiscales, omero } = metadata;

Unfortunately version is not as simple

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 this pull request may close these issues.

Bug: OMERO metadata ignored for NGFF 0.5 data

2 participants