Skip to content

Wrong window metadata in projected image? #941

@tcompa

Description

@tcompa

See also https://github.com/fractal-analytics-platform/fractal-deployments/issues/116#issuecomment-2812444135.

I have these two plates:

18M	./20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr
35M	./20200812-CardiomyocyteDifferentiation14-Cycle1.zarr

created with v1.5.0a2.

I ran

$ pip install "napari[all]" "napari-ome-zarr"

And then

$ napari --plugin napari-ome-zarr ./20200812-CardiomyocyteDifferentiation14-Cycle1.zarr/
$ napari --plugin napari-ome-zarr ./20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr/

3D image

Image

2D image

Image

Here are the napari --verbose outputs.

3D image

napari --plugin napari-ome-zarr ./20200812-CardiomyocyteDifferentiation14-Cycle1.zarr/ --verbose
12:35:50 : INFO : MainThread : root_attr: plate
12:35:50 : INFO : MainThread : plate_data: {'acquisitions': [{'id': 0, 'name': '20200812-CardiomyocyteDifferentiation14-Cycle1'}], 'columns': [{'name': '03'}], 'rows': [{'name': 'B'}], 'version': '0.4', 'wells': [{'columnIndex': 0, 'path': 'B/03', 'rowIndex': 0}]}
12:35:50 : INFO : MainThread : root_attr: well
12:35:50 : INFO : MainThread : well_data: {'images': [{'path': '0'}], 'version': '0.4'}
12:35:50 : INFO : MainThread : root_attr: multiscales
12:35:50 : INFO : MainThread : root_attr: omero
12:35:50 : INFO : MainThread : datasets [{'coordinateTransformations': [{'scale': [1, 1.0, 0.1625, 0.1625], 'type': 'scale'}], 'path': '0'}, {'coordinateTransformations': [{'scale': [1, 1.0, 0.325, 0.325], 'type': 'scale'}], 'path': '1'}, {'coordinateTransformations': [{'scale': [1, 1.0, 0.65, 0.65], 'type': 'scale'}], 'path': '2'}, {'coordinateTransformations': [{'scale': [1, 1.0, 1.3, 1.3], 'type': 'scale'}], 'path': '3'}, {'coordinateTransformations': [{'scale': [1, 1.0, 2.6, 2.6], 'type': 'scale'}], 'path': '4'}]
12:35:50 : INFO : MainThread : resolution: 0
12:35:50 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 2, 2160, 5120)
12:35:50 : INFO : MainThread :  - chunks =  ['1', '2', '2160', '2560']
12:35:50 : INFO : MainThread :  - dtype = uint16
12:35:50 : INFO : MainThread : resolution: 1
12:35:50 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 2, 1080, 2560)
12:35:50 : INFO : MainThread :  - chunks =  ['1', '2', '1080', '2560']
12:35:50 : INFO : MainThread :  - dtype = uint16
12:35:50 : INFO : MainThread : resolution: 2
12:35:50 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 2, 540, 1280)
12:35:50 : INFO : MainThread :  - chunks =  ['1', '2', '540', '1280']
12:35:50 : INFO : MainThread :  - dtype = uint16
12:35:50 : INFO : MainThread : resolution: 3
12:35:50 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 2, 270, 640)
12:35:50 : INFO : MainThread :  - chunks =  ['1', '2', '270', '640']
12:35:50 : INFO : MainThread :  - dtype = uint16
12:35:50 : INFO : MainThread : resolution: 4
12:35:50 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 2, 135, 320)
12:35:50 : INFO : MainThread :  - chunks =  ['1', '2', '135', '320']
12:35:50 : INFO : MainThread :  - dtype = uint16
12:35:50 : INFO : MainThread : root_attr: multiscales
12:35:50 : INFO : MainThread : root_attr: omero

2D image:

12:36:01 : INFO : MainThread : root_attr: plate
12:36:01 : INFO : MainThread : plate_data: {'acquisitions': [{'id': 0, 'name': '20200812-CardiomyocyteDifferentiation14-Cycle1'}], 'columns': [{'name': '03'}], 'rows': [{'name': 'B'}], 'version': '0.4', 'wells': [{'columnIndex': 0, 'path': 'B/03', 'rowIndex': 0}]}
12:36:01 : INFO : MainThread : root_attr: well
12:36:01 : INFO : MainThread : well_data: {'images': [{'path': '0'}], 'version': '0.4'}
12:36:01 : INFO : MainThread : root_attr: multiscales
12:36:01 : INFO : MainThread : root_attr: omero
12:36:01 : INFO : MainThread : datasets [{'coordinateTransformations': [{'scale': [1.0, 1.0, 0.1625, 0.1625], 'type': 'scale'}], 'path': '0'}, {'coordinateTransformations': [{'scale': [1.0, 1.0, 0.325, 0.325], 'type': 'scale'}], 'path': '1'}, {'coordinateTransformations': [{'scale': [1.0, 1.0, 0.65, 0.65], 'type': 'scale'}], 'path': '2'}, {'coordinateTransformations': [{'scale': [1.0, 1.0, 1.3, 1.3], 'type': 'scale'}], 'path': '3'}, {'coordinateTransformations': [{'scale': [1.0, 1.0, 2.6, 2.6], 'type': 'scale'}], 'path': '4'}]
12:36:01 : INFO : MainThread : resolution: 0
12:36:01 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 1, 2160, 5120)
12:36:01 : INFO : MainThread :  - chunks =  ['1', '1', '2160', '2560']
12:36:01 : INFO : MainThread :  - dtype = uint16
12:36:01 : INFO : MainThread : resolution: 1
12:36:01 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 1, 1080, 2560)
12:36:01 : INFO : MainThread :  - chunks =  ['1', '1', '1080', '2560']
12:36:01 : INFO : MainThread :  - dtype = uint16
12:36:01 : INFO : MainThread : resolution: 2
12:36:01 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 1, 540, 1280)
12:36:01 : INFO : MainThread :  - chunks =  ['1', '1', '540', '1280']
12:36:01 : INFO : MainThread :  - dtype = uint16
12:36:01 : INFO : MainThread : resolution: 3
12:36:01 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 1, 270, 640)
12:36:01 : INFO : MainThread :  - chunks =  ['1', '1', '270', '640']
12:36:01 : INFO : MainThread :  - dtype = uint16
12:36:01 : INFO : MainThread : resolution: 4
12:36:01 : INFO : MainThread :  - shape ('c', 'z', 'y', 'x') = (1, 1, 135, 320)
12:36:01 : INFO : MainThread :  - chunks =  ['1', '1', '135', '320']
12:36:01 : INFO : MainThread :  - dtype = uint16
12:36:01 : INFO : MainThread : root_attr: multiscales
12:36:01 : INFO : MainThread : root_attr: omero

And here is the diff of the image zattrs:

30c30
<                                 1,
---
>                                 1.0,
44c44
<                                 1,
---
>                                 1.0,
58c58
<                                 1,
---
>                                 1.0,
72c72
<                                 1,
---
>                                 1.0,
86c86
<                                 1,
---
>                                 1.0,
96a97
>             "name": "MIP",
108,111c109,112
<                     "end": 800,
<                     "max": 65535,
<                     "min": 0,
<                     "start": 110
---
>                     "end": 65535.0,
>                     "max": 65535.0,
>                     "min": 0.0,
>                     "start": 0.0
114,117c115
<         ],
<         "id": 1,
<         "name": "TBD",
<         "version": "0.4"
---
>         ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions