ngio 0.5.0a1__tar.gz → 0.5.0a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.github/workflows/build_docs.yml +1 -1
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.github/workflows/ci.yml +3 -3
- {ngio-0.5.0a1 → ngio-0.5.0a2}/CHANGELOG.md +24 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/PKG-INFO +3 -3
- {ngio-0.5.0a1 → ngio-0.5.0a2}/pyproject.toml +2 -2
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/common/_pyramid.py +12 -2
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/hcs/_plate.py +66 -82
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_create.py +14 -10
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_create_synt_container.py +3 -3
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_image.py +2 -2
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_label.py +1 -1
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_ome_zarr_container.py +6 -6
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/_tables_container.py +23 -16
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/v1/_roi_table.py +3 -3
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/utils/__init__.py +2 -0
- ngio-0.5.0a2/src/ngio/utils/_cache.py +48 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/utils/_zarr_utils.py +126 -193
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/tables/test_table_group.py +1 -1
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/utils/test_zarr_utils.py +15 -18
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.copier-answers.yml +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.gitattributes +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.github/ISSUE_TEMPLATE.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.github/TEST_FAIL_TEMPLATE.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.github/dependabot.yml +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.github/pull_request_template.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.gitignore +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/.pre-commit-config.yaml +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/LICENSE +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/README.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/_typos.toml +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/hcs.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/images.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/iterators.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/common.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/hcs.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/images.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/io_pipes.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/iterators.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/ngio.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/tables.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/transforms.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ngio/utils.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/ome_zarr_container.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/api/tables.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/changelog.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/code_of_conduct.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/contributing.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/getting_started/0_quickstart.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/getting_started/1_ome_zarr_containers.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/getting_started/2_images.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/getting_started/3_tables.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/getting_started/4_masked_images.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/getting_started/5_hcs.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/getting_started/6_iterators.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/index.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/backend.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/overview.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/table_types/condition_table.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/table_types/custom_table.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/table_types/feature_table.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/table_types/generic_table.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/table_types/masking_roi_table.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/table_specs/table_types/roi_table.md +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/tutorials/create_ome_zarr.ipynb +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/tutorials/feature_extraction.ipynb +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/tutorials/hcs_exploration.ipynb +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/tutorials/image_processing.ipynb +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/docs/tutorials/image_segmentation.ipynb +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/mkdocs.yml +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/common/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/common/_dimensions.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/common/_masking_roi.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/common/_roi.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/common/_synt_images_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/common/_zoom.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/iterators/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/iterators/_abstract_iterator.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/iterators/_feature.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/iterators/_image_processing.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/iterators/_mappers.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/iterators/_rois_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/experimental/iterators/_segmentation.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/hcs/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_abstract_image.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_masked_image.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/images/_table_ops.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_io_pipes.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_io_pipes_masked.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_io_pipes_roi.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_io_pipes_types.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_match_shape.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_ops_axes.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_ops_slices.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_ops_slices_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_ops_transforms.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/io_pipes/_zoom_transform.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/_meta_handlers.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/ngio_specs/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/ngio_specs/_axes.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/ngio_specs/_channels.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/ngio_specs/_dataset.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_image.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/ngio_specs/_pixel_size.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/v04/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/v04/_custom_models.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/v04/_v04_spec_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/v05/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/v05/_custom_models.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/ome_zarr_meta/v05/_v05_spec_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/resources/20200812-CardiomyocyteDifferentiation14-Cycle1_B03/mask.png +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/resources/20200812-CardiomyocyteDifferentiation14-Cycle1_B03/nuclei.png +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/resources/20200812-CardiomyocyteDifferentiation14-Cycle1_B03/raw.jpg +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/resources/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/resources/resource_model.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/_abstract_table.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_abstract_backend.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_anndata.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_anndata_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_csv.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_json.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_non_zarr_backends.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_parquet.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_table_backends.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/backends/_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/v1/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/v1/_condition_table.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/v1/_feature_table.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/tables/v1/_generic_table.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/transforms/__init__.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/transforms/_zoom.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/utils/_datasets.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/utils/_errors.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/utils/_fractal_fsspec_store.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/src/ngio/utils/_logger.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/conftest.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_cyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_czyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_yx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/labels/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/labels/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/images/test_image_zyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/meta/base_ome_zarr_image_meta.json +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/meta/base_ome_zarr_image_meta_wrong_axis_order.json +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/meta/base_ome_zarr_label_meta.json +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/meta/base_ome_zarr_well_meta.json +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/data/v04/meta/ome_zarr_well_path_normalization_meta.json +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/common/test_dimensions.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/common/test_pyramid.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/common/test_roi.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/common/test_transforms.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/hcs/test_plate.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/hcs/test_well.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/images/test_create.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/images/test_images.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/images/test_masked_images.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/images/test_omezarr_container.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/images/test_table_ops.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/io_pipes/test_axes_ops.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/io_pipes/test_slicing_ops.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/iterators/test_iterators.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/ome_zarr_meta/test_image_handler.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/ome_zarr_meta/test_unit_ngio_specs.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/ome_zarr_meta/test_unit_v04_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/tables/test_backends.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/tables/test_backends_utils.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/tables/test_feature_table.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/tables/test_generic_table.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/tables/test_masking_roi_table_v1.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/tables/test_roi_table_v1.py +0 -0
- {ngio-0.5.0a1 → ngio-0.5.0a2}/tests/unit/utils/test_download_datasets.py +0 -0
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
# included in the sdist (unless explicitly excluded)
|
|
25
25
|
runs-on: ubuntu-latest
|
|
26
26
|
steps:
|
|
27
|
-
- uses: actions/checkout@
|
|
27
|
+
- uses: actions/checkout@v6
|
|
28
28
|
- run: pipx run check-manifest
|
|
29
29
|
|
|
30
30
|
test:
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
38
38
|
|
|
39
39
|
steps:
|
|
40
|
-
- uses: actions/checkout@
|
|
40
|
+
- uses: actions/checkout@v6
|
|
41
41
|
|
|
42
42
|
- name: 🐍 Set up Python ${{ matrix.python-version }}
|
|
43
43
|
uses: actions/setup-python@v6
|
|
@@ -98,7 +98,7 @@ jobs:
|
|
|
98
98
|
contents: write
|
|
99
99
|
|
|
100
100
|
steps:
|
|
101
|
-
- uses: actions/checkout@
|
|
101
|
+
- uses: actions/checkout@v6
|
|
102
102
|
with:
|
|
103
103
|
fetch-depth: 0
|
|
104
104
|
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v0.5.0]
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- Add support for OME-NGFF v0.5
|
|
7
|
+
- Move to zarr-python v3
|
|
8
|
+
|
|
9
|
+
### API Changes
|
|
10
|
+
|
|
11
|
+
- The `compressor` argument has been renamed to `compressors` in all relevant functions and methods to reflect the support for multiple compressors in zarr v3.
|
|
12
|
+
- The `version` argument has been renamed to `ngff_version` in all relevant functions and methods to specify the OME-NGFF version.
|
|
13
|
+
- Remove the `parallel_safe` argument from all zarr related functions and methods. The locking mechanism is now handled internally and only depends on the
|
|
14
|
+
`cache`.
|
|
15
|
+
- Remove the unused `parent` argument from `ZarrGroupHandler`.
|
|
16
|
+
## [v0.4.6]
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
- Fix channel selection from `wavelength_id`
|
|
20
|
+
- Fix table opening mode to stop wrtiting groups when opening in append mode.
|
|
21
|
+
|
|
22
|
+
## [v0.4.5]
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
- Pin Dask to version <2025.11 to avoid errors when writing zarr pyramids with dask (see https://github.com/dask/dask/issues/12159#issuecomment-3548421833)
|
|
26
|
+
|
|
3
27
|
## [v0.4.4]
|
|
4
28
|
|
|
5
29
|
### Bug Fixes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ngio
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.0a2
|
|
4
4
|
Summary: Next Generation file format IO
|
|
5
5
|
Project-URL: homepage, https://github.com/BioVisionCenter/ngio
|
|
6
6
|
Project-URL: repository, https://github.com/BioVisionCenter/ngio
|
|
@@ -17,8 +17,8 @@ Classifier: Typing :: Typed
|
|
|
17
17
|
Requires-Python: <3.14,>=3.11
|
|
18
18
|
Requires-Dist: aiohttp
|
|
19
19
|
Requires-Dist: anndata
|
|
20
|
-
Requires-Dist: dask[array]
|
|
21
|
-
Requires-Dist: dask[distributed]
|
|
20
|
+
Requires-Dist: dask[array]<2025.11.0
|
|
21
|
+
Requires-Dist: dask[distributed]<2025.11.0
|
|
22
22
|
Requires-Dist: filelock
|
|
23
23
|
Requires-Dist: numpy
|
|
24
24
|
Requires-Dist: ome-zarr-models
|
|
@@ -41,9 +41,19 @@ def _on_disk_dask_zoom(
|
|
|
41
41
|
source_array = da.from_zarr(source)
|
|
42
42
|
target_array = dask_zoom(source_array, target_shape=target.shape, order=order)
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
# This is a potential fix for Dask 2025.11
|
|
45
|
+
# import dask.config
|
|
46
|
+
# chunk_size_bytes = np.prod(target.chunks) * target_array.dtype.itemsize
|
|
47
|
+
# current_chunk_size = dask.config.get("array.chunk-size")
|
|
48
|
+
# Increase the chunk size to avoid dask potentially creating
|
|
49
|
+
# corrupted chunks when writing chunks that are not multiple of the
|
|
50
|
+
# target chunk size
|
|
51
|
+
# dask.config.set({"array.chunk-size": f"{chunk_size_bytes}B"})
|
|
52
|
+
target_array = target_array.rechunk(target.chunks)
|
|
53
|
+
target_array = target_array.compute_chunk_sizes()
|
|
46
54
|
target_array.to_zarr(target)
|
|
55
|
+
# Restore previous chunk size
|
|
56
|
+
# dask.config.set({"array.chunk-size": current_chunk_size})
|
|
47
57
|
|
|
48
58
|
|
|
49
59
|
def _on_disk_coarsen(
|
|
@@ -40,6 +40,7 @@ from ngio.tables import (
|
|
|
40
40
|
)
|
|
41
41
|
from ngio.utils import (
|
|
42
42
|
AccessModeLiteral,
|
|
43
|
+
NgioCache,
|
|
43
44
|
NgioValueError,
|
|
44
45
|
StoreOrGroup,
|
|
45
46
|
ZarrGroupHandler,
|
|
@@ -239,6 +240,12 @@ class OmeZarrPlate:
|
|
|
239
240
|
self._group_handler = group_handler
|
|
240
241
|
self._meta_handler = find_plate_meta_handler(group_handler)
|
|
241
242
|
self._tables_container = table_container
|
|
243
|
+
self._wells_cache: NgioCache[OmeZarrWell] = NgioCache(
|
|
244
|
+
use_cache=self._group_handler.use_cache
|
|
245
|
+
)
|
|
246
|
+
self._images_cache: NgioCache[OmeZarrContainer] = NgioCache(
|
|
247
|
+
use_cache=self._group_handler.use_cache
|
|
248
|
+
)
|
|
242
249
|
|
|
243
250
|
def __repr__(self) -> str:
|
|
244
251
|
"""Return a string representation of the plate."""
|
|
@@ -356,6 +363,24 @@ class OmeZarrPlate:
|
|
|
356
363
|
well = self.get_well(row=row, column=column)
|
|
357
364
|
return well.get_image_acquisition_id(image_path=image_path)
|
|
358
365
|
|
|
366
|
+
def _get_well(self, well_path: str) -> OmeZarrWell:
|
|
367
|
+
"""Get a well from the plate by its path.
|
|
368
|
+
|
|
369
|
+
Args:
|
|
370
|
+
well_path (str): The path of the well.
|
|
371
|
+
|
|
372
|
+
Returns:
|
|
373
|
+
OmeZarrWell: The well.
|
|
374
|
+
|
|
375
|
+
"""
|
|
376
|
+
cached_well = self._wells_cache.get(well_path)
|
|
377
|
+
if cached_well is not None:
|
|
378
|
+
return cached_well
|
|
379
|
+
|
|
380
|
+
group_handler = self._group_handler.derive_handler(well_path)
|
|
381
|
+
self._wells_cache.set(well_path, OmeZarrWell(group_handler))
|
|
382
|
+
return OmeZarrWell(group_handler)
|
|
383
|
+
|
|
359
384
|
def get_well(self, row: str, column: int | str) -> OmeZarrWell:
|
|
360
385
|
"""Get a well from the plate.
|
|
361
386
|
|
|
@@ -367,8 +392,7 @@ class OmeZarrPlate:
|
|
|
367
392
|
OmeZarrWell: The well.
|
|
368
393
|
"""
|
|
369
394
|
well_path = self._well_path(row=row, column=column)
|
|
370
|
-
|
|
371
|
-
return OmeZarrWell(group_handler)
|
|
395
|
+
return self._get_well(well_path=well_path)
|
|
372
396
|
|
|
373
397
|
async def get_wells_async(self) -> dict[str, OmeZarrWell]:
|
|
374
398
|
"""Get all wells in the plate asynchronously.
|
|
@@ -380,26 +404,17 @@ class OmeZarrPlate:
|
|
|
380
404
|
dict[str, OmeZarrWell]: A dictionary of wells, where the key is the well
|
|
381
405
|
path and the value is the well object.
|
|
382
406
|
"""
|
|
383
|
-
wells = self._group_handler.get_from_cache("wells")
|
|
384
|
-
if wells is not None:
|
|
385
|
-
assert isinstance(wells, dict)
|
|
386
|
-
return wells
|
|
387
|
-
|
|
388
|
-
def process_well(well_path):
|
|
389
|
-
group_handler = self._group_handler.derive_handler(well_path)
|
|
390
|
-
well = OmeZarrWell(group_handler)
|
|
391
|
-
return well_path, well
|
|
392
|
-
|
|
393
407
|
wells, tasks = {}, []
|
|
394
408
|
for well_path in self.wells_paths():
|
|
395
|
-
task = asyncio.to_thread(
|
|
409
|
+
task = asyncio.to_thread(
|
|
410
|
+
lambda well_path: (well_path, self._get_well(well_path)), well_path
|
|
411
|
+
)
|
|
396
412
|
tasks.append(task)
|
|
397
413
|
|
|
398
414
|
results = await asyncio.gather(*tasks)
|
|
399
415
|
for well_path, well in results:
|
|
400
416
|
wells[well_path] = well
|
|
401
417
|
|
|
402
|
-
self._group_handler.add_to_cache("wells", wells)
|
|
403
418
|
return wells
|
|
404
419
|
|
|
405
420
|
def get_wells(self) -> dict[str, OmeZarrWell]:
|
|
@@ -409,24 +424,25 @@ class OmeZarrPlate:
|
|
|
409
424
|
dict[str, OmeZarrWell]: A dictionary of wells, where the key is the well
|
|
410
425
|
path and the value is the well object.
|
|
411
426
|
"""
|
|
412
|
-
wells = self._group_handler.get_from_cache("wells")
|
|
413
|
-
if wells is not None:
|
|
414
|
-
assert isinstance(wells, dict)
|
|
415
|
-
return wells
|
|
416
|
-
|
|
417
|
-
def process_well(well_path):
|
|
418
|
-
group_handler = self._group_handler.derive_handler(well_path)
|
|
419
|
-
well = OmeZarrWell(group_handler)
|
|
420
|
-
return well_path, well
|
|
421
|
-
|
|
422
427
|
wells = {}
|
|
423
428
|
for well_path in self.wells_paths():
|
|
424
|
-
|
|
425
|
-
wells[well_path] = well
|
|
426
|
-
|
|
427
|
-
self._group_handler.add_to_cache("wells", wells)
|
|
429
|
+
wells[well_path] = self._get_well(well_path)
|
|
428
430
|
return wells
|
|
429
431
|
|
|
432
|
+
def _get_image(self, image_path: str) -> OmeZarrContainer:
|
|
433
|
+
"""Get an image from the plate by its path.
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
image_path (str): The path of the image.
|
|
437
|
+
"""
|
|
438
|
+
cached_image = self._images_cache.get(image_path)
|
|
439
|
+
if cached_image is not None:
|
|
440
|
+
return cached_image
|
|
441
|
+
img_group_handler = self._group_handler.derive_handler(image_path)
|
|
442
|
+
image = OmeZarrContainer(img_group_handler)
|
|
443
|
+
self._images_cache.set(image_path, image)
|
|
444
|
+
return image
|
|
445
|
+
|
|
430
446
|
async def get_images_async(
|
|
431
447
|
self, acquisition: int | None = None
|
|
432
448
|
) -> dict[str, OmeZarrContainer]:
|
|
@@ -442,30 +458,19 @@ class OmeZarrPlate:
|
|
|
442
458
|
dict[str, OmeZarrContainer]: A dictionary of images, where the key is the
|
|
443
459
|
image path and the value is the image object.
|
|
444
460
|
"""
|
|
445
|
-
images = self._group_handler.get_from_cache("images")
|
|
446
|
-
if images is not None:
|
|
447
|
-
assert isinstance(images, dict)
|
|
448
|
-
return images
|
|
449
|
-
|
|
450
461
|
paths = await self.images_paths_async(acquisition=acquisition)
|
|
451
462
|
|
|
452
|
-
def process_image(image_path):
|
|
453
|
-
"""Process a single image and return the image path and image object."""
|
|
454
|
-
img_group_handler = self._group_handler.derive_handler(image_path)
|
|
455
|
-
image = OmeZarrContainer(img_group_handler)
|
|
456
|
-
return image_path, image
|
|
457
|
-
|
|
458
463
|
images, tasks = {}, []
|
|
459
464
|
for image_path in paths:
|
|
460
|
-
task = asyncio.to_thread(
|
|
465
|
+
task = asyncio.to_thread(
|
|
466
|
+
lambda image_path: (image_path, self._get_image(image_path)), image_path
|
|
467
|
+
)
|
|
461
468
|
tasks.append(task)
|
|
462
469
|
|
|
463
470
|
results = await asyncio.gather(*tasks)
|
|
464
471
|
|
|
465
472
|
for image_path, image in results:
|
|
466
473
|
images[image_path] = image
|
|
467
|
-
|
|
468
|
-
self._group_handler.add_to_cache("images", images)
|
|
469
474
|
return images
|
|
470
475
|
|
|
471
476
|
def get_images(self, acquisition: int | None = None) -> dict[str, OmeZarrContainer]:
|
|
@@ -474,24 +479,11 @@ class OmeZarrPlate:
|
|
|
474
479
|
Args:
|
|
475
480
|
acquisition: The acquisition id to filter the images.
|
|
476
481
|
"""
|
|
477
|
-
images = self._group_handler.get_from_cache("images")
|
|
478
|
-
if images is not None:
|
|
479
|
-
assert isinstance(images, dict)
|
|
480
|
-
return images
|
|
481
482
|
paths = self.images_paths(acquisition=acquisition)
|
|
482
|
-
|
|
483
|
-
def process_image(image_path):
|
|
484
|
-
"""Process a single image and return the image path and image object."""
|
|
485
|
-
img_group_handler = self._group_handler.derive_handler(image_path)
|
|
486
|
-
image = OmeZarrContainer(img_group_handler)
|
|
487
|
-
return image_path, image
|
|
488
|
-
|
|
489
483
|
images = {}
|
|
490
484
|
for image_path in paths:
|
|
491
|
-
|
|
492
|
-
images[image_path] = image
|
|
485
|
+
images[image_path] = self._get_image(image_path)
|
|
493
486
|
|
|
494
|
-
self._group_handler.add_to_cache("images", images)
|
|
495
487
|
return images
|
|
496
488
|
|
|
497
489
|
def get_image(
|
|
@@ -508,8 +500,7 @@ class OmeZarrPlate:
|
|
|
508
500
|
OmeZarrContainer: The image.
|
|
509
501
|
"""
|
|
510
502
|
image_path = self._image_path(row=row, column=column, path=image_path)
|
|
511
|
-
|
|
512
|
-
return OmeZarrContainer(group_handler)
|
|
503
|
+
return self._get_image(image_path)
|
|
513
504
|
|
|
514
505
|
def get_image_store(
|
|
515
506
|
self, row: str, column: int | str, image_path: str
|
|
@@ -785,7 +776,6 @@ class OmeZarrPlate:
|
|
|
785
776
|
keep_acquisitions: bool = False,
|
|
786
777
|
cache: bool = False,
|
|
787
778
|
overwrite: bool = False,
|
|
788
|
-
parallel_safe: bool = True,
|
|
789
779
|
) -> "OmeZarrPlate":
|
|
790
780
|
"""Derive a new OME-Zarr plate from an existing one.
|
|
791
781
|
|
|
@@ -796,7 +786,6 @@ class OmeZarrPlate:
|
|
|
796
786
|
keep_acquisitions (bool): Whether to keep the acquisitions in the new plate.
|
|
797
787
|
cache (bool): Whether to use a cache for the zarr group metadata.
|
|
798
788
|
overwrite (bool): Whether to overwrite the existing plate.
|
|
799
|
-
parallel_safe (bool): Whether the group handler is parallel safe.
|
|
800
789
|
"""
|
|
801
790
|
return derive_ome_zarr_plate(
|
|
802
791
|
ome_zarr_plate=self,
|
|
@@ -806,7 +795,6 @@ class OmeZarrPlate:
|
|
|
806
795
|
keep_acquisitions=keep_acquisitions,
|
|
807
796
|
cache=cache,
|
|
808
797
|
overwrite=overwrite,
|
|
809
|
-
parallel_safe=parallel_safe,
|
|
810
798
|
)
|
|
811
799
|
|
|
812
800
|
def _get_tables_container(self) -> TablesContainer | None:
|
|
@@ -1143,7 +1131,6 @@ def open_ome_zarr_plate(
|
|
|
1143
1131
|
store: StoreOrGroup,
|
|
1144
1132
|
cache: bool = False,
|
|
1145
1133
|
mode: AccessModeLiteral = "r+",
|
|
1146
|
-
parallel_safe: bool = True,
|
|
1147
1134
|
) -> OmeZarrPlate:
|
|
1148
1135
|
"""Open an OME-Zarr plate.
|
|
1149
1136
|
|
|
@@ -1152,11 +1139,8 @@ def open_ome_zarr_plate(
|
|
|
1152
1139
|
cache (bool): Whether to use a cache for the zarr group metadata.
|
|
1153
1140
|
mode (AccessModeLiteral): The
|
|
1154
1141
|
access mode for the image. Defaults to "r+".
|
|
1155
|
-
parallel_safe (bool): Whether the group handler is parallel safe.
|
|
1156
1142
|
"""
|
|
1157
|
-
group_handler = ZarrGroupHandler(
|
|
1158
|
-
store=store, cache=cache, mode=mode, parallel_safe=parallel_safe
|
|
1159
|
-
)
|
|
1143
|
+
group_handler = ZarrGroupHandler(store=store, cache=cache, mode=mode)
|
|
1160
1144
|
return OmeZarrPlate(group_handler)
|
|
1161
1145
|
|
|
1162
1146
|
|
|
@@ -1168,9 +1152,7 @@ def _create_empty_plate_from_meta(
|
|
|
1168
1152
|
) -> ZarrGroupHandler:
|
|
1169
1153
|
"""Create an empty OME-Zarr plate from metadata."""
|
|
1170
1154
|
mode = "w" if overwrite else "w-"
|
|
1171
|
-
group_handler = ZarrGroupHandler(
|
|
1172
|
-
store=store, cache=True, mode=mode, parallel_safe=False
|
|
1173
|
-
)
|
|
1155
|
+
group_handler = ZarrGroupHandler(store=store, cache=True, mode=mode)
|
|
1174
1156
|
meta_handler = get_plate_meta_handler(group_handler, version=version)
|
|
1175
1157
|
meta_handler.write_meta(meta)
|
|
1176
1158
|
return group_handler
|
|
@@ -1183,9 +1165,18 @@ def create_empty_plate(
|
|
|
1183
1165
|
version: NgffVersions = "0.4",
|
|
1184
1166
|
cache: bool = False,
|
|
1185
1167
|
overwrite: bool = False,
|
|
1186
|
-
parallel_safe: bool = True,
|
|
1187
1168
|
) -> OmeZarrPlate:
|
|
1188
|
-
"""Initialize and create an empty OME-Zarr plate.
|
|
1169
|
+
"""Initialize and create an empty OME-Zarr plate.
|
|
1170
|
+
|
|
1171
|
+
Args:
|
|
1172
|
+
store (StoreOrGroup): The Zarr store or group that stores the plate.
|
|
1173
|
+
name (str): The name of the plate.
|
|
1174
|
+
images (list[ImageInWellPath] | None): A list of images to add to the plate.
|
|
1175
|
+
If None, no images are added. Defaults to None.
|
|
1176
|
+
version (NgffVersion): The version of the new plate.
|
|
1177
|
+
cache (bool): Whether to use a cache for the zarr group metadata.
|
|
1178
|
+
overwrite (bool): Whether to overwrite the existing plate.
|
|
1179
|
+
"""
|
|
1189
1180
|
plate_meta = NgioPlateMeta.default_init(
|
|
1190
1181
|
name=name,
|
|
1191
1182
|
version=version,
|
|
@@ -1211,7 +1202,6 @@ def create_empty_plate(
|
|
|
1211
1202
|
store=store,
|
|
1212
1203
|
cache=cache,
|
|
1213
1204
|
mode="r+",
|
|
1214
|
-
parallel_safe=parallel_safe,
|
|
1215
1205
|
)
|
|
1216
1206
|
|
|
1217
1207
|
|
|
@@ -1223,7 +1213,6 @@ def derive_ome_zarr_plate(
|
|
|
1223
1213
|
keep_acquisitions: bool = False,
|
|
1224
1214
|
cache: bool = False,
|
|
1225
1215
|
overwrite: bool = False,
|
|
1226
|
-
parallel_safe: bool = True,
|
|
1227
1216
|
) -> OmeZarrPlate:
|
|
1228
1217
|
"""Derive a new OME-Zarr plate from an existing one.
|
|
1229
1218
|
|
|
@@ -1235,7 +1224,6 @@ def derive_ome_zarr_plate(
|
|
|
1235
1224
|
keep_acquisitions (bool): Whether to keep the acquisitions in the new plate.
|
|
1236
1225
|
cache (bool): Whether to use a cache for the zarr group metadata.
|
|
1237
1226
|
overwrite (bool): Whether to overwrite the existing plate.
|
|
1238
|
-
parallel_safe (bool): Whether the group handler is parallel safe.
|
|
1239
1227
|
"""
|
|
1240
1228
|
if plate_name is None:
|
|
1241
1229
|
plate_name = ome_zarr_plate.meta.plate.name
|
|
@@ -1255,7 +1243,6 @@ def derive_ome_zarr_plate(
|
|
|
1255
1243
|
store=store,
|
|
1256
1244
|
cache=cache,
|
|
1257
1245
|
mode="r+",
|
|
1258
|
-
parallel_safe=parallel_safe,
|
|
1259
1246
|
)
|
|
1260
1247
|
|
|
1261
1248
|
|
|
@@ -1263,7 +1250,6 @@ def open_ome_zarr_well(
|
|
|
1263
1250
|
store: StoreOrGroup,
|
|
1264
1251
|
cache: bool = False,
|
|
1265
1252
|
mode: AccessModeLiteral = "r+",
|
|
1266
|
-
parallel_safe: bool = True,
|
|
1267
1253
|
) -> OmeZarrWell:
|
|
1268
1254
|
"""Open an OME-Zarr well.
|
|
1269
1255
|
|
|
@@ -1271,10 +1257,11 @@ def open_ome_zarr_well(
|
|
|
1271
1257
|
store (StoreOrGroup): The Zarr store or group that stores the plate.
|
|
1272
1258
|
cache (bool): Whether to use a cache for the zarr group metadata.
|
|
1273
1259
|
mode (AccessModeLiteral): The access mode for the image. Defaults to "r+".
|
|
1274
|
-
parallel_safe (bool): Whether the group handler is parallel safe.
|
|
1275
1260
|
"""
|
|
1276
1261
|
group_handler = ZarrGroupHandler(
|
|
1277
|
-
store=store,
|
|
1262
|
+
store=store,
|
|
1263
|
+
cache=cache,
|
|
1264
|
+
mode=mode,
|
|
1278
1265
|
)
|
|
1279
1266
|
return OmeZarrWell(group_handler)
|
|
1280
1267
|
|
|
@@ -1284,7 +1271,6 @@ def create_empty_well(
|
|
|
1284
1271
|
version: NgffVersions = "0.4",
|
|
1285
1272
|
cache: bool = False,
|
|
1286
1273
|
overwrite: bool = False,
|
|
1287
|
-
parallel_safe: bool = True,
|
|
1288
1274
|
) -> OmeZarrWell:
|
|
1289
1275
|
"""Create an empty OME-Zarr well.
|
|
1290
1276
|
|
|
@@ -1293,10 +1279,9 @@ def create_empty_well(
|
|
|
1293
1279
|
version (NgffVersion): The version of the new well.
|
|
1294
1280
|
cache (bool): Whether to use a cache for the zarr group metadata.
|
|
1295
1281
|
overwrite (bool): Whether to overwrite the existing well.
|
|
1296
|
-
parallel_safe (bool): Whether the group handler is parallel safe.
|
|
1297
1282
|
"""
|
|
1298
1283
|
group_handler = ZarrGroupHandler(
|
|
1299
|
-
store=store, cache=True, mode="w" if overwrite else "w-"
|
|
1284
|
+
store=store, cache=True, mode="w" if overwrite else "w-"
|
|
1300
1285
|
)
|
|
1301
1286
|
meta_handler = get_well_meta_handler(group_handler, version=version)
|
|
1302
1287
|
meta = NgioWellMeta.default_init()
|
|
@@ -1306,5 +1291,4 @@ def create_empty_well(
|
|
|
1306
1291
|
store=store,
|
|
1307
1292
|
cache=cache,
|
|
1308
1293
|
mode="r+",
|
|
1309
|
-
parallel_safe=parallel_safe,
|
|
1310
1294
|
)
|
|
@@ -40,7 +40,7 @@ def _init_generic_meta(
|
|
|
40
40
|
space_unit: SpaceUnits | str | None = DefaultSpaceUnit,
|
|
41
41
|
time_unit: TimeUnits | str | None = DefaultTimeUnit,
|
|
42
42
|
name: str | None = None,
|
|
43
|
-
|
|
43
|
+
ngff_version: NgffVersions = DefaultNgffVersion,
|
|
44
44
|
) -> tuple[_image_or_label_meta, list[float]]:
|
|
45
45
|
"""Initialize the metadata for an image or label."""
|
|
46
46
|
scaling_factors = []
|
|
@@ -75,7 +75,7 @@ def _init_generic_meta(
|
|
|
75
75
|
axes_names=axes_names,
|
|
76
76
|
pixel_size=pixel_sizes,
|
|
77
77
|
scaling_factors=scaling_factors,
|
|
78
|
-
version=
|
|
78
|
+
version=ngff_version,
|
|
79
79
|
)
|
|
80
80
|
return meta, scaling_factors
|
|
81
81
|
|
|
@@ -98,7 +98,7 @@ def create_empty_label_container(
|
|
|
98
98
|
dimension_separator: Literal[".", "/"] = "/",
|
|
99
99
|
compressors: CompressorLike = "auto",
|
|
100
100
|
overwrite: bool = False,
|
|
101
|
-
|
|
101
|
+
ngff_version: NgffVersions = DefaultNgffVersion,
|
|
102
102
|
) -> ZarrGroupHandler:
|
|
103
103
|
"""Create an empty label with the given shape and metadata.
|
|
104
104
|
|
|
@@ -130,7 +130,7 @@ def create_empty_label_container(
|
|
|
130
130
|
dtype (str, optional): The data type of the image. Defaults to "uint16".
|
|
131
131
|
overwrite (bool, optional): Whether to overwrite an existing image.
|
|
132
132
|
Defaults to True.
|
|
133
|
-
|
|
133
|
+
ngff_version (str, optional): The version of the OME-Zarr specification.
|
|
134
134
|
Defaults to DefaultVersion.
|
|
135
135
|
|
|
136
136
|
"""
|
|
@@ -155,14 +155,16 @@ def create_empty_label_container(
|
|
|
155
155
|
time_unit=time_unit,
|
|
156
156
|
axes_names=axes_names,
|
|
157
157
|
name=name,
|
|
158
|
-
|
|
158
|
+
ngff_version=ngff_version,
|
|
159
159
|
)
|
|
160
160
|
|
|
161
161
|
mode = "w" if overwrite else "w-"
|
|
162
162
|
group_handler = ZarrGroupHandler(
|
|
163
163
|
store=store, mode=mode, cache=False, zarr_format=meta.zarr_format
|
|
164
164
|
)
|
|
165
|
-
image_handler = get_label_meta_handler(
|
|
165
|
+
image_handler = get_label_meta_handler(
|
|
166
|
+
version=ngff_version, group_handler=group_handler
|
|
167
|
+
)
|
|
166
168
|
image_handler.write_meta(meta)
|
|
167
169
|
|
|
168
170
|
init_empty_pyramid(
|
|
@@ -199,7 +201,7 @@ def create_empty_image_container(
|
|
|
199
201
|
dimension_separator: Literal[".", "/"] = "/",
|
|
200
202
|
compressors: CompressorLike = "auto",
|
|
201
203
|
overwrite: bool = False,
|
|
202
|
-
|
|
204
|
+
ngff_version: NgffVersions = DefaultNgffVersion,
|
|
203
205
|
) -> ZarrGroupHandler:
|
|
204
206
|
"""Create an empty OME-Zarr image with the given shape and metadata.
|
|
205
207
|
|
|
@@ -231,7 +233,7 @@ def create_empty_image_container(
|
|
|
231
233
|
compressors (CompressorLike): The compressors to use. Defaults to "auto".
|
|
232
234
|
overwrite (bool, optional): Whether to overwrite an existing image.
|
|
233
235
|
Defaults to True.
|
|
234
|
-
|
|
236
|
+
ngff_version (str, optional): The version of the OME-Zarr specification.
|
|
235
237
|
Defaults to DefaultVersion.
|
|
236
238
|
|
|
237
239
|
"""
|
|
@@ -256,13 +258,15 @@ def create_empty_image_container(
|
|
|
256
258
|
time_unit=time_unit,
|
|
257
259
|
axes_names=axes_names,
|
|
258
260
|
name=name,
|
|
259
|
-
|
|
261
|
+
ngff_version=ngff_version,
|
|
260
262
|
)
|
|
261
263
|
mode = "w" if overwrite else "w-"
|
|
262
264
|
group_handler = ZarrGroupHandler(
|
|
263
265
|
store=store, mode=mode, cache=False, zarr_format=meta.zarr_format
|
|
264
266
|
)
|
|
265
|
-
image_handler = get_image_meta_handler(
|
|
267
|
+
image_handler = get_image_meta_handler(
|
|
268
|
+
version=ngff_version, group_handler=group_handler
|
|
269
|
+
)
|
|
266
270
|
image_handler.write_meta(meta)
|
|
267
271
|
|
|
268
272
|
init_empty_pyramid(
|
|
@@ -40,7 +40,7 @@ def create_synthetic_ome_zarr(
|
|
|
40
40
|
dimension_separator: Literal[".", "/"] = "/",
|
|
41
41
|
compressors: CompressorLike = "auto",
|
|
42
42
|
overwrite: bool = False,
|
|
43
|
-
|
|
43
|
+
ngff_version: NgffVersions = DefaultNgffVersion,
|
|
44
44
|
) -> OmeZarrContainer:
|
|
45
45
|
"""Create an empty OME-Zarr image with the given shape and metadata.
|
|
46
46
|
|
|
@@ -72,7 +72,7 @@ def create_synthetic_ome_zarr(
|
|
|
72
72
|
compressors (CompressorLike): The compressors to use. Defaults to "auto".
|
|
73
73
|
overwrite (bool, optional): Whether to overwrite an existing image.
|
|
74
74
|
Defaults to True.
|
|
75
|
-
|
|
75
|
+
ngff_version (NgffVersion, optional): The version of the OME-Zarr specification.
|
|
76
76
|
Defaults to DefaultNgffVersion.
|
|
77
77
|
"""
|
|
78
78
|
if isinstance(reference_sample, str):
|
|
@@ -105,7 +105,7 @@ def create_synthetic_ome_zarr(
|
|
|
105
105
|
overwrite=overwrite,
|
|
106
106
|
dimension_separator=dimension_separator,
|
|
107
107
|
compressors=compressors,
|
|
108
|
-
|
|
108
|
+
ngff_version=ngff_version,
|
|
109
109
|
)
|
|
110
110
|
|
|
111
111
|
image = ome_zarr.get_image()
|
|
@@ -823,7 +823,7 @@ def derive_image_container(
|
|
|
823
823
|
dimension_separator=dimension_separator,
|
|
824
824
|
compressors=compressors,
|
|
825
825
|
overwrite=overwrite,
|
|
826
|
-
|
|
826
|
+
ngff_version=ngff_version,
|
|
827
827
|
)
|
|
828
828
|
image_container = ImagesContainer(handler)
|
|
829
829
|
|
|
@@ -885,7 +885,7 @@ def _parse_str_or_model(
|
|
|
885
885
|
)
|
|
886
886
|
elif channel_selection.mode == "wavelength_id":
|
|
887
887
|
return image.get_channel_idx(
|
|
888
|
-
|
|
888
|
+
wavelength_id=str(channel_selection.identifier)
|
|
889
889
|
)
|
|
890
890
|
elif channel_selection.mode == "index":
|
|
891
891
|
return int(channel_selection.identifier)
|
|
@@ -845,7 +845,7 @@ def create_empty_ome_zarr(
|
|
|
845
845
|
channel_colors: Sequence[str] | None = None,
|
|
846
846
|
channel_active: Sequence[bool] | None = None,
|
|
847
847
|
overwrite: bool = False,
|
|
848
|
-
|
|
848
|
+
ngff_version: NgffVersions = DefaultNgffVersion,
|
|
849
849
|
) -> OmeZarrContainer:
|
|
850
850
|
"""Create an empty OME-Zarr image with the given shape and metadata.
|
|
851
851
|
|
|
@@ -885,7 +885,7 @@ def create_empty_ome_zarr(
|
|
|
885
885
|
active. Defaults to None.
|
|
886
886
|
overwrite (bool, optional): Whether to overwrite an existing image.
|
|
887
887
|
Defaults to True.
|
|
888
|
-
|
|
888
|
+
ngff_version (NgffVersion, optional): The version of the OME-Zarr specification.
|
|
889
889
|
Defaults to DefaultNgffVersion.
|
|
890
890
|
"""
|
|
891
891
|
handler = create_empty_image_container(
|
|
@@ -906,7 +906,7 @@ def create_empty_ome_zarr(
|
|
|
906
906
|
dimension_separator=dimension_separator,
|
|
907
907
|
compressors=compressors,
|
|
908
908
|
overwrite=overwrite,
|
|
909
|
-
|
|
909
|
+
ngff_version=ngff_version,
|
|
910
910
|
)
|
|
911
911
|
|
|
912
912
|
ome_zarr = OmeZarrContainer(group_handler=handler)
|
|
@@ -942,7 +942,7 @@ def create_ome_zarr_from_array(
|
|
|
942
942
|
dimension_separator: Literal[".", "/"] = "/",
|
|
943
943
|
compressors: CompressorLike = "auto",
|
|
944
944
|
overwrite: bool = False,
|
|
945
|
-
|
|
945
|
+
ngff_version: NgffVersions = DefaultNgffVersion,
|
|
946
946
|
) -> OmeZarrContainer:
|
|
947
947
|
"""Create an OME-Zarr image from a numpy array.
|
|
948
948
|
|
|
@@ -983,7 +983,7 @@ def create_ome_zarr_from_array(
|
|
|
983
983
|
compressors (CompressorLike): The compressors to use. Defaults to "auto".
|
|
984
984
|
overwrite (bool, optional): Whether to overwrite an existing image.
|
|
985
985
|
Defaults to True.
|
|
986
|
-
|
|
986
|
+
ngff_version (str, optional): The version of the OME-Zarr specification.
|
|
987
987
|
Defaults to DefaultNgffVersion.
|
|
988
988
|
"""
|
|
989
989
|
handler = create_empty_image_container(
|
|
@@ -1004,7 +1004,7 @@ def create_ome_zarr_from_array(
|
|
|
1004
1004
|
overwrite=overwrite,
|
|
1005
1005
|
dimension_separator=dimension_separator,
|
|
1006
1006
|
compressors=compressors,
|
|
1007
|
-
|
|
1007
|
+
ngff_version=ngff_version,
|
|
1008
1008
|
)
|
|
1009
1009
|
|
|
1010
1010
|
ome_zarr = OmeZarrContainer(group_handler=handler)
|