ome / napari-ome-zarr

A napari plugin for zarr backed OME-NGFF images
https://www.napari-hub.org/plugins/napari-ome-zarr
BSD 3-Clause "New" or "Revised" License
27 stars 21 forks source link

RFE: relax filename_patterns to read child elements #51

Closed sbesson closed 2 years ago

sbesson commented 2 years ago

The filename_patterns introduced as part of the conversion of this plugin to the npe2 engine allowing to open any OME-NGFF dataset ending with *.zarr

This currently covers all the supported specification e.g. multiscale images

napari https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0083A/9822152.zarr

or plates

napari https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0072B/9512.zarr

As it stands, this naming pattern prevents direct access to the leaves of a dataset like the well of a plate

napari https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0072B/9512.zarr/L/20

the field of view of a plate

napari https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0072B/9512.zarr/L/20/0

or a label image associated with a multiscales image

https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0062A/6001247.zarr/labels/0

Using a more permissive pattern e.g. *.zarr* or possibly * as suggested in https://github.com/ome/napari-ome-zarr/pull/42 would relax this constraint and allow direct acces. This is potentially outside the intent of the plugin.

_Originally posted by @sbesson in https://github.com/ome/napari-ome-zarr/pull/42#discussion_r879374496_

joshmoore commented 2 years ago

Sounds like this might need actioning soon, no? Do we know if those patterns work?

sbesson commented 2 years ago

I only tested * and it worked locally at least. You're correct that with https://github.com/ome/ngff/pull/112, being able to access e.g. an image in such a layout will require this rule to be relaxed.

joshmoore commented 2 years ago

@sbesson, ok to close or are there use cases that still aren't supported?

sbesson commented 2 years ago

The use case I was thinking of were covered by https://github.com/ome/napari-ome-zarr/pull/58