Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-file images do not import correctly if nested in a .zarr folder #25

Open
pwalczysko opened this issue Apr 7, 2022 · 7 comments
Open

Comments

@pwalczysko
Copy link
Member

pwalczysko commented Apr 7, 2022

Workflow:

  1. Convert the ...downloads.openmicroscopy.org/images/OME-TIFF/2016-06/binaryonly images into zarr using bf2raw version 0.4.0, using the command
  2. bioformats2raw binaryonly/multifile-Z1.ome.tiff multifile-Z1.ome.zarr
  3. Nest the resulting multifile-Z1.ome.zarr into another folder which is also a result of an bf2raw output, such as
  4. /uod/idr-scratch/test.zarr/petr-test/multifile-Z1.ome.zarr
  5. Import the resulting multifile-Z1.ome.zarr folder to OMERO using the command (note the usage of the --depth 10)
  6. omero import --transfer=ln_s --skip=checksum --parallel-upload=10 --skip=minmax --depth 10 multifile-Z1.ome.zarr/
  7. Observe that the image in OMERO is consisting of 3 images with z=1 each https://merge-ci.openmicroscopy.org/web/webclient/?show=image-228865. This is not expected, as the result should be 1 image with 5 z planes, as shown in the ome.tiff import case https://merge-ci.openmicroscopy.org/web/webclient/?show=image-228823
  8. log in as user-8 to the merge-ci to see the images

This problem is specific to the nesting of the ome.zarr file into another .zarr file.

cc @joshmoore @sbesson

@sbesson
Copy link
Member

sbesson commented Apr 7, 2022

The top-level Zarr generated by bioformats2raw 0.4.0 is a Zarr group containing one or more images as defined by the OME-NGFF specification as well as an OME group with the metadata. From my side, this issue raises the questions of what the behavior should be in ZarrReader when being pointed to this top-level group, currently unspecified in the OME-NGFF specification.

I think there is an overlap with the issue reported in #18 i.e. when the Zarr group deviates from the case of a single multiresolution image, the reader is trying to discover more and we need to define the contract in that case.

I can imagine a few options:
1- be strict and do nothing i.e. detect this as a Zarr group that is not specified in OME-NGFF and ignore it
2- discover and detect the image/series groups as separate single-image filesets
3- discover and detect the image/series groups as a multi-image fileset

I assume the ongoing work on ome/ngff#104 is leading us towards 2 but with the existing specification, should we use a different intermediate representation?

@joshmoore
Copy link
Member

joshmoore commented Apr 7, 2022

ome/ngff#112 was my first attempt at capturing the multi-image-ness. Not sure if it's yet specific enough for ZarrReader, @dgault. (It also doesn't try to capture the semantics when it's a non-bioformats2raw mix of groups)

@pwalczysko
Copy link
Member Author

#25 was my first attempt at capturing the multi-image-ness. Not sure if it's yet specific enough for ZarrReader, @dgault. (It also doesn't try to capture the semantics when it's a non-bioformats2raw mix of groups)

@joshmoore not sure why is your link above pointing to this very issue ? (#25)

@joshmoore
Copy link
Member

Fixed: ome/ngff#112

@pwalczysko
Copy link
Member Author

I think that this issue is solved now. The .zarr folder was inside another .zarr folder which probably confused the importer.
Now, with the adjustment described in #26 (comment), the new import is indeed producing 1 image with 5 z planes as expected, see https://merge-ci.openmicroscopy.org/web/webclient/?show=image-228872

@pwalczysko
Copy link
Member Author

Should I close this or is it still of relevance ?

@joshmoore
Copy link
Member

I'd propose updating the title & description but leaving this open lest someone else get themselves into this same situation.

@pwalczysko pwalczysko changed the title Multi-file images not correctly imported to OMERO Multi-file images do not import correctly if nested in a .zarr folder Apr 7, 2022
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

No branches or pull requests

3 participants