Skip to content

Add support for zarr-conventions thumbnails extension - #71

Draft
lubianat wants to merge 8 commits into
ome:mainfrom
lubianat:thumbnail_extension
Draft

Add support for zarr-conventions thumbnails extension#71
lubianat wants to merge 8 commits into
ome:mainfrom
lubianat:thumbnail_extension

Conversation

@lubianat

Copy link
Copy Markdown
Contributor

Testing support for https://github.com/clbarnes/zarr-convention-thumbnails

Checks for thumbnail convention and uses thumbnail when available, fallback to ome-zarr.js when no thumbnails are present.

The convention is WIP, opening the PR for the deploy preview

- Implement selectBestThumbnail utility to choose optimal thumbnail
  based on size and format preferences (JPEG over PNG)
- Update Thumbnail component to check for thumbnails convention
  and use pre-generated thumbnails when available
- Fallback to ome-zarr rendering when no thumbnails convention exists
- Support both path-based and URL-based thumbnail references

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@netlify

netlify Bot commented Apr 16, 2026

Copy link
Copy Markdown

Deploy Preview for ome-ngff-validator ready!

Name Link
🔨 Latest commit 323d41c
🔍 Latest deploy log https://app.netlify.com/projects/ome-ngff-validator/deploys/69e0ed5cc1630300088371e2
😎 Deploy Preview https://deploy-preview-71--ome-ngff-validator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for ome-ngff-validator ready!

Name Link
🔨 Latest commit a8bdc80
🔍 Latest deploy log https://app.netlify.com/projects/ome-ngff-validator/deploys/6a7a0870f201200008d27d10
😎 Deploy Preview https://deploy-preview-71--ome-ngff-validator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lubianat

lubianat commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

https://github.com/lubianat/metadata_assets is an attempt at indicating whether some extra metadata files are present in the Zarr

This happens e.g. with the ro-crate-metadata.json in the challenge. It also applies to the METADATA.ome.xml in bioformats2raw and in "conventional" layout when converting with eubi-bridge (https://euro-bioimaging.github.io/EuBI-Bridge/) and saving OME metadata.

There are other potential cases for metadata being packed inside a OME-Zarr, even if not readable, for archival/human inspection

https://deploy-preview-71--ome-ngff-validator.netlify.app/?source=https://huggingface.co/buckets/tiagolubiana/sensory-czi-zarr/resolve/demo_hair.zarr

I've added support on this draft, in the larger epic of "zarr-convention" support

image

From https://github.com/zarr-conventions/zarr-conventions-spec:
If the Convention isolates metadata using a namespace prefix or a key for nesting, the name SHOULD match the namespace prefix (e.g., proj:) or the key used to nest attributes (e.g., ome)
@will-moore

Copy link
Copy Markdown
Member

I'm a bit confused about the relationship between thumbnail detection and XML metadata detection?
Thumbnails convention doesn't use XML does it?

@lubianat

Copy link
Copy Markdown
Contributor Author

Hi @will-moore, the relation is that:

  • both are references to non-Zarr files

  • both build upon the "Zarr Conventions" style of extra metadata

but otherwise you are correct, these are separate things. But both experimental to some extent

@will-moore

Copy link
Copy Markdown
Member

Testing the example at https://deploy-preview-71--ome-ngff-validator.netlify.app/?source=https://huggingface.co/buckets/tiagolubiana/sensory-czi-zarr/resolve/demo_hair.zarr
Now looks a bit different from above:

Screenshot 2026-08-12 at 10 39 54

https://raw.githubusercontent.com/zarr-conventions/metadata_assets/refs/tags/v1/schema.json is 404
and so is https://github.com/zarr-conventions/metadata_assets/blob/v1/README.md

It took me a while to get my head around "Zarr Conventions" here, but the tooltip link was useful.

I think some hierarchical layout might help:

Zarr conventions:

Metadata assets:

CZI_MetaData.xml

CZI_MetaData.xml

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.

2 participants