ngio 0.2.9__tar.gz → 0.3.0a1__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 (227) hide show
  1. {ngio-0.2.9 → ngio-0.3.0a1}/.github/workflows/build_docs.yml +1 -1
  2. {ngio-0.2.9 → ngio-0.3.0a1}/.github/workflows/ci.yml +1 -0
  3. ngio-0.3.0a1/CHANGELOG.md +7 -0
  4. {ngio-0.2.9 → ngio-0.3.0a1}/PKG-INFO +4 -3
  5. ngio-0.3.0a1/docs/changelog.md +5 -0
  6. {ngio-0.2.9 → ngio-0.3.0a1}/docs/code_of_conduct.md +2 -0
  7. {ngio-0.2.9 → ngio-0.3.0a1}/docs/getting_started/1_ome_zarr_containers.md +1 -1
  8. {ngio-0.2.9 → ngio-0.3.0a1}/docs/getting_started/3_tables.md +3 -3
  9. ngio-0.3.0a1/docs/table_specs/backend.md +112 -0
  10. ngio-0.3.0a1/docs/table_specs/overview.md +92 -0
  11. ngio-0.3.0a1/docs/table_specs/table_types/condition_table.md +28 -0
  12. ngio-0.3.0a1/docs/table_specs/table_types/custom_table.md +6 -0
  13. ngio-0.3.0a1/docs/table_specs/table_types/feature_table.md +54 -0
  14. ngio-0.3.0a1/docs/table_specs/table_types/generic_table.md +23 -0
  15. ngio-0.3.0a1/docs/table_specs/table_types/masking_roi_table.md +35 -0
  16. ngio-0.3.0a1/docs/table_specs/table_types/roi_table.md +39 -0
  17. {ngio-0.2.9 → ngio-0.3.0a1}/mkdocs.yml +13 -0
  18. {ngio-0.2.9 → ngio-0.3.0a1}/pyproject.toml +3 -2
  19. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/__init__.py +16 -0
  20. ngio-0.3.0a1/src/ngio/common/_table_ops.py +471 -0
  21. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/hcs/plate.py +430 -72
  22. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/images/ome_zarr_container.py +99 -68
  23. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/_meta_handlers.py +16 -8
  24. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_axes.py +7 -4
  25. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/tables/__init__.py +13 -1
  26. ngio-0.3.0a1/src/ngio/tables/abstract_table.py +269 -0
  27. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/tables/backends/__init__.py +20 -0
  28. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/tables/backends/_abstract_backend.py +58 -80
  29. ngio-0.2.9/src/ngio/tables/backends/_anndata_v1.py → ngio-0.3.0a1/src/ngio/tables/backends/_anndata.py +5 -1
  30. ngio-0.3.0a1/src/ngio/tables/backends/_csv.py +35 -0
  31. ngio-0.2.9/src/ngio/tables/backends/_json_v1.py → ngio-0.3.0a1/src/ngio/tables/backends/_json.py +4 -1
  32. ngio-0.2.9/src/ngio/tables/backends/_csv_v1.py → ngio-0.3.0a1/src/ngio/tables/backends/_non_zarr_backends.py +61 -27
  33. ngio-0.3.0a1/src/ngio/tables/backends/_parquet.py +47 -0
  34. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/tables/backends/_table_backends.py +39 -18
  35. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/tables/backends/_utils.py +147 -1
  36. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/tables/tables_container.py +180 -92
  37. ngio-0.3.0a1/src/ngio/tables/v1/__init__.py +23 -0
  38. ngio-0.3.0a1/src/ngio/tables/v1/_condition_table.py +71 -0
  39. ngio-0.3.0a1/src/ngio/tables/v1/_feature_table.py +125 -0
  40. ngio-0.3.0a1/src/ngio/tables/v1/_generic_table.py +49 -0
  41. ngio-0.3.0a1/src/ngio/tables/v1/_roi_table.py +453 -0
  42. ngio-0.3.0a1/src/ngio/utils/_fractal_fsspec_store.py +42 -0
  43. ngio-0.3.0a1/tests/unit/common/test_table_ops.py +173 -0
  44. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/hcs/test_plate.py +36 -4
  45. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/images/test_omezarr_container.py +4 -4
  46. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/tables/test_backends.py +60 -26
  47. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/tables/test_feature_table.py +12 -3
  48. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/tables/test_generic_table.py +6 -9
  49. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/tables/test_masking_roi_table_v1.py +5 -4
  50. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/tables/test_roi_table_v1.py +18 -17
  51. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/tables/test_table_group.py +1 -1
  52. ngio-0.2.9/src/ngio/tables/_validators.py +0 -108
  53. ngio-0.2.9/src/ngio/tables/v1/__init__.py +0 -7
  54. ngio-0.2.9/src/ngio/tables/v1/_feature_table.py +0 -191
  55. ngio-0.2.9/src/ngio/tables/v1/_generic_table.py +0 -187
  56. ngio-0.2.9/src/ngio/tables/v1/_roi_table.py +0 -369
  57. ngio-0.2.9/src/ngio/utils/_fractal_fsspec_store.py +0 -13
  58. ngio-0.2.9/tests/unit/tables/test_validators.py +0 -53
  59. {ngio-0.2.9 → ngio-0.3.0a1}/.copier-answers.yml +0 -0
  60. {ngio-0.2.9 → ngio-0.3.0a1}/.gitattributes +0 -0
  61. {ngio-0.2.9 → ngio-0.3.0a1}/.github/ISSUE_TEMPLATE.md +0 -0
  62. {ngio-0.2.9 → ngio-0.3.0a1}/.github/TEST_FAIL_TEMPLATE.md +0 -0
  63. {ngio-0.2.9 → ngio-0.3.0a1}/.github/dependabot.yml +0 -0
  64. {ngio-0.2.9 → ngio-0.3.0a1}/.github/scripts/download_data.sh +0 -0
  65. {ngio-0.2.9 → ngio-0.3.0a1}/.gitignore +0 -0
  66. {ngio-0.2.9 → ngio-0.3.0a1}/.pre-commit-config.yaml +0 -0
  67. {ngio-0.2.9 → ngio-0.3.0a1}/LICENSE +0 -0
  68. {ngio-0.2.9 → ngio-0.3.0a1}/README.md +0 -0
  69. {ngio-0.2.9 → ngio-0.3.0a1}/_typos.toml +0 -0
  70. {ngio-0.2.9 → ngio-0.3.0a1}/docs/api/common.md +0 -0
  71. {ngio-0.2.9 → ngio-0.3.0a1}/docs/api/hcs.md +0 -0
  72. {ngio-0.2.9 → ngio-0.3.0a1}/docs/api/images.md +0 -0
  73. {ngio-0.2.9 → ngio-0.3.0a1}/docs/api/ngio.md +0 -0
  74. {ngio-0.2.9 → ngio-0.3.0a1}/docs/api/tables.md +0 -0
  75. {ngio-0.2.9 → ngio-0.3.0a1}/docs/api/utils.md +0 -0
  76. {ngio-0.2.9 → ngio-0.3.0a1}/docs/contributing.md +0 -0
  77. {ngio-0.2.9 → ngio-0.3.0a1}/docs/getting_started/0_quickstart.md +0 -0
  78. {ngio-0.2.9 → ngio-0.3.0a1}/docs/getting_started/2_images.md +0 -0
  79. {ngio-0.2.9 → ngio-0.3.0a1}/docs/getting_started/4_masked_images.md +0 -0
  80. {ngio-0.2.9 → ngio-0.3.0a1}/docs/getting_started/5_hcs.md +0 -0
  81. {ngio-0.2.9 → ngio-0.3.0a1}/docs/index.md +0 -0
  82. {ngio-0.2.9 → ngio-0.3.0a1}/docs/tutorials/feature_extraction.ipynb +0 -0
  83. {ngio-0.2.9 → ngio-0.3.0a1}/docs/tutorials/hcs_processing.ipynb +0 -0
  84. {ngio-0.2.9 → ngio-0.3.0a1}/docs/tutorials/image_processing.ipynb +0 -0
  85. {ngio-0.2.9 → ngio-0.3.0a1}/docs/tutorials/image_segmentation.ipynb +0 -0
  86. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/__init__.py +0 -0
  87. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_array_pipe.py +0 -0
  88. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_axes_transforms.py +0 -0
  89. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_common_types.py +0 -0
  90. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_dimensions.py +0 -0
  91. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_masking_roi.py +0 -0
  92. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_pyramid.py +0 -0
  93. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_roi.py +0 -0
  94. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_slicer.py +0 -0
  95. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/common/_zoom.py +0 -0
  96. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/hcs/__init__.py +0 -0
  97. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/images/__init__.py +0 -0
  98. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/images/abstract_image.py +0 -0
  99. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/images/create.py +0 -0
  100. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/images/image.py +0 -0
  101. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/images/label.py +0 -0
  102. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/images/masked_image.py +0 -0
  103. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/__init__.py +0 -0
  104. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/__init__.py +0 -0
  105. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_channels.py +0 -0
  106. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_dataset.py +0 -0
  107. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py +0 -0
  108. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_ngio_image.py +0 -0
  109. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/ngio_specs/_pixel_size.py +0 -0
  110. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/v04/__init__.py +0 -0
  111. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/v04/_custom_models.py +0 -0
  112. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/ome_zarr_meta/v04/_v04_spec_utils.py +0 -0
  113. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/tables/backends/_anndata_utils.py +0 -0
  114. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/utils/__init__.py +0 -0
  115. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/utils/_datasets.py +0 -0
  116. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/utils/_errors.py +0 -0
  117. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/utils/_logger.py +0 -0
  118. {ngio-0.2.9 → ngio-0.3.0a1}/src/ngio/utils/_zarr_utils.py +0 -0
  119. {ngio-0.2.9 → ngio-0.3.0a1}/tests/conftest.py +0 -0
  120. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/.zattrs +0 -0
  121. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/.zgroup +0 -0
  122. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/0/.zarray +0 -0
  123. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/1/.zarray +0 -0
  124. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zattrs +0 -0
  125. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/.zgroup +0 -0
  126. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zattrs +0 -0
  127. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zgroup +0 -0
  128. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/0/.zarray +0 -0
  129. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_c1yx.zarr/labels/label/1/.zarray +0 -0
  130. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/.zattrs +0 -0
  131. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/.zgroup +0 -0
  132. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/0/.zarray +0 -0
  133. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/1/.zarray +0 -0
  134. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zattrs +0 -0
  135. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/.zgroup +0 -0
  136. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zattrs +0 -0
  137. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zgroup +0 -0
  138. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/0/.zarray +0 -0
  139. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_cyx.zarr/labels/label/1/.zarray +0 -0
  140. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/.zattrs +0 -0
  141. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/.zgroup +0 -0
  142. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/0/.zarray +0 -0
  143. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/1/.zarray +0 -0
  144. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zattrs +0 -0
  145. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/.zgroup +0 -0
  146. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zattrs +0 -0
  147. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zgroup +0 -0
  148. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/0/.zarray +0 -0
  149. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_czyx.zarr/labels/label/1/.zarray +0 -0
  150. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/.zattrs +0 -0
  151. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/.zgroup +0 -0
  152. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/0/.zarray +0 -0
  153. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/1/.zarray +0 -0
  154. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zattrs +0 -0
  155. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/.zgroup +0 -0
  156. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zattrs +0 -0
  157. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zgroup +0 -0
  158. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/0/.zarray +0 -0
  159. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tcyx.zarr/labels/label/1/.zarray +0 -0
  160. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/.zattrs +0 -0
  161. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/.zgroup +0 -0
  162. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/0/.zarray +0 -0
  163. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/1/.zarray +0 -0
  164. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zattrs +0 -0
  165. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/.zgroup +0 -0
  166. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zattrs +0 -0
  167. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zgroup +0 -0
  168. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/0/.zarray +0 -0
  169. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tczyx.zarr/labels/label/1/.zarray +0 -0
  170. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/.zattrs +0 -0
  171. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/.zgroup +0 -0
  172. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/0/.zarray +0 -0
  173. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/1/.zarray +0 -0
  174. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zattrs +0 -0
  175. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/.zgroup +0 -0
  176. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zattrs +0 -0
  177. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zgroup +0 -0
  178. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/0/.zarray +0 -0
  179. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tyx.zarr/labels/label/1/.zarray +0 -0
  180. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/.zattrs +0 -0
  181. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/.zgroup +0 -0
  182. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/0/.zarray +0 -0
  183. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/1/.zarray +0 -0
  184. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zattrs +0 -0
  185. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/.zgroup +0 -0
  186. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zattrs +0 -0
  187. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zgroup +0 -0
  188. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/0/.zarray +0 -0
  189. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_tzyx.zarr/labels/label/1/.zarray +0 -0
  190. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/.zattrs +0 -0
  191. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/.zgroup +0 -0
  192. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/0/.zarray +0 -0
  193. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/1/.zarray +0 -0
  194. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/.zattrs +0 -0
  195. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/.zgroup +0 -0
  196. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zattrs +0 -0
  197. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/.zgroup +0 -0
  198. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/0/.zarray +0 -0
  199. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_yx.zarr/labels/label/1/.zarray +0 -0
  200. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/.zattrs +0 -0
  201. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/.zgroup +0 -0
  202. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/0/.zarray +0 -0
  203. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/1/.zarray +0 -0
  204. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zattrs +0 -0
  205. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/.zgroup +0 -0
  206. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zattrs +0 -0
  207. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zgroup +0 -0
  208. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/0/.zarray +0 -0
  209. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/images/test_image_zyx.zarr/labels/label/1/.zarray +0 -0
  210. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_image_meta.json +0 -0
  211. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_image_meta_wrong_axis_order.json +0 -0
  212. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_label_meta.json +0 -0
  213. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/meta/base_ome_zarr_well_meta.json +0 -0
  214. {ngio-0.2.9 → ngio-0.3.0a1}/tests/data/v04/meta/ome_zarr_well_path_normalization_meta.json +0 -0
  215. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/common/test_dimensions.py +0 -0
  216. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/common/test_pyramid.py +0 -0
  217. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/common/test_roi.py +0 -0
  218. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/hcs/test_well.py +0 -0
  219. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/images/test_create.py +0 -0
  220. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/images/test_images.py +0 -0
  221. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/images/test_masked_images.py +0 -0
  222. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/ome_zarr_meta/test_image_handler.py +0 -0
  223. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/ome_zarr_meta/test_unit_ngio_specs.py +0 -0
  224. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/ome_zarr_meta/test_unit_v04_utils.py +0 -0
  225. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/tables/test_backends_utils.py +0 -0
  226. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/utils/test_download_datasets.py +0 -0
  227. {ngio-0.2.9 → ngio-0.3.0a1}/tests/unit/utils/test_zarr_utils.py +0 -0
@@ -3,7 +3,7 @@ name: Build Docs
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - main
6
+ - dev
7
7
  tags:
8
8
  - "v*"
9
9
 
@@ -4,6 +4,7 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - main
7
+ - dev
7
8
  tags:
8
9
  - "v*"
9
10
  pull_request:
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased]
4
+
5
+ ### Added
6
+
7
+ - Initial version of the changelog.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngio
3
- Version: 0.2.9
3
+ Version: 0.3.0a1
4
4
  Summary: Next Generation file format IO
5
- Project-URL: homepage, https://github.com/lorenzocerrone/ngio
6
- Project-URL: repository, https://github.com/lorenzocerrone/ngio
5
+ Project-URL: homepage, https://github.com/fractal-analytics-platform/ngio
6
+ Project-URL: repository, https://github.com/fractal-analytics-platform/ngio
7
7
  Author-email: Lorenzo Cerrone <lorenzo.cerrone@uzh.ch>
8
8
  License: BSD-3-Clause
9
9
  License-File: LICENSE
@@ -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'
@@ -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
  ```
@@ -0,0 +1,112 @@
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 the name and original type is stored in the zarr attributes.
18
+
19
+ AnnData backend metadata:
20
+
21
+ ```json
22
+ {
23
+ // Backend metadata
24
+ "backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
25
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
26
+ "index_type": "str", // Either "int" or "str"
27
+ }
28
+ ```
29
+
30
+ Additionally, the AnnData package will write some additional metadata to the group attributes
31
+
32
+ ```json
33
+ {
34
+ "encoding-type": "anndata",
35
+ "encoding-version": "0.1.0",
36
+ }
37
+ ```
38
+
39
+ ## Parquet Backend
40
+
41
+ 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.
42
+ 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.
43
+
44
+ Parquet backend metadata:
45
+
46
+ ```json
47
+ {
48
+ // Backend metadata
49
+ "backend": "parquet", // the backend used to store the table, e.g. "annadata", "parquet", etc..
50
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
51
+ "index_type": "int", // Either "int" or "str"
52
+ }
53
+ ```
54
+
55
+ The Zarr group directory will contain the Parquet file, and the metadata will be stored in the group attributes.
56
+
57
+ ```bash
58
+ table.zarr # Zarr group for the table
59
+ ├── table.parquet # Parquet file containing the table data
60
+ ├── .zattrs # Zarr group attributes containing the metadata
61
+ └── .zgroup # Zarr group metadata
62
+ ```
63
+
64
+ ## CSV Backend
65
+
66
+ 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.
67
+
68
+ The CSV backen in ngio follows closely the same specifications as the Parquet backend, with the following metadata:
69
+
70
+ ```json
71
+ {
72
+ // Backend metadata
73
+ "backend": "csv", // the backend used to store the table, e.g. "annadata", "parquet", etc..
74
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
75
+ "index_type": "int", // Either "int" or "str"
76
+ }
77
+ ```
78
+
79
+ The Zarr group directory will contain the CSV file, and the metadata will be stored in the group attributes.
80
+
81
+ ```bash
82
+ table.zarr # Zarr group for the table
83
+ ├── table.csv # CSV file containing the table data
84
+ ├── .zattrs # Zarr group attributes containing the metadata
85
+ └── .zgroup # Zarr group metadata
86
+ ```
87
+
88
+ ## JSON Backend
89
+
90
+ The JSON backend serializes the table data into the Zarr group attributes as a JSON object. This backend is useful for tiny tables.
91
+
92
+ JSON backend metadata:
93
+
94
+ ```json
95
+ {
96
+ // Backend metadata
97
+ "backend": "json", // the backend used to store the table, e.g. "annadata", "parquet", etc..
98
+ "index_key": "index", // The default index key for the table, which is used to identify each row.
99
+ "index_type": "int" // Either "int" or "str"
100
+ }
101
+ ```
102
+
103
+ 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.
104
+
105
+ ```bash
106
+ table.zarr # Zarr group for the table
107
+ └── table # Zarr subgroup containing the table data
108
+ ├── .zattrs # the json table data serialized as a JSON object
109
+ └── .zgroup # Zarr group metadata
110
+ ├── .zattrs # Zarr group attributes containing the metadata
111
+ └── .zgroup # Zarr group metadata
112
+ ```
@@ -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).
@@ -0,0 +1,39 @@
1
+ # ROI Table
2
+
3
+ A ROI table defines regions of space which are axes-aligned bounding boxes in the image space.
4
+
5
+ ROI tables can be used for several purposes, such as:
6
+
7
+ - Storing information about the Microscope Field of View (FOV).
8
+ - Storing arbitrary regions of interest (ROIs).
9
+ - Use them as masks for other processes, such as segmentation or feature extraction.
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": "roi_table",
21
+ "table_version": "1",
22
+ // Backend metadata
23
+ "backend": "annadata", // the backend used to store the table, e.g. "annadata", "parquet", etc..
24
+ "index_key": "FieldIndex", // The default index key for the ROI table, which is used to identify each ROI.
25
+ "index_type": "str", // Either "int" or "str"
26
+ }
27
+ ```
28
+
29
+ Moreover the ROI table must include the following columns:
30
+
31
+ - `x_micrometer`, `y_micrometer`, `z_micrometer`: the top-left corner coordinates of the ROI in micrometers.
32
+ - `len_x_micrometer`, `len_y_micrometer`, `len_z_micrometer`: the size of the ROI in micrometers along each axis.
33
+
34
+ Additionally, each ROI can include the following optional columns:
35
+
36
+ - `x_micrometer_original` and `y_micrometer_original` which are the original coordinates of the ROI in micrometers. These are typically used when the data is saved in different coordinates during conversion, e.g. to avoid overwriting data from overlapping ROIs.
37
+ - `translation_x`, `translation_y` and `translation_z`, which are used during registration of multiplexing acquisitions.
38
+
39
+ The user can also add additional columns to the ROI table, but these columns will not be exposed in the ROI table API.
@@ -52,6 +52,7 @@ plugins:
52
52
  - search
53
53
  - autorefs
54
54
  - markdown-exec
55
+ - include-markdown
55
56
  - mkdocstrings:
56
57
  handlers:
57
58
  python:
@@ -99,6 +100,16 @@ nav:
99
100
  - tutorials/feature_extraction.ipynb
100
101
  - tutorials/hcs_processing.ipynb
101
102
 
103
+ - Table Specifications:
104
+ - "Overview": table_specs/overview.md
105
+ - "Table Backends": table_specs/backend.md
106
+ - "Table Types":
107
+ - "ROI Table": table_specs/table_types/roi_table.md
108
+ - "Masking ROI Table": table_specs/table_types/masking_roi_table.md
109
+ - "Feature Table": table_specs/table_types/feature_table.md
110
+ - "Condition Table": table_specs/table_types/condition_table.md
111
+ - "Add Custom Table": table_specs/table_types/custom_table.md
112
+
102
113
  - API Reference:
103
114
  - "ngio": api/ngio.md
104
115
  - "ngio.images": api/images.md
@@ -106,6 +117,8 @@ nav:
106
117
  - "ngio.hcs": api/hcs.md
107
118
  - "ngio.utils": api/utils.md
108
119
  - "ngio.common": api/common.md
120
+ - changelog.md
121
+
109
122
  - Contributing:
110
123
  - "Contributing Guide": contributing.md
111
124
  - "Code of Conduct": code_of_conduct.md
@@ -71,6 +71,7 @@ dev = [
71
71
 
72
72
  docs = [
73
73
  "mkdocs",
74
+ "mkdocs-include-markdown-plugin",
74
75
  "mkdocs-material",
75
76
  "mkdocstrings[python]",
76
77
  "mkdocs-jupyter",
@@ -87,8 +88,8 @@ docs = [
87
88
 
88
89
 
89
90
  [project.urls]
90
- homepage = "https://github.com/lorenzocerrone/ngio"
91
- repository = "https://github.com/lorenzocerrone/ngio"
91
+ homepage = "https://github.com/fractal-analytics-platform/ngio"
92
+ repository = "https://github.com/fractal-analytics-platform/ngio"
92
93
 
93
94
  # Entry points
94
95
  # https://peps.python.org/pep-0621/#entry-points
@@ -24,6 +24,15 @@ from ngio.common._slicer import (
24
24
  numpy_get_slice,
25
25
  numpy_set_slice,
26
26
  )
27
+ from ngio.common._table_ops import (
28
+ concatenate_image_tables,
29
+ concatenate_image_tables_as,
30
+ concatenate_image_tables_as_async,
31
+ concatenate_image_tables_async,
32
+ conctatenate_tables,
33
+ list_image_tables,
34
+ list_image_tables_async,
35
+ )
27
36
  from ngio.common._zoom import dask_zoom, numpy_zoom
28
37
 
29
38
  __all__ = [
@@ -34,6 +43,11 @@ __all__ = [
34
43
  "SliceTransform",
35
44
  "compute_and_slices",
36
45
  "compute_masking_roi",
46
+ "concatenate_image_tables",
47
+ "concatenate_image_tables_as",
48
+ "concatenate_image_tables_as_async",
49
+ "concatenate_image_tables_async",
50
+ "conctatenate_tables",
37
51
  "consolidate_pyramid",
38
52
  "dask_get_slice",
39
53
  "dask_set_slice",
@@ -41,6 +55,8 @@ __all__ = [
41
55
  "get_masked_pipe",
42
56
  "get_pipe",
43
57
  "init_empty_pyramid",
58
+ "list_image_tables",
59
+ "list_image_tables_async",
44
60
  "numpy_get_slice",
45
61
  "numpy_set_slice",
46
62
  "numpy_zoom",