ome / omero-cli-zarr

https://pypi.org/project/omero-cli-zarr/
GNU General Public License v2.0
15 stars 10 forks source link

export v0.3 ome ngff #70

Closed will-moore closed 3 years ago

will-moore commented 3 years ago

To test, try exporting 2D, 2D, 4D and 5D images.

$ omero zarr export Image:1

Z, C & T dimensions where size=1 should be ignored, and not included in the exported v0.3 OME_NGFF. Also the .zattrs multiscales should list the used dimensions as axes, e.g: "axes": ["t", "c", "y", "x"]

joshmoore commented 3 years ago

Export was successful:

cat 6001240.zarr/.zattrs
{
    "_creator": {
        "name": "omero-zarr",
        "version": "0.0.11.dev22+g541c88e"
    },
    "multiscales": [
        {
            "axes": [
                "c",
                "z",
                "y",
                "x"
            ],
            "datasets": [
...

and for the 0-th resolution:

    "shape": [
        2,
        236,
        275,
        271
    ],

but still considering how to test reading while blocked on https://github.com/ome/napari-ome-zarr/issues/6

cc: @constantinpape

will-moore commented 3 years ago

Using https://github.com/hms-dbmi/vizarr/pull/104 if you can serve you data in a CORS-friendly manner then you can view at: https://deploy-preview-104--vizarr.netlify.app/?source=http://localhost:8000/path/to/image.zarr

For serving CORS, I use this little python script:

simple-cors-http-server.py ``` #!/usr/bin/env python3 # From https://stackoverflow.com/questions/21956683/enable-access-control-on-simple-http-server from http.server import HTTPServer, SimpleHTTPRequestHandler, test import sys class CORSRequestHandler (SimpleHTTPRequestHandler): def end_headers (self): self.send_header('Access-Control-Allow-Origin', '*') SimpleHTTPRequestHandler.end_headers(self) if __name__ == '__main__': test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000) ```
will-moore commented 3 years ago

With https://github.com/ome/napari-ome-zarr/pull/9 and fix described in https://github.com/ome/ome-zarr-py/pull/89#issuecomment-879789276 I can open data exported with this PR in napari

will-moore commented 3 years ago

Data exported today, using this branch:

joshmoore commented 3 years ago

Thanks, @will-moore !