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

How do we specify metadata #3

Open
constantinpape opened this issue Nov 18, 2020 · 7 comments
Open

How do we specify metadata #3

constantinpape opened this issue Nov 18, 2020 · 7 comments

Comments

@constantinpape
Copy link
Contributor

@joshmoore @tischi
A few questions already:
How do we specify additional metadata in the ome.zarr multi-scale format?

In particular, we need:

  • the resolution (= voxel size) of the data
  • the unit (here micrometer)
  • the affine transformation for bdv

I couldn't find anything in the format definittion https://forum.image.sc/t/multiscale-arrays-v0-1/37930.

@joshmoore
Copy link
Collaborator

@constantinpape, that was something skipped in zarr-developers/zarr-specs#50 -- I assume for the moment you can store it in the closest representation to N5.

@constantinpape
Copy link
Contributor Author

@constantinpape, that was something skipped in zarr-developers/zarr-specs#50 -- I assume for the moment you can store it in the closest representation to N5.

Right now it's stored in the xml, so if we keep the xml we don't need to change anything.

@d-v-b
Copy link

d-v-b commented Dec 16, 2020

chiming in late, but I have been doing this:

{
"multiscales": [
        {
            "datasets": [
                {
                    "path": "s0",
                    "transform": { # Implementation detail: these
                        "axes": [  # axis values are all listed in C order. 
                            "z",
                            "y",
                            "x"
                        ],
                        "scale": [
                            5.24,
                            4.0,
                            4.0
                        ],
                        "translate": [
                            0.0,
                            0.0,
                            0.0
                        ],
                        "units": [
                            "nm",
                            "nm",
                            "nm"
                        ]
                    }
                },
                {
                    "path": "s1",
                    "transform": {
                        "axes": [
                            "z",
                            "y",
                            "x"
                        ],
                        "scale": [
                            10.48,
                            8.0,
                            8.0
                        ],
                        "translate": [
                            2.62,
                            2.0,
                            2.0
                        ],
                        "units": [
                            "nm",
                            "nm",
                            "nm"
                        ]
                    }
                }
             ]
         }
    ]
}

each entry in datasets is an object that has a path property (as required by the ome multiscale spec) and additionally a transform property. The same transform objects appear in their respective array metadata.

@joshmoore
Copy link
Collaborator

Thanks, @d-v-b! I certainly pointed to examples of the COSEM data. I think @constantinpape and @tischi adjusted that slightly in their data, which I assume will be a part of ramping back up on zarr-developers/zarr-specs#50

@constantinpape
Copy link
Contributor Author

Thanks, @d-v-b! I certainly pointed to examples of the COSEM data.

Yes, we used the COSEM layout, with just a minor change, see #13 (comment).

@d-v-b
Copy link

d-v-b commented Dec 17, 2020

good to know! FYI, you wonder here #13 (comment) why "units" is a list with length == number of axes. This is simply to accommodate datasets where different axes have different units, e.g. spatiotemporal data or hyperspectral data.

@tischi
Copy link
Owner

tischi commented Dec 18, 2020

This is simply to accommodate datasets where different axes have different units

Good point! Makes sense!

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

4 participants