ngio 0.3.0a1__tar.gz → 0.3.1__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.3.0a1 → ngio-0.3.1}/PKG-INFO +68 -35
- ngio-0.3.1/README.md +74 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/index.md +2 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/backend.md +2 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/mkdocs.yml +1 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_array_pipe.py +50 -27
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_table_ops.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/hcs/__init__.py +1 -1
- ngio-0.3.0a1/src/ngio/hcs/plate.py → ngio-0.3.1/src/ngio/hcs/_plate.py +23 -8
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/images/__init__.py +3 -3
- ngio-0.3.0a1/src/ngio/images/image.py → ngio-0.3.1/src/ngio/images/_image.py +26 -21
- ngio-0.3.0a1/src/ngio/images/label.py → ngio-0.3.1/src/ngio/images/_label.py +6 -4
- ngio-0.3.0a1/src/ngio/images/masked_image.py → ngio-0.3.1/src/ngio/images/_masked_image.py +2 -2
- ngio-0.3.0a1/src/ngio/images/ome_zarr_container.py → ngio-0.3.1/src/ngio/images/_ome_zarr_container.py +55 -20
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_axes.py +4 -7
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_channels.py +41 -29
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/__init__.py +6 -6
- ngio-0.3.0a1/src/ngio/tables/tables_container.py → ngio-0.3.1/src/ngio/tables/_tables_container.py +29 -16
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_table_backends.py +34 -12
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/v1/_condition_table.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/v1/_feature_table.py +2 -2
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/v1/_generic_table.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/v1/_roi_table.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/utils/_fractal_fsspec_store.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/images/test_masked_images.py +4 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/tables/test_backends.py +10 -6
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/tables/test_feature_table.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/tables/test_generic_table.py +7 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/tables/test_masking_roi_table_v1.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/tables/test_roi_table_v1.py +1 -1
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/tables/test_table_group.py +1 -1
- ngio-0.3.0a1/README.md +0 -41
- {ngio-0.3.0a1 → ngio-0.3.1}/.copier-answers.yml +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.gitattributes +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.github/ISSUE_TEMPLATE.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.github/TEST_FAIL_TEMPLATE.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.github/dependabot.yml +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.github/scripts/download_data.sh +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.github/workflows/build_docs.yml +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.github/workflows/ci.yml +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.gitignore +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/.pre-commit-config.yaml +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/CHANGELOG.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/LICENSE +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/_typos.toml +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/api/common.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/api/hcs.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/api/images.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/api/ngio.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/api/tables.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/api/utils.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/changelog.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/code_of_conduct.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/contributing.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/getting_started/0_quickstart.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/getting_started/1_ome_zarr_containers.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/getting_started/2_images.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/getting_started/3_tables.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/getting_started/4_masked_images.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/getting_started/5_hcs.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/overview.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/table_types/condition_table.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/table_types/custom_table.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/table_types/feature_table.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/table_types/generic_table.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/table_types/masking_roi_table.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/table_specs/table_types/roi_table.md +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/tutorials/feature_extraction.ipynb +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/tutorials/hcs_processing.ipynb +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/tutorials/image_processing.ipynb +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/docs/tutorials/image_segmentation.ipynb +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/pyproject.toml +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_axes_transforms.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_common_types.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_dimensions.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_masking_roi.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_pyramid.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_roi.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_slicer.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/common/_zoom.py +0 -0
- /ngio-0.3.0a1/src/ngio/images/abstract_image.py → /ngio-0.3.1/src/ngio/images/_abstract_image.py +0 -0
- /ngio-0.3.0a1/src/ngio/images/create.py → /ngio-0.3.1/src/ngio/images/_create.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/_meta_handlers.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_dataset.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_image.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_pixel_size.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/v04/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/v04/_custom_models.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/ome_zarr_meta/v04/_v04_spec_utils.py +0 -0
- /ngio-0.3.0a1/src/ngio/tables/abstract_table.py → /ngio-0.3.1/src/ngio/tables/_abstract_table.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_abstract_backend.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_anndata.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_anndata_utils.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_csv.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_json.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_non_zarr_backends.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_parquet.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/backends/_utils.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/tables/v1/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/utils/__init__.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/utils/_datasets.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/utils/_errors.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/utils/_logger.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/src/ngio/utils/_zarr_utils.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/conftest.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zattrs +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zgroup +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/0/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/1/.zarray +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_image_meta.json +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_image_meta_wrong_axis_order.json +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_label_meta.json +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_well_meta.json +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/data/v04/meta/ome_zarr_well_path_normalization_meta.json +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/common/test_dimensions.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/common/test_pyramid.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/common/test_roi.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/common/test_table_ops.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/hcs/test_plate.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/hcs/test_well.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/images/test_create.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/images/test_images.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/images/test_omezarr_container.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/ome_zarr_meta/test_image_handler.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/ome_zarr_meta/test_unit_ngio_specs.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/ome_zarr_meta/test_unit_v04_utils.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/tables/test_backends_utils.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/utils/test_download_datasets.py +0 -0
- {ngio-0.3.0a1 → ngio-0.3.1}/tests/unit/utils/test_zarr_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ngio
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Next Generation file format IO
|
|
5
5
|
Project-URL: homepage, https://github.com/fractal-analytics-platform/ngio
|
|
6
6
|
Project-URL: repository, https://github.com/fractal-analytics-platform/ngio
|
|
@@ -63,7 +63,7 @@ Requires-Dist: pytest-cov; extra == 'test'
|
|
|
63
63
|
Requires-Dist: scikit-image; extra == 'test'
|
|
64
64
|
Description-Content-Type: text/markdown
|
|
65
65
|
|
|
66
|
-
#
|
|
66
|
+
# Ngio - Next Generation file format IO
|
|
67
67
|
|
|
68
68
|
[](https://github.com/lorenzocerrone/ngio/raw/main/LICENSE)
|
|
69
69
|
[](https://pypi.org/project/ngio)
|
|
@@ -71,36 +71,69 @@ Description-Content-Type: text/markdown
|
|
|
71
71
|
[](https://github.com/fractal-analytics-platform/ngio/actions/workflows/ci.yml)
|
|
72
72
|
[](https://codecov.io/gh/fractal-analytics-platform/ngio)
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
74
|
+
ngio is a Python library designed to simplify bioimage analysis workflows, offering an intuitive interface for working with OME-Zarr files.
|
|
75
|
+
|
|
76
|
+
## What is Ngio?
|
|
77
|
+
|
|
78
|
+
Ngio is built for the [OME-Zarr](https://ngff.openmicroscopy.org/) file format, a modern, cloud-optimized format for biological imaging data. OME-Zarr stores large, multi-dimensional microscopy images and metadata in an efficient and scalable way.
|
|
79
|
+
|
|
80
|
+
Ngio's mission is to streamline working with OME-Zarr files by providing a simple, object-based API for opening, exploring, and manipulating OME-Zarr images and high-content screening (HCS) plates. It also offers comprehensive support for labels, tables and regions of interest (ROIs), making it easy to extract and analyze specific regions in your data.
|
|
81
|
+
|
|
82
|
+
## Key Features
|
|
83
|
+
|
|
84
|
+
### 📊 Simple Object-Based API
|
|
85
|
+
|
|
86
|
+
- Easily open, explore, and manipulate OME-Zarr images and HCS plates
|
|
87
|
+
- Create and derive new images and labels with minimal boilerplate code
|
|
88
|
+
|
|
89
|
+
### 🔍 Rich Tables and Regions of Interest (ROI) Support
|
|
90
|
+
|
|
91
|
+
- Extract and analyze specific regions of interest
|
|
92
|
+
- Tight integration with [Tabular Data](https://fractal-analytics-platform.github.io/ngio/stable/table_specs/overview/)
|
|
93
|
+
|
|
94
|
+
### 🔄 Scalable Data Processing (Coming Soon)
|
|
95
|
+
|
|
96
|
+
- Powerful iterators for processing data at scale
|
|
97
|
+
- Efficient memory management for large datasets
|
|
98
|
+
|
|
99
|
+
## Installation
|
|
100
|
+
|
|
101
|
+
You can install ngio via pip:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install ngio
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
To get started check out the [Quickstart Guide](https://fractal-analytics-platform.github.io/ngio/stable/getting_started/0_quickstart/).
|
|
108
|
+
|
|
109
|
+
## Supported OME-Zarr versions
|
|
110
|
+
|
|
111
|
+
Currently, ngio only supports OME-Zarr v0.4. Support for version 0.5 and higher is planned for future releases.
|
|
112
|
+
|
|
113
|
+
## Development Status
|
|
114
|
+
|
|
115
|
+
!!! warning
|
|
116
|
+
Ngio is under active development and is not yet stable. The API is subject to change, and bugs and breaking changes are expected.
|
|
117
|
+
We follow [Semantic Versioning](https://semver.org/). Which means for 0.x releases potentially breaking changes can be introduced in minor releases.
|
|
118
|
+
|
|
119
|
+
### Available Features
|
|
120
|
+
|
|
121
|
+
- ✅ OME-Zarr metadata handling and validation
|
|
122
|
+
- ✅ Image and label access across pyramid levels
|
|
123
|
+
- ✅ ROI and table support
|
|
124
|
+
- ✅ Streaming from remote sources
|
|
125
|
+
- ✅ Documentation and examples
|
|
126
|
+
|
|
127
|
+
### Upcoming Features
|
|
128
|
+
|
|
129
|
+
- Advanced image processing iterators
|
|
130
|
+
- Parallel processing capabilities
|
|
131
|
+
- Support for OME-Zarr v0.5 and Zarr v3
|
|
132
|
+
|
|
133
|
+
## Contributors
|
|
134
|
+
|
|
135
|
+
Ngio is developed at the [BioVisionCenter](https://www.biovisioncenter.uzh.ch/en.html), University of Zurich, by [@lorenzocerrone](https://github.com/lorenzocerrone) and [@jluethi](https://github.com/jluethi).
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
Ngio is released under the BSD-3-Clause License. See [LICENSE](https://github.com/fractal-analytics-platform/ngio/blob/main/LICENSE) for details.
|
ngio-0.3.1/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Ngio - Next Generation file format IO
|
|
2
|
+
|
|
3
|
+
[](https://github.com/lorenzocerrone/ngio/raw/main/LICENSE)
|
|
4
|
+
[](https://pypi.org/project/ngio)
|
|
5
|
+
[](https://python.org)
|
|
6
|
+
[](https://github.com/fractal-analytics-platform/ngio/actions/workflows/ci.yml)
|
|
7
|
+
[](https://codecov.io/gh/fractal-analytics-platform/ngio)
|
|
8
|
+
|
|
9
|
+
ngio is a Python library designed to simplify bioimage analysis workflows, offering an intuitive interface for working with OME-Zarr files.
|
|
10
|
+
|
|
11
|
+
## What is Ngio?
|
|
12
|
+
|
|
13
|
+
Ngio is built for the [OME-Zarr](https://ngff.openmicroscopy.org/) file format, a modern, cloud-optimized format for biological imaging data. OME-Zarr stores large, multi-dimensional microscopy images and metadata in an efficient and scalable way.
|
|
14
|
+
|
|
15
|
+
Ngio's mission is to streamline working with OME-Zarr files by providing a simple, object-based API for opening, exploring, and manipulating OME-Zarr images and high-content screening (HCS) plates. It also offers comprehensive support for labels, tables and regions of interest (ROIs), making it easy to extract and analyze specific regions in your data.
|
|
16
|
+
|
|
17
|
+
## Key Features
|
|
18
|
+
|
|
19
|
+
### 📊 Simple Object-Based API
|
|
20
|
+
|
|
21
|
+
- Easily open, explore, and manipulate OME-Zarr images and HCS plates
|
|
22
|
+
- Create and derive new images and labels with minimal boilerplate code
|
|
23
|
+
|
|
24
|
+
### 🔍 Rich Tables and Regions of Interest (ROI) Support
|
|
25
|
+
|
|
26
|
+
- Extract and analyze specific regions of interest
|
|
27
|
+
- Tight integration with [Tabular Data](https://fractal-analytics-platform.github.io/ngio/stable/table_specs/overview/)
|
|
28
|
+
|
|
29
|
+
### 🔄 Scalable Data Processing (Coming Soon)
|
|
30
|
+
|
|
31
|
+
- Powerful iterators for processing data at scale
|
|
32
|
+
- Efficient memory management for large datasets
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
You can install ngio via pip:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install ngio
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
To get started check out the [Quickstart Guide](https://fractal-analytics-platform.github.io/ngio/stable/getting_started/0_quickstart/).
|
|
43
|
+
|
|
44
|
+
## Supported OME-Zarr versions
|
|
45
|
+
|
|
46
|
+
Currently, ngio only supports OME-Zarr v0.4. Support for version 0.5 and higher is planned for future releases.
|
|
47
|
+
|
|
48
|
+
## Development Status
|
|
49
|
+
|
|
50
|
+
!!! warning
|
|
51
|
+
Ngio is under active development and is not yet stable. The API is subject to change, and bugs and breaking changes are expected.
|
|
52
|
+
We follow [Semantic Versioning](https://semver.org/). Which means for 0.x releases potentially breaking changes can be introduced in minor releases.
|
|
53
|
+
|
|
54
|
+
### Available Features
|
|
55
|
+
|
|
56
|
+
- ✅ OME-Zarr metadata handling and validation
|
|
57
|
+
- ✅ Image and label access across pyramid levels
|
|
58
|
+
- ✅ ROI and table support
|
|
59
|
+
- ✅ Streaming from remote sources
|
|
60
|
+
- ✅ Documentation and examples
|
|
61
|
+
|
|
62
|
+
### Upcoming Features
|
|
63
|
+
|
|
64
|
+
- Advanced image processing iterators
|
|
65
|
+
- Parallel processing capabilities
|
|
66
|
+
- Support for OME-Zarr v0.5 and Zarr v3
|
|
67
|
+
|
|
68
|
+
## Contributors
|
|
69
|
+
|
|
70
|
+
Ngio is developed at the [BioVisionCenter](https://www.biovisioncenter.uzh.ch/en.html), University of Zurich, by [@lorenzocerrone](https://github.com/lorenzocerrone) and [@jluethi](https://github.com/jluethi).
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
Ngio is released under the BSD-3-Clause License. See [LICENSE](https://github.com/fractal-analytics-platform/ngio/blob/main/LICENSE) for details.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
ngio is a Python library designed to simplify bioimage analysis workflows, offering an intuitive interface for working with OME-Zarr files.
|
|
3
2
|
|
|
4
3
|
## What is Ngio?
|
|
@@ -30,12 +29,14 @@ Refer to the [Getting Started](getting_started/0_quickstart.md) guide to integra
|
|
|
30
29
|
For more advanced usage and API documentation, see our [API Reference](api/ngio.md).
|
|
31
30
|
|
|
32
31
|
## Supported OME-Zarr versions
|
|
32
|
+
|
|
33
33
|
Currently, ngio only supports OME-Zarr v0.4. Support for version 0.5 and higher is planned for future releases.
|
|
34
34
|
|
|
35
35
|
## Development Status
|
|
36
36
|
|
|
37
37
|
!!! warning
|
|
38
38
|
Ngio is under active development and is not yet stable. The API is subject to change, and bugs and breaking changes are expected.
|
|
39
|
+
We follow [Semantic Versioning](https://semver.org/). Which means for 0.x releases potentially breaking changes can be introduced in minor releases.
|
|
39
40
|
|
|
40
41
|
### Available Features
|
|
41
42
|
|
|
@@ -14,7 +14,8 @@ AnnData is a widely used format in single-cell genomics, and can natively store
|
|
|
14
14
|
The following normalization steps are applied to each table before saving it to the AnnData backend:
|
|
15
15
|
|
|
16
16
|
- We separate the table in two parts: The floating point columns are casted to `float32` and stored as `X` in the AnnData object, while the categorical, boolean, and integer columns are stored as `obs`.
|
|
17
|
-
- The index column is cast to a string, and
|
|
17
|
+
- The index column is cast to a string, and is stored in the `obs` index.
|
|
18
|
+
- The index column name must match the `index_key` specified in the metadata.
|
|
18
19
|
|
|
19
20
|
AnnData backend metadata:
|
|
20
21
|
|
|
@@ -104,6 +104,7 @@ nav:
|
|
|
104
104
|
- "Overview": table_specs/overview.md
|
|
105
105
|
- "Table Backends": table_specs/backend.md
|
|
106
106
|
- "Table Types":
|
|
107
|
+
- "Generic Table": table_specs/table_types/generic_table.md
|
|
107
108
|
- "ROI Table": table_specs/table_types/roi_table.md
|
|
108
109
|
- "Masking ROI Table": table_specs/table_types/masking_roi_table.md
|
|
109
110
|
- "Feature Table": table_specs/table_types/feature_table.md
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from collections.abc import Collection, Iterable
|
|
2
2
|
from typing import Literal
|
|
3
3
|
|
|
4
|
-
import dask
|
|
5
|
-
import dask.delayed
|
|
4
|
+
import dask.array as da
|
|
6
5
|
import numpy as np
|
|
7
6
|
import zarr
|
|
7
|
+
from dask.array import Array as DaskArray
|
|
8
|
+
from dask.delayed import Delayed, delayed
|
|
8
9
|
|
|
9
10
|
from ngio.common._axes_transforms import transform_dask_array, transform_numpy_array
|
|
10
11
|
from ngio.common._common_types import ArrayLike
|
|
@@ -55,26 +56,26 @@ def _numpy_get_pipe(
|
|
|
55
56
|
slices: SliceTransform,
|
|
56
57
|
transformations: tuple[AxesTransformation, ...],
|
|
57
58
|
) -> np.ndarray:
|
|
58
|
-
|
|
59
|
-
return transform_numpy_array(
|
|
59
|
+
_array = numpy_get_slice(array, slices)
|
|
60
|
+
return transform_numpy_array(_array, transformations)
|
|
60
61
|
|
|
61
62
|
|
|
62
63
|
def _delayed_numpy_get_pipe(
|
|
63
64
|
array: zarr.Array,
|
|
64
65
|
slices: SliceTransform,
|
|
65
66
|
transformations: tuple[AxesTransformation, ...],
|
|
66
|
-
) ->
|
|
67
|
-
|
|
68
|
-
return
|
|
67
|
+
) -> Delayed:
|
|
68
|
+
_array = delayed(numpy_get_slice)(array, slices)
|
|
69
|
+
return delayed(transform_numpy_array)(_array, transformations)
|
|
69
70
|
|
|
70
71
|
|
|
71
72
|
def _dask_get_pipe(
|
|
72
73
|
array: zarr.Array,
|
|
73
74
|
slices: SliceTransform,
|
|
74
75
|
transformations: tuple[AxesTransformation, ...],
|
|
75
|
-
) ->
|
|
76
|
-
|
|
77
|
-
return transform_dask_array(
|
|
76
|
+
) -> DaskArray:
|
|
77
|
+
_array = dask_get_slice(array, slices)
|
|
78
|
+
return transform_dask_array(_array, transformations)
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
def _numpy_set_pipe(
|
|
@@ -89,22 +90,22 @@ def _numpy_set_pipe(
|
|
|
89
90
|
|
|
90
91
|
def _dask_set_pipe(
|
|
91
92
|
array: zarr.Array,
|
|
92
|
-
patch:
|
|
93
|
+
patch: DaskArray,
|
|
93
94
|
slices: SliceTransform,
|
|
94
95
|
transformations: tuple[AxesTransformation, ...],
|
|
95
96
|
) -> None:
|
|
96
|
-
|
|
97
|
-
dask_set_slice(array,
|
|
97
|
+
_patch = transform_dask_array(patch, transformations)
|
|
98
|
+
dask_set_slice(array, _patch, slices)
|
|
98
99
|
|
|
99
100
|
|
|
100
101
|
def _delayed_numpy_set_pipe(
|
|
101
102
|
array: zarr.Array,
|
|
102
|
-
patch: np.ndarray,
|
|
103
|
+
patch: np.ndarray | Delayed,
|
|
103
104
|
slices: SliceTransform,
|
|
104
105
|
transformations: tuple[AxesTransformation, ...],
|
|
105
|
-
) ->
|
|
106
|
-
|
|
107
|
-
return
|
|
106
|
+
) -> Delayed:
|
|
107
|
+
_patch = delayed(transform_numpy_array)(patch, transformations)
|
|
108
|
+
return delayed(numpy_set_slice)(array, _patch, slices)
|
|
108
109
|
|
|
109
110
|
|
|
110
111
|
def get_pipe(
|
|
@@ -144,7 +145,7 @@ def set_pipe(
|
|
|
144
145
|
slices, transformations = _compute_to_disk_transforms(
|
|
145
146
|
dimensions=dimensions, axes_order=axes_order, **slice_kwargs
|
|
146
147
|
)
|
|
147
|
-
if isinstance(patch,
|
|
148
|
+
if isinstance(patch, DaskArray):
|
|
148
149
|
_dask_set_pipe(
|
|
149
150
|
array=array, patch=patch, slices=slices, transformations=transformations
|
|
150
151
|
)
|
|
@@ -152,7 +153,7 @@ def set_pipe(
|
|
|
152
153
|
_numpy_set_pipe(
|
|
153
154
|
array=array, patch=patch, slices=slices, transformations=transformations
|
|
154
155
|
)
|
|
155
|
-
elif isinstance(patch,
|
|
156
|
+
elif isinstance(patch, Delayed):
|
|
156
157
|
_delayed_numpy_set_pipe(
|
|
157
158
|
array=array, patch=patch, slices=slices, transformations=transformations
|
|
158
159
|
)
|
|
@@ -193,12 +194,15 @@ def _mask_pipe_common(
|
|
|
193
194
|
**slice_kwargs,
|
|
194
195
|
)
|
|
195
196
|
|
|
196
|
-
if isinstance(array_patch, np.ndarray):
|
|
197
|
+
if isinstance(array_patch, np.ndarray) and isinstance(label_patch, np.ndarray):
|
|
197
198
|
label_patch = np.broadcast_to(label_patch, array_patch.shape)
|
|
198
|
-
elif isinstance(array_patch,
|
|
199
|
-
label_patch =
|
|
199
|
+
elif isinstance(array_patch, DaskArray) and isinstance(label_patch, DaskArray):
|
|
200
|
+
label_patch = da.broadcast_to(label_patch, array_patch.shape)
|
|
200
201
|
else:
|
|
201
|
-
raise NgioValueError(
|
|
202
|
+
raise NgioValueError(
|
|
203
|
+
"Incompatible types for array and label: "
|
|
204
|
+
f"{type(array_patch)} and {type(label_patch)}"
|
|
205
|
+
)
|
|
202
206
|
|
|
203
207
|
mask = label_patch == label
|
|
204
208
|
return array_patch, mask
|
|
@@ -225,7 +229,14 @@ def get_masked_pipe(
|
|
|
225
229
|
mode=mode,
|
|
226
230
|
**slice_kwargs,
|
|
227
231
|
)
|
|
228
|
-
array_patch
|
|
232
|
+
if isinstance(array_patch, np.ndarray):
|
|
233
|
+
array_patch[~mask] = 0
|
|
234
|
+
elif isinstance(array_patch, DaskArray):
|
|
235
|
+
array_patch = da.where(mask, array_patch, 0)
|
|
236
|
+
else:
|
|
237
|
+
raise NgioValueError(
|
|
238
|
+
"Mode not yet supported for masked array. Expected a numpy or dask array."
|
|
239
|
+
)
|
|
229
240
|
return array_patch
|
|
230
241
|
|
|
231
242
|
|
|
@@ -240,7 +251,7 @@ def set_masked_pipe(
|
|
|
240
251
|
axes_order: Collection[str] | None = None,
|
|
241
252
|
**slice_kwargs: slice | int | Iterable[int],
|
|
242
253
|
):
|
|
243
|
-
if isinstance(patch,
|
|
254
|
+
if isinstance(patch, DaskArray):
|
|
244
255
|
mode = "dask"
|
|
245
256
|
elif isinstance(patch, np.ndarray):
|
|
246
257
|
mode = "numpy"
|
|
@@ -259,7 +270,19 @@ def set_masked_pipe(
|
|
|
259
270
|
mode=mode,
|
|
260
271
|
**slice_kwargs,
|
|
261
272
|
)
|
|
262
|
-
|
|
273
|
+
if isinstance(patch, np.ndarray):
|
|
274
|
+
assert isinstance(array_patch, np.ndarray)
|
|
275
|
+
_patch = np.where(mask, patch, array_patch)
|
|
276
|
+
elif isinstance(patch, DaskArray):
|
|
277
|
+
_patch = da.where(mask, patch, array_patch)
|
|
278
|
+
else:
|
|
279
|
+
raise NgioValueError(
|
|
280
|
+
"Mode not yet supported for masked array. Expected a numpy or dask array."
|
|
281
|
+
)
|
|
263
282
|
set_pipe(
|
|
264
|
-
array,
|
|
283
|
+
array,
|
|
284
|
+
_patch,
|
|
285
|
+
dimensions=dimensions_array,
|
|
286
|
+
axes_order=axes_order,
|
|
287
|
+
**slice_kwargs,
|
|
265
288
|
)
|
|
@@ -39,7 +39,6 @@ from ngio.tables import (
|
|
|
39
39
|
)
|
|
40
40
|
from ngio.utils import (
|
|
41
41
|
AccessModeLiteral,
|
|
42
|
-
NgioValidationError,
|
|
43
42
|
NgioValueError,
|
|
44
43
|
StoreOrGroup,
|
|
45
44
|
ZarrGroupHandler,
|
|
@@ -805,22 +804,38 @@ class OmeZarrPlate:
|
|
|
805
804
|
parallel_safe=parallel_safe,
|
|
806
805
|
)
|
|
807
806
|
|
|
808
|
-
|
|
809
|
-
def tables_container(self) -> TablesContainer:
|
|
807
|
+
def _get_tables_container(self) -> TablesContainer | None:
|
|
810
808
|
"""Return the tables container."""
|
|
811
809
|
if self._tables_container is None:
|
|
812
|
-
|
|
813
|
-
if
|
|
814
|
-
|
|
810
|
+
_tables_container = _default_table_container(self._group_handler)
|
|
811
|
+
if _tables_container is None:
|
|
812
|
+
return None
|
|
813
|
+
self._tables_container = _tables_container
|
|
815
814
|
return self._tables_container
|
|
816
815
|
|
|
817
|
-
|
|
816
|
+
@property
|
|
817
|
+
def tables_container(self) -> TablesContainer:
|
|
818
|
+
"""Return the tables container."""
|
|
819
|
+
_table_container = self._get_tables_container()
|
|
820
|
+
if _table_container is None:
|
|
821
|
+
raise NgioValueError(
|
|
822
|
+
"No tables container found. Please add a tables container to the plate."
|
|
823
|
+
)
|
|
824
|
+
return _table_container
|
|
825
|
+
|
|
826
|
+
def list_tables(self, filter_types: TypedTable | str | None = None) -> list[str]:
|
|
818
827
|
"""List all tables in the image."""
|
|
819
828
|
return self.tables_container.list(filter_types=filter_types)
|
|
820
829
|
|
|
821
830
|
def list_roi_tables(self) -> list[str]:
|
|
822
831
|
"""List all ROI tables in the image."""
|
|
823
|
-
|
|
832
|
+
masking_roi = self.tables_container.list(
|
|
833
|
+
filter_types="masking_roi_table",
|
|
834
|
+
)
|
|
835
|
+
roi = self.tables_container.list(
|
|
836
|
+
filter_types="roi_table",
|
|
837
|
+
)
|
|
838
|
+
return masking_roi + roi
|
|
824
839
|
|
|
825
840
|
def get_roi_table(self, name: str) -> RoiTable:
|
|
826
841
|
"""Get a ROI table from the image.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""OME-Zarr object models."""
|
|
2
2
|
|
|
3
|
-
from ngio.images.
|
|
4
|
-
from ngio.images.
|
|
5
|
-
from ngio.images.
|
|
3
|
+
from ngio.images._image import Image, ImagesContainer
|
|
4
|
+
from ngio.images._label import Label, LabelsContainer
|
|
5
|
+
from ngio.images._ome_zarr_container import (
|
|
6
6
|
OmeZarrContainer,
|
|
7
7
|
create_empty_ome_zarr,
|
|
8
8
|
create_ome_zarr_from_array,
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
from collections.abc import Collection
|
|
4
4
|
from typing import Literal
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import dask.array as da
|
|
7
7
|
|
|
8
8
|
from ngio.common import Dimensions
|
|
9
|
-
from ngio.images.
|
|
10
|
-
from ngio.images.
|
|
9
|
+
from ngio.images._abstract_image import AbstractImage, consolidate_image
|
|
10
|
+
from ngio.images._create import create_empty_image_container
|
|
11
11
|
from ngio.ome_zarr_meta import (
|
|
12
12
|
ImageMetaHandler,
|
|
13
13
|
NgioImageMeta,
|
|
@@ -152,31 +152,33 @@ class ImagesContainer:
|
|
|
152
152
|
|
|
153
153
|
def set_channel_meta(
|
|
154
154
|
self,
|
|
155
|
-
labels: Collection[str] | int | None = None,
|
|
156
|
-
wavelength_id: Collection[str] | None = None,
|
|
157
|
-
start: Collection[float] | None = None,
|
|
158
|
-
end: Collection[float] | None = None,
|
|
155
|
+
labels: Collection[str | None] | int | None = None,
|
|
156
|
+
wavelength_id: Collection[str | None] | None = None,
|
|
157
|
+
start: Collection[float | None] | None = None,
|
|
158
|
+
end: Collection[float | None] | None = None,
|
|
159
159
|
percentiles: tuple[float, float] | None = None,
|
|
160
|
-
colors: Collection[str] | None = None,
|
|
161
|
-
active: Collection[bool] | None = None,
|
|
160
|
+
colors: Collection[str | None] | None = None,
|
|
161
|
+
active: Collection[bool | None] | None = None,
|
|
162
162
|
**omero_kwargs: dict,
|
|
163
163
|
) -> None:
|
|
164
164
|
"""Create a ChannelsMeta object with the default unit.
|
|
165
165
|
|
|
166
166
|
Args:
|
|
167
|
-
labels(Collection[str] | int): The list of channels names
|
|
168
|
-
If an integer is provided, the channels will
|
|
169
|
-
|
|
167
|
+
labels(Collection[str | None] | int): The list of channels names
|
|
168
|
+
in the image. If an integer is provided, the channels will
|
|
169
|
+
be named "channel_i".
|
|
170
|
+
wavelength_id(Collection[str | None]): The wavelength ID of the channel.
|
|
170
171
|
If None, the wavelength ID will be the same as the channel name.
|
|
171
|
-
start(Collection[float
|
|
172
|
+
start(Collection[float | None]): The start value for each channel.
|
|
172
173
|
If None, the start value will be computed from the image.
|
|
173
|
-
end(Collection[float
|
|
174
|
+
end(Collection[float | None]): The end value for each channel.
|
|
174
175
|
If None, the end value will be computed from the image.
|
|
175
|
-
percentiles(tuple[float, float] | None): The start and end
|
|
176
|
-
for each channel. If None, the percentiles will
|
|
177
|
-
|
|
176
|
+
percentiles(tuple[float, float] | None): The start and end
|
|
177
|
+
percentiles for each channel. If None, the percentiles will
|
|
178
|
+
not be computed.
|
|
179
|
+
colors(Collection[str | None]): The list of colors for the
|
|
178
180
|
channels. If None, the colors will be random.
|
|
179
|
-
active (Collection[bool
|
|
181
|
+
active (Collection[bool | None]): Whether the channel should
|
|
180
182
|
be shown by default.
|
|
181
183
|
omero_kwargs(dict): Extra fields to store in the omero attributes.
|
|
182
184
|
"""
|
|
@@ -376,9 +378,12 @@ def compute_image_percentile(
|
|
|
376
378
|
starts, ends = [], []
|
|
377
379
|
for c in range(image.num_channels):
|
|
378
380
|
if image.num_channels == 1:
|
|
379
|
-
data = image.get_array(mode="dask")
|
|
381
|
+
data = image.get_array(mode="dask")
|
|
380
382
|
else:
|
|
381
|
-
data = image.get_array(c=c, mode="dask")
|
|
383
|
+
data = image.get_array(c=c, mode="dask")
|
|
384
|
+
|
|
385
|
+
assert isinstance(data, da.Array), "Data must be a Dask array."
|
|
386
|
+
data = da.ravel(data)
|
|
382
387
|
# remove all the zeros
|
|
383
388
|
mask = data > 1e-16
|
|
384
389
|
data = data[mask]
|
|
@@ -391,7 +396,7 @@ def compute_image_percentile(
|
|
|
391
396
|
# compute the percentiles
|
|
392
397
|
_s_perc, _e_perc = da.percentile(
|
|
393
398
|
data, [start_percentile, end_percentile], method="nearest"
|
|
394
|
-
).compute()
|
|
399
|
+
).compute() # type: ignore
|
|
395
400
|
|
|
396
401
|
starts.append(float(_s_perc))
|
|
397
402
|
ends.append(float(_e_perc))
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
from collections.abc import Collection
|
|
4
4
|
from typing import Literal
|
|
5
5
|
|
|
6
|
+
import dask.array as da
|
|
7
|
+
|
|
6
8
|
from ngio.common import compute_masking_roi
|
|
7
|
-
from ngio.images.
|
|
8
|
-
from ngio.images.
|
|
9
|
-
from ngio.images.
|
|
9
|
+
from ngio.images._abstract_image import AbstractImage, consolidate_image
|
|
10
|
+
from ngio.images._create import create_empty_label_container
|
|
11
|
+
from ngio.images._image import Image
|
|
10
12
|
from ngio.ome_zarr_meta import (
|
|
11
13
|
LabelMetaHandler,
|
|
12
14
|
NgioLabelMeta,
|
|
@@ -309,6 +311,6 @@ def build_masking_roi_table(label: Label) -> MaskingRoiTable:
|
|
|
309
311
|
raise NgioValueError("Time series labels are not supported.")
|
|
310
312
|
|
|
311
313
|
array = label.get_array(axes_order=["z", "y", "x"], mode="dask")
|
|
312
|
-
|
|
314
|
+
assert isinstance(array, da.Array), "Array must be a Dask array."
|
|
313
315
|
rois = compute_masking_roi(array, label.pixel_size)
|
|
314
316
|
return MaskingRoiTable(rois, reference_label=label.meta.name)
|
|
@@ -4,8 +4,8 @@ from collections.abc import Collection, Iterable
|
|
|
4
4
|
from typing import Literal
|
|
5
5
|
|
|
6
6
|
from ngio.common import ArrayLike, get_masked_pipe, roi_to_slice_kwargs, set_masked_pipe
|
|
7
|
-
from ngio.images.
|
|
8
|
-
from ngio.images.
|
|
7
|
+
from ngio.images._image import Image
|
|
8
|
+
from ngio.images._label import Label
|
|
9
9
|
from ngio.ome_zarr_meta import ImageMetaHandler, LabelMetaHandler
|
|
10
10
|
from ngio.tables import MaskingRoiTable
|
|
11
11
|
from ngio.utils import (
|