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

ome-ngff header for zarr streaming #6226

Merged
merged 13 commits into from
May 26, 2022
Merged

ome-ngff header for zarr streaming #6226

merged 13 commits into from
May 26, 2022

Conversation

leowe
Copy link
Contributor

@leowe leowe commented May 18, 2022

  • Added an endpoint to request the OME-NGFF Header for a specific layer and a OmeNgffHeader Class
    • Note that the code assumes that the path to a mag is always in the shortened form on disk (if it is possible)
    • Note that the OmeNgffHeader class doesn't implement all fields from the standard but only the ones that we currently need
  • Rewrite part of the .zarray route to use the existing ZarrHeader class

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • Send a request to GET /data/zarr/:organization/:dataset/:layer/.zattrs, e.g. GET /data/zarr/sample_organization/l4_sample/color/.zattrs
  • you should get back a Json that looks similar to this one:
{
    "multiscales": [{
        "version": "0.4",
        "name": "color",
        "axes": [{
            "name": "c",
            "type": "channel"
        }, {
            "name": "x",
            "type": "space",
            "unit": "nanometer"
        }, {
            "name": "y",
            "type": "space",
            "unit": "nanometer"
        }, {
            "name": "z",
            "type": "space",
            "unit": "nanometer"
        }],
        "datasets": [{
            "path": "1",
            "coordinateTranformations": [{
                "type": "scale",
                "scale": [1, 11.239999771118164, 11.239999771118164, 28]
            }]
        }, {
            "path": "2-2-1",
            "coordinateTranformations": [{
                "type": "scale",
                "scale": [1, 22.479999542236328, 22.479999542236328, 28]
            }]
        }, {
            "path": "4-4-1",
            "coordinateTranformations": [{
                "type": "scale",
                "scale": [1, 44.959999084472656, 44.959999084472656, 28]
            }]
        }, {
            "path": "8-8-2",
            "coordinateTranformations": [{
                "type": "scale",
                "scale": [1, 89.91999816894531, 89.91999816894531, 56]
            }]
        }, {
            "path": "16-16-4",
            "coordinateTranformations": [{
                "type": "scale",
                "scale": [1, 179.83999633789062, 179.83999633789062, 112]
            }]
        }]
    }]
}

Issues:


@leowe leowe marked this pull request as ready for review May 25, 2022 13:26
@leowe leowe requested review from normanrz and fm3 May 25, 2022 13:26
@fm3 fm3 changed the title omg-ngff header for zarr streaming ome-ngff header for zarr streaming May 25, 2022
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

LGTM :)

I assume this is not supported for volume annotations at the moment? Would that be difficult to add? If not, it would be great if you could create another PR for that (feel free to merge this one already)

@leowe
Copy link
Contributor Author

leowe commented May 26, 2022

LGTM :)

I assume this is not supported for volume annotations at the moment? Would that be difficult to add? If not, it would be great if you could create another PR for that (feel free to merge this one already)

It shouldn't be hard to add, I'll open a PR.

@leowe leowe merged commit 77775e4 into master May 26, 2022
@leowe leowe deleted the ome-ngff-zarr-streaming branch May 26, 2022 07:54
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.

OME-NGFF metadata for exposed layers
3 participants