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

RFC-5: Transformations and Coordinate systems #255

Merged
merged 33 commits into from
Oct 8, 2024
Merged

Conversation

bogovicj
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Aug 14, 2024

Automated Review URLs

@normanrz
Copy link
Contributor

Thanks for your continued work on the transformations proposal and for writing it up as an RFC.
OME-Zarr really needs expanded transformation capabilities and I like this proposal! Happy to endorse it.

One issue that I see is the use of absolute paths in the path attribute (i.e. starting with /). This seems somewhat ill-defined to me. The example in the RFC shows that "store.zarr" is the root, which I assume would be the starting point for the absolute paths. However, any group in a Zarr hierarchy is a valid hierarchy on its own and there is no mandate for a .zarr suffix to denote a root. Therefore, I would advocate for restricting paths to relative paths, which would be relative to the folder that holds the zarr.json.

Also, I want to mention that there is interest in the community to create a "collections" proposal for OME-Zarr. I haven't gotten the time to write an RFC yet but I think that could integrate nicely with this transformations proposal and might provide solutions for the path issue as well.

rfc/wip-tform/index.md Outdated Show resolved Hide resolved
rfc/wip-tform/index.md Outdated Show resolved Hide resolved
rfc/wip-tform/index.md Outdated Show resolved Hide resolved
rfc/wip-tform/index.md Outdated Show resolved Hide resolved
rfc/wip-tform/index.md Outdated Show resolved Hide resolved
rfc/wip-tform/index.md Outdated Show resolved Hide resolved
### Array coordinate systems

Every array has a default coordinate system whose parameters need not be explicitly defined. Its name is the path to the array
in the container, its axes have `"type":"array"`, are unitless, and have default "name"s. The ith axis has `"name":"dim_i"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why make the default name require information about where the array is stored in the container? This means that accessing the default coordinate system requires accessing the storage layer for the array, which rules out anything that acts exclusively on metadata.

Perhaps it would be simpler to reserve a string like "default" for the default coordinate system.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the coordinate systems of different arrays need to be different by default.

rfc/wip-tform/index.md Outdated Show resolved Hide resolved
### "coordinateTransformations" metadata

"coordinateTransformations" describe the mapping between two coordinate systems (defined by "axes").
For example, to map an array's discrete coordinate system to its corresponding physical coordinates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, to map an array's discrete coordinate system to its corresponding physical coordinates.
For example, coordinate transforms can be used to map an array's discrete coordinate system to its corresponding physical coordinates.

rfc/wip-tform/index.md Outdated Show resolved Hide resolved
bogovicj and others added 8 commits August 28, 2024 13:08
typo

Co-authored-by: Davis Bennett <[email protected]>
add comma

Co-authored-by: Davis Bennett <[email protected]>
emphasize axis types are strings

Co-authored-by: Davis Bennett <[email protected]>
rephrase

Co-authored-by: Davis Bennett <[email protected]>
spelling

Co-authored-by: Davis Bennett <[email protected]>
rm zarr2 specific phrasing

Co-authored-by: Davis Bennett <[email protected]>
spelling

Co-authored-by: Davis Bennett <[email protected]>
@LucaMarconato
Copy link

LucaMarconato commented Sep 4, 2024

Thanks @bogovicj for opening the draft for the RFC, I have added my review. The points are mostly minor and I have only two more small comments, here below. After the above is resolved and the comments are addressed, for me we are good to go to officially submit the RFC.

  1. I find this example of multiscale transformations vs "standard" transformations, very useful: https://github.com/bogovicj/ngff/blob/coord-transforms/latest/examples/multiscales_strict/multiscales_example_relative.json. I would stress this example more in the specs text.
  2. Some things are not clear to me from the example above:
    2.1 are we allowed to use just scale, scale+translation or any transformation for the multiscale images? I am not sure what's the best here
    2.2 related to the point above is this issue of "what is a multiscale image and what not" Clarifying that multiscale images can only be the same image downscaled #260. I opened it outside the context of this PR, but I think it is still useful to decide how to proceed.

Regarding 2.1, I think that we should allow for scale + translation and not general transformations. Also, I think a scale alone is now enough because we may need small translations depending of the downsampling algorithm because the pixel 0 of a downscaled image may not correspond to the pixel 0 of the original image. Also some people may find useful to define a image origin.

@bogovicj
Copy link
Contributor Author

Thanks @LucaMarconato and @d-v-b ,

I address most of your comments. While there are few left, I'll get to them soon, and they're more minor. So I'm going to take this PR off of draft status.

@bogovicj bogovicj marked this pull request as ready for review September 25, 2024 18:23
@joshmoore joshmoore changed the title RFC: Transformations and Coordinate systems RFC-5: Transformations and Coordinate systems Oct 8, 2024
@joshmoore
Copy link
Member

  • Assigned RFC-5
  • Added navigation links and changelog
  • Corrected some minor formatting issues

Merging and sending for review once the build is green. If you would like to be added as an Endorser, please comment below or as always, PRs welcome.

Thanks to everyone involved! 🎉

@joshmoore joshmoore merged commit 5fd56e0 into ome:main Oct 8, 2024
9 checks passed
github-actions bot added a commit that referenced this pull request Oct 8, 2024
RFC-5: Transformations and Coordinate systems

SHA: 5fd56e0
Reason: push, by @joshmoore

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@tischi
Copy link

tischi commented Nov 22, 2024

I endorse this RFC

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.

6 participants