-
Notifications
You must be signed in to change notification settings - Fork 21
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
High-content screening ngff metadata schema empty image #39
Comments
@mfranzon My initial suspicion while looking at the layout and the logs is that the data is stored according to the OME-NGFF 0.3 specification but the chunks themselves are written using the OME-NGFF 0.1 layout i.e. separated by a In version 0.2 and above, we modified the chunk separator to use |
@sbesson you are completly right. The problem was exactly this. I generate zarr dataset with a custom implementation, and to generate the chunks I am using dask.to_zarr() function, which probably follows the OME-NGFF 0.1 layout. Do you think it would be better move to another software ? |
I am not versed enough in the Dask API and the compatibility with the OME-NGFF specification. Quickly looking at https://docs.dask.org/en/stable/generated/dask.array.to_zarr.html and especially the extra keywords delegated to https://zarr.readthedocs.io/en/latest/api/creation.html#zarr.creation.create, it might be possible to pass From our side, the other alternative I could suggest is to look at https://pypi.org/project/ome-zarr/ which is the underlying library used by this plugin for reading OME-NGFF but also has some support for writing OME-NGFF. In terms of pros/cons, this library should ensure the best support/compliance with the OME-NGFF versions, the API/functionalities/documentation is probably less mature and still under development but now is actually a good time to get feedback on how to improve this. |
Thank you very much for your hints! Really useful |
I am trying to open a .zarr folder with this metadata schema choosing napari-plugin as reader, napari does not raise any error but the image loaded is just an "empty" array.
This is my folder structure:
As you see, I have just one dataset path (0)
This is the result after I drag and drop it on napari with the plugin:
This is the output of the napari with -vvv :
`10:22:39 DEBUG Created nested FSStore(/test2.zarr, r, {'dimension_separator': '/', 'normalize_keys': False})
10:22:39 DEBUG 0.4 matches None?
10:22:39 DEBUG 0.3 matches None?
10:22:39 DEBUG 0.2 matches None?
10:22:39 DEBUG V01:None v. 0.1
10:22:39 DEBUG treating /test2.zarr [zgroup] as Plate
10:22:39 INFO root_attr: plate
10:22:39 DEBUG {'acquisitions': [{'id': 1, 'name': 'single acquisition'}], 'columns': [{'name': '1'}], 'field_count': 1, 'name': 'test', 'rows': [{'name': 'A'}], 'version': '0.3', 'wells': [{'path': 'A/1'}]}
10:22:39 INFO plate_data: {'acquisitions': [{'id': 1, 'name': 'single acquisition'}], 'columns': [{'name': '1'}], 'field_count': 1, 'name': 'test', 'rows': [{'name': 'A'}], 'version': '0.3', 'wells': [{'path': 'A/1'}]}
10:22:39 DEBUG open(ZarrLocation(/test2.zarr/A/1))
10:22:39 DEBUG Created nested FSStore(/test2.zarr/A/1, r, {'dimension_separator': '/', 'normalize_keys': False})
10:22:39 DEBUG 0.4 matches None?
10:22:39 DEBUG 0.3 matches None?
10:22:39 DEBUG 0.2 matches None?
10:22:39 DEBUG V01:None v. 0.1
10:22:39 DEBUG treating /test2.zarr/A/1 [zgroup] as Well
10:22:39 INFO root_attr: well
10:22:39 DEBUG {'images': [{'path': '0'}], 'version': '0.3'}
10:22:39 INFO well_data: {'images': [{'path': '0'}], 'version': '0.3'}
10:22:39 DEBUG open(ZarrLocation(/test2.zarr/A/1/0))
10:22:39 DEBUG Created nested FSStore(/test2.zarr/A/1/0, r, {'dimension_separator': '/', 'normalize_keys': False})
10:22:39 DEBUG 0.4 matches 0.3?
10:22:39 DEBUG 0.3 matches 0.3?
10:22:39 WARNING version mismatch: detected:FormatV03, requested:FormatV04
10:22:39 DEBUG Created nested FSStore(/test2.zarr/A/1/0, r, {'dimension_separator': '/', 'normalize_keys': False})
10:22:39 DEBUG treating /test2.zarr/A/1/0 [zgroup] as Multiscales
10:22:39 INFO root_attr: multiscales
10:22:39 DEBUG [{'version': '0.3', 'axes': [{'name': 'y', 'type': 'space', 'unit': 'centimeter'}, {'name': 'x', 'type': 'space', 'unit':
'centimeter'}], 'datasets': [{'path': '0'}], 'metadata': {'kwargs': {'axes_names': ['y', 'x']}}}]
10:22:39 INFO root_attr: omero
10:22:39 DEBUG {'id': 1, 'version': '0.3'}
10:22:39 INFO root_attr: channels
10:22:39 DEBUG [{'active': True, 'coefficient': 1, 'color': '0000FF', 'family': 'linear', 'inverted': False, 'label': 'LaminB1', 'window': {'end': 1500, 'max': 65535, 'min': 0, 'start': 0}}]
10:22:39 INFO root_attr: rdefs
10:22:39 DEBUG {'defaultT': 0, 'defaultZ': 118, 'model': 'color'}
10:22:39 INFO datasets [{'path': '0'}]
10:22:39 INFO resolution: 0
10:22:39 INFO - shape ('y', 'x') = (8640, 7680)
10:22:39 INFO - chunks = ['2160', '2560']
10:22:39 INFO - dtype = uint16
10:22:39 DEBUG open(ZarrLocation(/test2.zarr/A/1/0/labels))
10:22:39 DEBUG Created nested FSStore(/test2.zarr/A/1/0/labels, r, {'dimension_separator': '/', 'normalize_keys': False})
10:22:39 WARNING version mismatch: detected:FormatV04, requested:FormatV03
10:22:39 DEBUG Created nested FSStore(/test2.zarr/A/1/0/labels, r, {'dimension_separator': '/', 'normalize_keys': False})
10:22:39 DEBUG treating /test2.zarr/A/1/0 [zgroup] as OMERO
10:22:39 INFO root_attr: multiscales
10:22:39 DEBUG [{'version': '0.3', 'axes': [{'name': 'y', 'type': 'space', 'unit': 'centimeter'}, {'name': 'x', 'type': 'space', 'unit': 'centimeter'}], 'datasets': [{'path': '0'}], 'metadata': {'kwargs': {'axes_names': ['y', 'x']}}}]
10:22:39 INFO root_attr: omero
10:22:39 DEBUG {'id': 1, 'version': '0.3'}
10:22:39 INFO root_attr: channels
10:22:39 DEBUG [{'active': True, 'coefficient': 1, 'color': '0000FF', 'family': 'linear', 'inverted': False, 'label': 'LaminB1', 'window': {'end': 1500, 'max': 65535, 'min': 0, 'start': 0}}]
10:22:39 INFO root_attr: rdefs
10:22:39 DEBUG {'defaultT': 0, 'defaultZ': 118, 'model': 'color'}
10:22:39 DEBUG creating lazy_reader. row:0 col:0
10:22:39 DEBUG img_pyramid_shapes: [(8640, 7680)]
10:22:39 DEBUG target_level: 0
10:22:39 DEBUG get_stitched_grid() level: 0, tile_shape: (8640, 7680)
10:22:39 DEBUG treating /test2.zarr [zgroup] as ome-zarr
10:22:39 DEBUG returning /test2.zarr [zgroup]
10:22:39 DEBUG transforming /test2.zarr [zgroup]
10:22:39 DEBUG node.metadata: {'axes': [{'name': 'y', 'type': 'space', 'unit': 'centimeter'}, {'name': 'x', 'type': 'space', 'unit': 'centimeter'}], 'metadata': {'plate': {'acquisitions': [{'id': 1, 'name': 'single acquisition'}], 'columns': [{'name': '1'}], 'field_count': 1, 'name': 'test', 'rows': [{'name': 'A'}], 'version': '0.3', 'wells': [{'path': 'A/1'}]}}}
10:22:39 DEBUG Transformed: ([dask.array<from-value, shape=(8640, 7680), dtype=uint16, chunksize=(8640, 7680), chunktype=numpy.ndarray>], {}, 'image')
10:22:39 DEBUG ImageSlice.init
10:22:39 DEBUG ImageSlice.init
10:22:39 DEBUG LOADING tile... A/1/0/0 with shape: (8640, 7680)
10:22:39 DEBUG ImageSlice.init`
I hope that this informations could be helpful to better understand the issue.
Thank you very much for your work and for the help in figure out what's going on.
The text was updated successfully, but these errors were encountered: