ngio 0.3.0a0__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.
Files changed (222) hide show
  1. ngio-0.3.1/CHANGELOG.md +7 -0
  2. {ngio-0.3.0a0 → ngio-0.3.1}/PKG-INFO +69 -35
  3. ngio-0.3.1/README.md +74 -0
  4. ngio-0.3.1/docs/changelog.md +5 -0
  5. {ngio-0.3.0a0 → ngio-0.3.1}/docs/code_of_conduct.md +2 -0
  6. {ngio-0.3.0a0 → ngio-0.3.1}/docs/getting_started/1_ome_zarr_containers.md +1 -1
  7. {ngio-0.3.0a0 → ngio-0.3.1}/docs/getting_started/3_tables.md +3 -3
  8. {ngio-0.3.0a0 → ngio-0.3.1}/docs/index.md +2 -1
  9. ngio-0.3.1/docs/table_specs/backend.md +113 -0
  10. ngio-0.3.1/docs/table_specs/overview.md +92 -0
  11. ngio-0.3.1/docs/table_specs/table_types/condition_table.md +28 -0
  12. ngio-0.3.1/docs/table_specs/table_types/custom_table.md +6 -0
  13. ngio-0.3.1/docs/table_specs/table_types/feature_table.md +54 -0
  14. ngio-0.3.1/docs/table_specs/table_types/generic_table.md +23 -0
  15. ngio-0.3.1/docs/table_specs/table_types/masking_roi_table.md +35 -0
  16. ngio-0.3.1/docs/table_specs/table_types/roi_table.md +39 -0
  17. {ngio-0.3.0a0 → ngio-0.3.1}/mkdocs.yml +14 -0
  18. {ngio-0.3.0a0 → ngio-0.3.1}/pyproject.toml +1 -0
  19. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_array_pipe.py +50 -27
  20. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_table_ops.py +1 -1
  21. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/hcs/__init__.py +1 -1
  22. ngio-0.3.0a0/src/ngio/hcs/plate.py → ngio-0.3.1/src/ngio/hcs/_plate.py +27 -12
  23. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/images/__init__.py +3 -3
  24. ngio-0.3.0a0/src/ngio/images/image.py → ngio-0.3.1/src/ngio/images/_image.py +26 -21
  25. ngio-0.3.0a0/src/ngio/images/label.py → ngio-0.3.1/src/ngio/images/_label.py +6 -4
  26. ngio-0.3.0a0/src/ngio/images/masked_image.py → ngio-0.3.1/src/ngio/images/_masked_image.py +2 -2
  27. ngio-0.3.0a0/src/ngio/images/ome_zarr_container.py → ngio-0.3.1/src/ngio/images/_ome_zarr_container.py +59 -24
  28. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/_meta_handlers.py +16 -8
  29. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_axes.py +4 -7
  30. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_channels.py +41 -29
  31. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/__init__.py +7 -2
  32. ngio-0.3.0a0/src/ngio/tables/abstract_table.py → ngio-0.3.1/src/ngio/tables/_abstract_table.py +5 -4
  33. ngio-0.3.0a0/src/ngio/tables/tables_container.py → ngio-0.3.1/src/ngio/tables/_tables_container.py +42 -29
  34. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/backends/__init__.py +6 -4
  35. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/backends/_abstract_backend.py +1 -1
  36. ngio-0.3.0a0/src/ngio/tables/backends/_anndata_v1.py → ngio-0.3.1/src/ngio/tables/backends/_anndata.py +1 -1
  37. ngio-0.3.0a0/src/ngio/tables/backends/_csv_v1.py → ngio-0.3.1/src/ngio/tables/backends/_csv.py +2 -2
  38. ngio-0.3.0a0/src/ngio/tables/backends/_json_v1.py → ngio-0.3.1/src/ngio/tables/backends/_json.py +1 -1
  39. ngio-0.3.0a0/src/ngio/tables/backends/_parquet_v1.py → ngio-0.3.1/src/ngio/tables/backends/_parquet.py +2 -2
  40. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/backends/_table_backends.py +41 -17
  41. ngio-0.3.1/src/ngio/tables/v1/__init__.py +23 -0
  42. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/v1/_condition_table.py +8 -4
  43. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/v1/_feature_table.py +11 -13
  44. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/v1/_generic_table.py +14 -3
  45. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/v1/_roi_table.py +11 -7
  46. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/utils/_fractal_fsspec_store.py +1 -1
  47. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/common/test_table_ops.py +1 -1
  48. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/hcs/test_plate.py +1 -1
  49. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/images/test_masked_images.py +4 -1
  50. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/tables/test_backends.py +23 -21
  51. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/tables/test_feature_table.py +4 -4
  52. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/tables/test_generic_table.py +9 -3
  53. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/tables/test_masking_roi_table_v1.py +4 -4
  54. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/tables/test_roi_table_v1.py +8 -6
  55. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/tables/test_table_group.py +1 -1
  56. ngio-0.3.0a0/README.md +0 -41
  57. ngio-0.3.0a0/src/ngio/tables/v1/__init__.py +0 -14
  58. {ngio-0.3.0a0 → ngio-0.3.1}/.copier-answers.yml +0 -0
  59. {ngio-0.3.0a0 → ngio-0.3.1}/.gitattributes +0 -0
  60. {ngio-0.3.0a0 → ngio-0.3.1}/.github/ISSUE_TEMPLATE.md +0 -0
  61. {ngio-0.3.0a0 → ngio-0.3.1}/.github/TEST_FAIL_TEMPLATE.md +0 -0
  62. {ngio-0.3.0a0 → ngio-0.3.1}/.github/dependabot.yml +0 -0
  63. {ngio-0.3.0a0 → ngio-0.3.1}/.github/scripts/download_data.sh +0 -0
  64. {ngio-0.3.0a0 → ngio-0.3.1}/.github/workflows/build_docs.yml +0 -0
  65. {ngio-0.3.0a0 → ngio-0.3.1}/.github/workflows/ci.yml +0 -0
  66. {ngio-0.3.0a0 → ngio-0.3.1}/.gitignore +0 -0
  67. {ngio-0.3.0a0 → ngio-0.3.1}/.pre-commit-config.yaml +0 -0
  68. {ngio-0.3.0a0 → ngio-0.3.1}/LICENSE +0 -0
  69. {ngio-0.3.0a0 → ngio-0.3.1}/_typos.toml +0 -0
  70. {ngio-0.3.0a0 → ngio-0.3.1}/docs/api/common.md +0 -0
  71. {ngio-0.3.0a0 → ngio-0.3.1}/docs/api/hcs.md +0 -0
  72. {ngio-0.3.0a0 → ngio-0.3.1}/docs/api/images.md +0 -0
  73. {ngio-0.3.0a0 → ngio-0.3.1}/docs/api/ngio.md +0 -0
  74. {ngio-0.3.0a0 → ngio-0.3.1}/docs/api/tables.md +0 -0
  75. {ngio-0.3.0a0 → ngio-0.3.1}/docs/api/utils.md +0 -0
  76. {ngio-0.3.0a0 → ngio-0.3.1}/docs/contributing.md +0 -0
  77. {ngio-0.3.0a0 → ngio-0.3.1}/docs/getting_started/0_quickstart.md +0 -0
  78. {ngio-0.3.0a0 → ngio-0.3.1}/docs/getting_started/2_images.md +0 -0
  79. {ngio-0.3.0a0 → ngio-0.3.1}/docs/getting_started/4_masked_images.md +0 -0
  80. {ngio-0.3.0a0 → ngio-0.3.1}/docs/getting_started/5_hcs.md +0 -0
  81. {ngio-0.3.0a0 → ngio-0.3.1}/docs/tutorials/feature_extraction.ipynb +0 -0
  82. {ngio-0.3.0a0 → ngio-0.3.1}/docs/tutorials/hcs_processing.ipynb +0 -0
  83. {ngio-0.3.0a0 → ngio-0.3.1}/docs/tutorials/image_processing.ipynb +0 -0
  84. {ngio-0.3.0a0 → ngio-0.3.1}/docs/tutorials/image_segmentation.ipynb +0 -0
  85. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/__init__.py +0 -0
  86. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/__init__.py +0 -0
  87. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_axes_transforms.py +0 -0
  88. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_common_types.py +0 -0
  89. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_dimensions.py +0 -0
  90. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_masking_roi.py +0 -0
  91. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_pyramid.py +0 -0
  92. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_roi.py +0 -0
  93. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_slicer.py +0 -0
  94. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/common/_zoom.py +0 -0
  95. /ngio-0.3.0a0/src/ngio/images/abstract_image.py → /ngio-0.3.1/src/ngio/images/_abstract_image.py +0 -0
  96. /ngio-0.3.0a0/src/ngio/images/create.py → /ngio-0.3.1/src/ngio/images/_create.py +0 -0
  97. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/__init__.py +0 -0
  98. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/__init__.py +0 -0
  99. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_dataset.py +0 -0
  100. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py +0 -0
  101. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_image.py +0 -0
  102. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/ngio_specs/_pixel_size.py +0 -0
  103. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/v04/__init__.py +0 -0
  104. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/v04/_custom_models.py +0 -0
  105. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/ome_zarr_meta/v04/_v04_spec_utils.py +0 -0
  106. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/backends/_anndata_utils.py +0 -0
  107. /ngio-0.3.0a0/src/ngio/tables/backends/_non_zarr_backends_v1.py → /ngio-0.3.1/src/ngio/tables/backends/_non_zarr_backends.py +0 -0
  108. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/tables/backends/_utils.py +0 -0
  109. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/utils/__init__.py +0 -0
  110. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/utils/_datasets.py +0 -0
  111. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/utils/_errors.py +0 -0
  112. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/utils/_logger.py +0 -0
  113. {ngio-0.3.0a0 → ngio-0.3.1}/src/ngio/utils/_zarr_utils.py +0 -0
  114. {ngio-0.3.0a0 → ngio-0.3.1}/tests/conftest.py +0 -0
  115. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/.zattrs +0 -0
  116. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/.zgroup +0 -0
  117. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/0/.zarray +0 -0
  118. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/1/.zarray +0 -0
  119. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zattrs +0 -0
  120. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zgroup +0 -0
  121. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zattrs +0 -0
  122. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zgroup +0 -0
  123. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/0/.zarray +0 -0
  124. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/1/.zarray +0 -0
  125. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/.zattrs +0 -0
  126. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/.zgroup +0 -0
  127. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/0/.zarray +0 -0
  128. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/1/.zarray +0 -0
  129. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zattrs +0 -0
  130. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zgroup +0 -0
  131. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zattrs +0 -0
  132. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zgroup +0 -0
  133. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/0/.zarray +0 -0
  134. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/1/.zarray +0 -0
  135. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/.zattrs +0 -0
  136. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/.zgroup +0 -0
  137. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/0/.zarray +0 -0
  138. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/1/.zarray +0 -0
  139. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zattrs +0 -0
  140. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zgroup +0 -0
  141. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zattrs +0 -0
  142. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zgroup +0 -0
  143. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/0/.zarray +0 -0
  144. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/1/.zarray +0 -0
  145. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/.zattrs +0 -0
  146. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/.zgroup +0 -0
  147. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/0/.zarray +0 -0
  148. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/1/.zarray +0 -0
  149. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zattrs +0 -0
  150. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zgroup +0 -0
  151. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zattrs +0 -0
  152. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zgroup +0 -0
  153. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/0/.zarray +0 -0
  154. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/1/.zarray +0 -0
  155. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/.zattrs +0 -0
  156. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/.zgroup +0 -0
  157. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/0/.zarray +0 -0
  158. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/1/.zarray +0 -0
  159. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zattrs +0 -0
  160. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zgroup +0 -0
  161. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zattrs +0 -0
  162. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zgroup +0 -0
  163. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/0/.zarray +0 -0
  164. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/1/.zarray +0 -0
  165. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/.zattrs +0 -0
  166. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/.zgroup +0 -0
  167. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/0/.zarray +0 -0
  168. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/1/.zarray +0 -0
  169. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zattrs +0 -0
  170. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zgroup +0 -0
  171. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zattrs +0 -0
  172. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zgroup +0 -0
  173. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/0/.zarray +0 -0
  174. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/1/.zarray +0 -0
  175. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/.zattrs +0 -0
  176. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/.zgroup +0 -0
  177. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/0/.zarray +0 -0
  178. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/1/.zarray +0 -0
  179. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zattrs +0 -0
  180. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zgroup +0 -0
  181. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zattrs +0 -0
  182. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zgroup +0 -0
  183. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/0/.zarray +0 -0
  184. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/1/.zarray +0 -0
  185. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/.zattrs +0 -0
  186. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/.zgroup +0 -0
  187. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/0/.zarray +0 -0
  188. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/1/.zarray +0 -0
  189. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/.zattrs +0 -0
  190. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/.zgroup +0 -0
  191. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zattrs +0 -0
  192. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zgroup +0 -0
  193. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/0/.zarray +0 -0
  194. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_yx.zarr/labels/label/1/.zarray +0 -0
  195. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/.zattrs +0 -0
  196. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/.zgroup +0 -0
  197. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/0/.zarray +0 -0
  198. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/1/.zarray +0 -0
  199. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zattrs +0 -0
  200. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zgroup +0 -0
  201. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zattrs +0 -0
  202. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zgroup +0 -0
  203. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/0/.zarray +0 -0
  204. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/1/.zarray +0 -0
  205. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_image_meta.json +0 -0
  206. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_image_meta_wrong_axis_order.json +0 -0
  207. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_label_meta.json +0 -0
  208. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/meta/base_ome_zarr_well_meta.json +0 -0
  209. {ngio-0.3.0a0 → ngio-0.3.1}/tests/data/v04/meta/ome_zarr_well_path_normalization_meta.json +0 -0
  210. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/common/test_dimensions.py +0 -0
  211. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/common/test_pyramid.py +0 -0
  212. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/common/test_roi.py +0 -0
  213. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/hcs/test_well.py +0 -0
  214. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/images/test_create.py +0 -0
  215. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/images/test_images.py +0 -0
  216. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/images/test_omezarr_container.py +0 -0
  217. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/ome_zarr_meta/test_image_handler.py +0 -0
  218. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/ome_zarr_meta/test_unit_ngio_specs.py +0 -0
  219. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/ome_zarr_meta/test_unit_v04_utils.py +0 -0
  220. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/tables/test_backends_utils.py +0 -0
  221. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/utils/test_download_datasets.py +0 -0
  222. {ngio-0.3.0a0 → ngio-0.3.1}/tests/unit/utils/test_zarr_utils.py +0 -0
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ### Added
6
+
7
+ - Initial version of the changelog.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngio
3
- Version: 0.3.0a0
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
@@ -50,6 +50,7 @@ Requires-Dist: mkdocs; extra == 'docs'
50
50
  Requires-Dist: mkdocs-autorefs; extra == 'docs'
51
51
  Requires-Dist: mkdocs-git-committers-plugin-2; extra == 'docs'
52
52
  Requires-Dist: mkdocs-git-revision-date-localized-plugin; extra == 'docs'
53
+ Requires-Dist: mkdocs-include-markdown-plugin; extra == 'docs'
53
54
  Requires-Dist: mkdocs-jupyter; extra == 'docs'
54
55
  Requires-Dist: mkdocs-material; extra == 'docs'
55
56
  Requires-Dist: mkdocstrings[python]; extra == 'docs'
@@ -62,7 +63,7 @@ Requires-Dist: pytest-cov; extra == 'test'
62
63
  Requires-Dist: scikit-image; extra == 'test'
63
64
  Description-Content-Type: text/markdown
64
65
 
65
- # NGIO - Next Generation file format IO
66
+ # Ngio - Next Generation file format IO
66
67
 
67
68
  [![License](https://img.shields.io/pypi/l/ngio.svg?color=green)](https://github.com/lorenzocerrone/ngio/raw/main/LICENSE)
68
69
  [![PyPI](https://img.shields.io/pypi/v/ngio.svg?color=green)](https://pypi.org/project/ngio)
@@ -70,36 +71,69 @@ Description-Content-Type: text/markdown
70
71
  [![CI](https://github.com/fractal-analytics-platform/ngio/actions/workflows/ci.yml/badge.svg)](https://github.com/fractal-analytics-platform/ngio/actions/workflows/ci.yml)
71
72
  [![codecov](https://codecov.io/gh/fractal-analytics-platform/ngio/graph/badge.svg?token=FkmF26FZki)](https://codecov.io/gh/fractal-analytics-platform/ngio)
72
73
 
73
- NGIO is a Python library to streamline OME-Zarr image analysis workflows.
74
-
75
- **Main Goals:**
76
-
77
- - Abstract object base API for handling OME-Zarr files
78
- - Powerful iterators for processing data using common access patterns
79
- - Tight integration with [Fractal's Table Fractal](https://fractal-analytics-platform.github.io/fractal-tasks-core/tables/)
80
- - Validation of OME-Zarr files
81
-
82
- To get started, check out the [Getting Started](https://fractal-analytics-platform.github.io/ngio/getting-started/) guide. Or checkout our [Documentation](https://fractal-analytics-platform.github.io/ngio/)
83
-
84
- ## 🚧 Ngio is Under active Development 🚧
85
-
86
- ### Roadmap
87
-
88
- | Feature | Status | ETA | Description |
89
- |---------|--------|-----|-------------|
90
- | Metadata Handling | | | Read, Write, Validate OME-Zarr Metadata (0.4 supported, 0.5 ready) |
91
- | OME-Zarr Validation | ✅ | | Validate OME-Zarr files for compliance with the OME-Zarr Specification + Compliance between Metadata and Data |
92
- | Base Image Handling | ✅ | | Load data from OME-Zarr files, retrieve basic metadata, and write data |
93
- | ROI Handling | | | Common ROI models |
94
- | Label Handling | ✅ | Mid-September | Based on Image Handling |
95
- | Table Validation | ✅ | Mid-September | Validate Table fractal V1 + Compliance between Metadata and Data |
96
- | Table Handling | ✅ | Mid-September | Read, Write ROI, Features, and Masked Tables |
97
- | Basic Iterators | Ongoing | End-September | Read and Write Iterators for common access patterns |
98
- | Base Documentation | ✅ | End-September | API Documentation and Examples |
99
- | Beta Ready Testing | ✅ | End-September | Beta Testing; Library is ready for testing, but the API is not stable |
100
- | Streaming from Fractal | Ongoing | December | Ngio can stream OME-Zarr from fractal |
101
- | Mask Iterators | Ongoing | Early 2025 | Iterators over Masked Tables |
102
- | Advanced Iterators | Not started | mid-2025 | Iterators for advanced access patterns |
103
- | Parallel Iterators | Not started | mid-2025 | Concurrent Iterators for parallel read and write |
104
- | Full Documentation | Not started | 2025 | Complete Documentation |
105
- | Release 1.0 (Commitment to API) | Not started | 2025 | API is stable; breaking changes will be avoided |
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
+ [![License](https://img.shields.io/pypi/l/ngio.svg?color=green)](https://github.com/lorenzocerrone/ngio/raw/main/LICENSE)
4
+ [![PyPI](https://img.shields.io/pypi/v/ngio.svg?color=green)](https://pypi.org/project/ngio)
5
+ [![Python Version](https://img.shields.io/pypi/pyversions/ngio.svg?color=green)](https://python.org)
6
+ [![CI](https://github.com/fractal-analytics-platform/ngio/actions/workflows/ci.yml/badge.svg)](https://github.com/fractal-analytics-platform/ngio/actions/workflows/ci.yml)
7
+ [![codecov](https://codecov.io/gh/fractal-analytics-platform/ngio/graph/badge.svg?token=FkmF26FZki)](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.
@@ -0,0 +1,5 @@
1
+ {%
2
+ include-markdown "../CHANGELOG.md"
3
+ start="<!--intro-start-->"
4
+ end="<!--intro-end-->"
5
+ %}
@@ -1,2 +1,4 @@
1
+ # Code of Conduct
2
+
1
3
  !!! warning
2
4
  The library is still in the early stages of development, the code of conduct is not yet established.
@@ -89,7 +89,7 @@ Examples of the OME-Zarr metadata access:
89
89
 
90
90
  To access images, labels, and tables, you can use the `get_image`, `get_label`, and `get_table` methods of the `OME-Zarr Container` object.
91
91
 
92
- A variety of examples and additional information can be found in the [Images and Labels](./2_images.md), and [Tables](../3_tables.md) sections.
92
+ A variety of examples and additional information can be found in the [Images and Labels](./2_images.md), and [Tables](./3_tables.md) sections.
93
93
 
94
94
  ## Creating derived images
95
95
 
@@ -190,7 +190,7 @@ Tables (differently from Images and Labels) can be purely in memory objects, and
190
190
  >>> from ngio.tables import FeatureTable
191
191
  >>> import pandas as pd
192
192
  >>> example_data = pd.DataFrame({"label": [1, 2, 3], "area": [100, 200, 300]})
193
- >>> feature_table = FeatureTable(dataframe=example_data)
193
+ >>> feature_table = FeatureTable(table_data=example_data)
194
194
  >>> feature_table
195
195
  >>> print(feature_table) # markdown-exec: hide
196
196
  ```
@@ -203,7 +203,7 @@ Tables (differently from Images and Labels) can be purely in memory objects, and
203
203
  >>> from ngio.tables import GenericTable
204
204
  >>> import pandas as pd
205
205
  >>> example_data = pd.DataFrame({"area": [100, 200, 300], "perimeter": [50, 60, 70]})
206
- >>> generic_table = GenericTable(dataframe=example_data)
206
+ >>> generic_table = GenericTable(table_data=example_data)
207
207
  >>> generic_table
208
208
  >>> print(generic_table) # markdown-exec: hide
209
209
  ```
@@ -212,7 +212,7 @@ Tables (differently from Images and Labels) can be purely in memory objects, and
212
212
  >>> from ngio.tables import GenericTable
213
213
  >>> import anndata as ad
214
214
  >>> adata = ad.AnnData(X=np.random.rand(10, 5), obs=pd.DataFrame({"cell_type": ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]}))
215
- >>> generic_table = GenericTable(anndata=adata)
215
+ >>> generic_table = GenericTable(table_data=adata)
216
216
  >>> generic_table
217
217
  >>> print(generic_table) # markdown-exec: hide
218
218
  ```
@@ -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
 
@@ -0,0 +1,113 @@
1
+ # Table Backends
2
+
3
+ In ngio we implemented four different table backends. Each table backend is a python class that can serialize tabular data into OME-Zarr containers.
4
+
5
+ These backends are wrappers around existing tooling implemented in `anndata`, `pandas`, and `polars`.
6
+ Currently, we provide a thin layer of metadata and table normalization to ensure that tables are serialized/deserialized in a consistent way across the different backends and across different table objects.
7
+
8
+ In particular, we provide the metadata that describes the intended index key and type of the table for each backend.
9
+
10
+ ## AnnData Backend
11
+
12
+ AnnData is a widely used format in single-cell genomics, and can natively store complex tabular data in a Zarr group. The AnnData backend in ngio is a wrapper around the `anndata` library, which performs some table normalization for consistency and compatibility with the ngio table specifications.
13
+
14
+ The following normalization steps are applied to each table before saving it to the AnnData backend:
15
+
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 is stored in the `obs` index.
18
+ - The index column name must match the `index_key` specified in the metadata.
19
+
20
+ AnnData backend metadata:
21
+
22
+ ```json
23
+ {
24
+ // Backend metadata
25
+ "backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
26
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
27
+ "index_type": "str", // Either "int" or "str"
28
+ }
29
+ ```
30
+
31
+ Additionally, the AnnData package will write some additional metadata to the group attributes
32
+
33
+ ```json
34
+ {
35
+ "encoding-type": "anndata",
36
+ "encoding-version": "0.1.0",
37
+ }
38
+ ```
39
+
40
+ ## Parquet Backend
41
+
42
+ The Parquet backend is a high-performance columnar storage format that is widely used in big data processing. It is designed to efficiently store large datasets and can be used with various data processing frameworks.
43
+ Another advantage of the Parquet backend is that it can be used lazily, meaning that the data is not loaded into memory until it is needed. This can be useful for working with large datasets that do not fit into memory.
44
+
45
+ Parquet backend metadata:
46
+
47
+ ```json
48
+ {
49
+ // Backend metadata
50
+ "backend": "parquet", // the backend used to store the table, e.g. "annadata", "parquet", etc..
51
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
52
+ "index_type": "int", // Either "int" or "str"
53
+ }
54
+ ```
55
+
56
+ The Zarr group directory will contain the Parquet file, and the metadata will be stored in the group attributes.
57
+
58
+ ```bash
59
+ table.zarr # Zarr group for the table
60
+ ├── table.parquet # Parquet file containing the table data
61
+ ├── .zattrs # Zarr group attributes containing the metadata
62
+ └── .zgroup # Zarr group metadata
63
+ ```
64
+
65
+ ## CSV Backend
66
+
67
+ The CSV backend is a plain text format that is widely used for tabular data. It is easy to read and write, and can be used across many different tools.
68
+
69
+ The CSV backen in ngio follows closely the same specifications as the Parquet backend, with the following metadata:
70
+
71
+ ```json
72
+ {
73
+ // Backend metadata
74
+ "backend": "csv", // the backend used to store the table, e.g. "annadata", "parquet", etc..
75
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
76
+ "index_type": "int", // Either "int" or "str"
77
+ }
78
+ ```
79
+
80
+ The Zarr group directory will contain the CSV file, and the metadata will be stored in the group attributes.
81
+
82
+ ```bash
83
+ table.zarr # Zarr group for the table
84
+ ├── table.csv # CSV file containing the table data
85
+ ├── .zattrs # Zarr group attributes containing the metadata
86
+ └── .zgroup # Zarr group metadata
87
+ ```
88
+
89
+ ## JSON Backend
90
+
91
+ The JSON backend serializes the table data into the Zarr group attributes as a JSON object. This backend is useful for tiny tables.
92
+
93
+ JSON backend metadata:
94
+
95
+ ```json
96
+ {
97
+ // Backend metadata
98
+ "backend": "json", // the backend used to store the table, e.g. "annadata", "parquet", etc..
99
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
100
+ "index_type": "int" // Either "int" or "str"
101
+ }
102
+ ```
103
+
104
+ The table will be stored in a subgroup of the Zarr group, and the metadata will be stored in the group attributes. Storing the table in a subgroup instead of a standalone json file allows for easier access via the Zarr API.
105
+
106
+ ```bash
107
+ table.zarr # Zarr group for the table
108
+ └── table # Zarr subgroup containing the table data
109
+ ├── .zattrs # the json table data serialized as a JSON object
110
+ └── .zgroup # Zarr group metadata
111
+ ├── .zattrs # Zarr group attributes containing the metadata
112
+ └── .zgroup # Zarr group metadata
113
+ ```
@@ -0,0 +1,92 @@
1
+ # Tables Overview
2
+
3
+ Ngio's architecture is designed to tightly integrate image and tabular data. For this purpose we developed custom specifications for serializing and deserializing tabular data into OME-Zarr containers, and semantically typed tables derived from the [fractal table specification](https://fractal-analytics-platform.github.io/fractal-tasks-core/tables/).
4
+
5
+ ## Architecture
6
+
7
+ The ngio tables architectures is composed of three main components:
8
+
9
+ ### 1. Table Backends
10
+
11
+ A backend module is a class that can serialize tabular data into OME-Zarr containers. We currently support four on-disk file formats:
12
+
13
+ - **AnnData**: Commonly used in single-cell genomics and was the standard table for the initial Fractal table spec.
14
+ - **Parquet**: A columnar storage file format optimized for large datasets.
15
+ - **CSV**: A simple text format for tabular data, easily human readable and writable.
16
+ - **JSON**: A lightweight data interchange format that both readable and efficient for small tables.
17
+
18
+ A more detailed description of the backend module can be found in the [Table Backends documentation](backend.md).
19
+
20
+ ### 2. In-Memory Table Objects
21
+
22
+ These are Python objects that represent the tabular data in memory. They provide a convenient interface for manipulating and analyzing the data without needing to interact directly with the underlying file format. We support the following in-memory table objects:
23
+
24
+ - **Pandas DataFrame**: The most commonly used data structure for tabular data in Python.
25
+ - **Polars LazyFrame**: A fast DataFrame implementation that allows for lazy evaluation and efficient computation on large datasets.
26
+ - **AnnData**: A specialized data structure for single-cell genomics data, which goes beyond simple tabular data.
27
+
28
+ We also provide utilities to convert between these in-memory representations in a standardized way based on the table type specifications/metadata.
29
+
30
+ ### 3. Table Type Specifications
31
+
32
+ These specifications define structured tables that standardize common table types used in image analysis. We have defined five table types so far:
33
+
34
+ - **Generic Tables**: A flexible table type that can represent any tabular data. See more in the [Generic Tables documentation](table_types/generic_table.md).
35
+ - **ROI Tables**: A table type specifically designed for representing Regions of Interest (ROIs) in images. See more in the [ROI Tables documentation](table_types/roi_table.md).
36
+ - **Masking ROI Tables**: A specialized table type for representing ROIs that are associated with specific labels in a OME-Zarr label image. See more in the [Masking ROI Tables documentation](table_types/masking_roi_table.md).
37
+ - **Feature Tables**: A table type for representing features extracted from images. This table is also associated with a specific label image. See more in the [Feature Tables documentation](table_types/feature_table.md).
38
+ - **Condition Tables**: A table to represent experimental conditions or metadata associated with images or experiments. See more in the [Condition Tables documentation](table_types/condition_table.md).
39
+
40
+ ## Tables Groups
41
+
42
+ Tables in OME-Zarr images are organized into groups of tables. Each group is saved in a Zarr group, and can be associated with a specific image or plate. The tables groups are:
43
+
44
+ - **Image Tables**: These tables are a sub group of the OME-Zarr image group and contain metadata or features related only to that specific image. The `.zarr` hierarchy is based on image [specification in NGFF 0.4](https://ngff.openmicroscopy.org/0.4/index.html#image-layout). The subgroup structure is based on the approach of the OME-Zarr `labels` group.
45
+
46
+ ```bash
47
+ image.zarr # Zarr group for a OME-Zarr image
48
+ |
49
+ ├── 0 # Zarr array for multiscale level 0
50
+ ├── ...
51
+ ├── N # Zarr array for multiscale level N
52
+ |
53
+ ├── labels # Zarr subgroup with a list of labels associated to this image
54
+ | ├── label_A # Zarr subgroup for a given label
55
+ | ├── label_B # Zarr subgroup for a given label
56
+ | └── ...
57
+ |
58
+ └── tables # Zarr subgroup with a list of tables associated to this image
59
+ ├── table_1 # Zarr subgroup for a given table
60
+ ├── table_2 # Zarr subgroup for a given table
61
+ └── ...
62
+ ```
63
+
64
+ - **Plate Tables**: These tables are a sub group of the OME-Zarr plate group and contain metadata or features related only to that specific plate.
65
+
66
+ ```bash
67
+ plate.zarr # Zarr group for a OME-Zarr HCS plate
68
+ |
69
+ ├── A # Row A of the plate
70
+ | ├── 1 # Column 0 of row A
71
+ | | ├── 0 # Acquisition 0 of column A1
72
+ | | ├── 1 # Acquisition 1 of column A1
73
+ | | └── ... # Other acquisitions of column A1
74
+ ...
75
+ ├── tables # Zarr subgroup with a list of tables associated to this plate
76
+ | ├── table_1 # Zarr subgroup for a given table
77
+ | ├── table_2 # Zarr subgroup for a given table
78
+ | └── ...
79
+ └── ...
80
+ ```
81
+
82
+ If a plate table contains per image information, the table should contain a `row`, `column`, and `path_in_well` columns.
83
+
84
+ ## Tables Group Attributes
85
+
86
+ The Zarr attributes of the tables group must include the key tables, pointing to the list of all tables (this simplifies discovery of tables associated to the current OME-Zarr image or plate), as in
87
+
88
+ ```json
89
+ {
90
+ "tables": ["table_1", "table_2"]
91
+ }
92
+ ```
@@ -0,0 +1,28 @@
1
+ # Condition Table
2
+
3
+ A condition table is a simple table that can be used to represent experimental conditions or metadata associated with images or experiments. It is a flexible table type that can be used to store any kind of metadata related to the images or experiments.
4
+
5
+ Example condition table:
6
+
7
+ | Cell Type | Drug | Dose |
8
+ |-----------|-----------|------|
9
+ | A | Drug A | 10 |
10
+ | A | Drug B | 20 |
11
+
12
+ ## Specifications
13
+
14
+ ### V1
15
+
16
+ A condition table must include the following metadata fields in the group attributes:
17
+
18
+ ```json
19
+ {
20
+ // Condition table metadata
21
+ "type": "condition_table",
22
+ "table_version": "1",
23
+ // Backend metadata
24
+ "backend": "csv", // the backend used to store the table, e.g. "annadata", "parquet", etc..
25
+ "index_key": "index", // The default index key for the condition table, which is used to identify each row.
26
+ "index_type": "int" // Either "int" or "str"
27
+ }
28
+ ```
@@ -0,0 +1,6 @@
1
+ # Add a Custom Table
2
+
3
+ Ngio allows users to define custom tables that can be used to store any kind of tabular data. Custom tables are flexible and can be used to represent any kind of data that does not fit into the predefined table types.
4
+
5
+ !!! warning
6
+ The library is still in the early stages and full documentation for custom tables is not yet available.
@@ -0,0 +1,54 @@
1
+ # Feature Tables
2
+
3
+ A feature table is a table type for representing per object features in an image. Each row in a feature table corresponds to a specific label in the label image.
4
+
5
+ Feature tables can optionally include metadata to specify the type of features stored in each column:
6
+
7
+ - `measurement`: A quantitative measurement of the object, such as area, perimeter, or intensity.
8
+ - `categorical`: A categorical feature of the object, such as a classification label or a type.
9
+ - `metadata`: Additional free-from columns that can be used to store any other information about the object, but that should not be used for analysis/classification purposes.
10
+
11
+ These feature types inform casting of the values when serialising a table and can be used in downstream analysis to select specific subsets of features. The feature type can be explicitly specified in the feature table metadata. Alternatively, if a column is not specified, we apply the following casting rules:
12
+
13
+ - If the column contains only numeric values, it is considered a `measurement`.
14
+ - If the column contains string or boolean values, it is considered a `categorical`.
15
+ - The index column is considered a `categorical` feature.
16
+
17
+ ## Specifications
18
+
19
+ ### V1
20
+
21
+ A feature table must include the following metadata fields in the group attributes:
22
+
23
+ ```json
24
+ {
25
+ // Feature table metadata
26
+ "type": "feature_table",
27
+ "table_version": "1",
28
+ "region": {"path": "../labels/label_DAPI"}, // Path to the label image associated with this feature table
29
+ // Backend metadata
30
+ "backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
31
+ "index_key": "label",
32
+ "index_type": "int", // Either "int" or "str"
33
+ }
34
+ ```
35
+
36
+ Additionally, it can include feature type information such as:
37
+
38
+ ```json
39
+ {
40
+ "categorical_columns": [
41
+ "label",
42
+ "cell_type",
43
+ ],
44
+ "measurement_columns": [
45
+ "area",
46
+ "perimeter",
47
+ "intensity_mean",
48
+ "intensity_std"
49
+ ],
50
+ "metadata_columns": [
51
+ "description",
52
+ ],
53
+ }
54
+ ```
@@ -0,0 +1,23 @@
1
+ # Generic Tables
2
+
3
+ A generic table is a flexible table type that can represent any tabular data. It is not tied to any specific domain or use case, making it suitable for a wide range of custom applications.
4
+
5
+ Generic tables can used as a safe fallback when trying to read a table that does not match any other specific table type.
6
+
7
+ ## Specifications
8
+
9
+ ### V1
10
+
11
+ A generic table should include the following metadata fields in the group attributes:
12
+
13
+ ```json
14
+ {
15
+ // Generic table metadata
16
+ "type": "generic_table",
17
+ "table_version": "1",
18
+ // Backend metadata
19
+ "backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
20
+ "index_key": "index", // The default index key for the generic table, which is used to identify each row.
21
+ "index_type": "int" // Either "int" or "str"
22
+ }
23
+ ```
@@ -0,0 +1,35 @@
1
+ # Masking ROI Tables
2
+
3
+ A masking ROI table is a specialized table type for representing Regions of Interest (ROIs) that are associated with specific labels in a label image.
4
+ Each row in a masking ROI table corresponds to a specific label in the label image.
5
+
6
+ Masking ROI tables can be used for several purposes, such as:
7
+
8
+ - Feature extraction from specific regions in the image.
9
+ - Masking specific regions in the image for further processing. For example a masking ROI table could store the ROIs for specific tissues, and for each of these ROIs we would like to perform cell segmentation.
10
+
11
+ ## Specifications
12
+
13
+ ### V1
14
+
15
+ A ROI table must include the following metadata fields in the group attributes:
16
+
17
+ ```json
18
+ {
19
+ // ROI table metadata
20
+ "type": "masking_roi_table",
21
+ "table_version": "1",
22
+ "region": {"path": "../labels/label_DAPI"}, // Path to the label image associated with this masking ROI table
23
+ // Backend metadata
24
+ "backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
25
+ "index_key": "label", // The default index key for the ROI table, which is used to identify each ROI.
26
+ "index_type": "int", // Either "int" or "str"
27
+ }
28
+ ```
29
+
30
+ Moreover the ROI table must include the following columns:
31
+
32
+ - `x_micrometer`, `y_micrometer`, `z_micrometer`: the top-left corner coordinates of the ROI in micrometers.
33
+ - `len_x_micrometer`, `len_y_micrometer`, `len_z_micrometer`: the size of the ROI in micrometers along each axis.
34
+
35
+ Additionally, each ROI can include the following optional columns: see [ROI Table](./roi_table.md).