-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix OME-NGFF metadata when writing flattened layout #131
Fix OME-NGFF metadata when writing flattened layout #131
Conversation
Thanks @sbesson. I think the second option plus README updates makes most sense long-term. |
👍 regarding the warning in the readme, do you roughly remember under which conditions the absence of trailing slash in the scale format string would cause an error ? |
Also one related question regarding the semantics of |
Kind of wishing I'd been more descriptive in ef95be9. I think the context was running the commands in #108 and #109?
|
Pushed two commits adding coverage for both forms of the scale format string in the tests and handling the case of trailing slash. |
Likely outwit this PR, I wonder if a short-cut for the flattening would be in scope. |
Last 2 commits are fine with me. Extra option captured as #132. Think this just needs final review and merge from @chris-allan. |
See https://forum.image.sc/t/dropping-the-top-layer-in-ome-zarr-data-without-losing-multiscales-metadata/63286
As originally suggested in #108 (comment) and captured in the README, setting the
--scale-format-string
to%2$d/
allows to flatten the hierarchy createdbioformats2raw
to match the layout of OME-NGFF multiscale images. Usingbioformat2raw 0.4.0
, this command results in the absence of themultiscales
metadata from the top-level group:After investigation, this is due to the logic in https://github.com/glencoesoftware/bioformats2raw/blob/master/src/main/java/com/glencoesoftware/bioformats2raw/Converter.java#L1483 which fails to handle this particular
resolutionString
and lead to the following resolution:instead of
As noted on the forum post, using the current release of the tool, dropping the trailing slash produces a different output which preservesx the top-level Zarr/OME-NGFF metadata.
However, this value conflicts with the recommendation at the bottom of https://github.com/glencoesoftware/bioformats2raw/tree/v0.4.0#--scale-format-string.
At minimum 8fb2637 expands the existing unit test (without the trailing slash) to capture the current expectation for the second command and check the presence of a Zarr group with
multiscales
metadata.This PR will need at least one extra commit but there are two options:
%2$d
becomes the recommended format for this layout, update the README and review the warning about trailing slashes in the READMEConverter
will need updates to match the data generated by%2$d/
and%2$d
@melissalinkert @chris-allan let me know what you are happy to support moving forward and I can push updates accordingly