ome / ome/ngff

consolidate Plate to preview image

Open
#141 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
171
Forks
75
Avg merge
2d 3h
Merged PRs (30d)
20

Description

Currently, when viewing an NGFF Plate in vizarr or napari, the pyramid is created by using 1 down-sampled tile from the first Image of every Well.

In vizarr (https://github.com/hms-dbmi/vizarr/pull/119) we check the .zattrs for every Well to find the path/to/first/Image for each.
The multiscales of the first Image in the plate is used to find what the lowest resolution is, then we load that same resolution for all Wells.
This makes it quite slow to load a Plate, since we have to load for each Well: .zattrs, .zarray & chunks (1 per channel).
E.g. for a 384-Well plate, this is at least 1920 requests for the lowest resolution.
https://hms-dbmi.github.io/vizarr/?source=https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.1/plates/5966.zarr

A similar strategy of checking the path/to/first/Image for every Well is also in an open PR for ome-zarr-py (for viewing in napari): https://github.com/ome/ome-zarr-py/pull/207

In the case of vizarr, we only load the smallest (lowest resolution) level of the pyramid, and don't load higher resolutions when we zoom in.

I wonder whether we could specify a "preview" image of a Plate that clients could use to view a Plate as a NGFF Image. This would enable the viewing of the down-sampled Plate as simply as we currently view a single Image: load only the .zarray and the chunks of optimum size. Instead of 1 chunk per Well, we would stitch Wells together.

The lowest resolution of the Plate could be loaded from the full resolution Images as it is now.

This plate "preview" would also allow vizarr to view multi-resolution levels of the plate (but not the full resolution).

I could imagine an ome_zarr command like $ ome_zarr consolidate_plate path/to/plate.zarr to generate a plate preview Image from an existing NGFF plate. This could take into account a different path/to/first/Image for each Well.

The top-level .zattrs "plate":{} object could specify the existence of a `"plate_preview": "path/to/multiscales_image.zarr".

cc @jluethi @sbesson

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing vizarr PR #119 with ome-zarr-py PR #207, then review the proposed top-level .zattrs plate_preview field and the existing multiscales structure. The issue is complete when the preview representation and an ome_zarr consolidate_plate command are specified well enough for clients to load the preview without per-Well requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.