ngio 0.1.6__tar.gz → 0.2.0__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 (264) hide show
  1. ngio-0.2.0/.github/scripts/download_data.sh +97 -0
  2. ngio-0.2.0/.github/workflows/build_docs.yml +61 -0
  3. {ngio-0.1.6 → ngio-0.2.0}/.github/workflows/ci.yml +31 -27
  4. {ngio-0.1.6 → ngio-0.2.0}/.gitignore +13 -2
  5. {ngio-0.1.6 → ngio-0.2.0}/.pre-commit-config.yaml +1 -1
  6. {ngio-0.1.6 → ngio-0.2.0}/PKG-INFO +30 -43
  7. {ngio-0.1.6 → ngio-0.2.0}/README.md +4 -4
  8. {ngio-0.1.6 → ngio-0.2.0}/_typos.toml +2 -1
  9. ngio-0.2.0/docs/api/common.md +6 -0
  10. ngio-0.2.0/docs/api/hcs.md +6 -0
  11. ngio-0.2.0/docs/api/images.md +6 -0
  12. ngio-0.2.0/docs/api/ngio.md +6 -0
  13. ngio-0.2.0/docs/api/tables.md +6 -0
  14. ngio-0.2.0/docs/api/utils.md +6 -0
  15. ngio-0.2.0/docs/code_of_conduct.md +2 -0
  16. ngio-0.2.0/docs/contributing.md +4 -0
  17. ngio-0.2.0/docs/getting_started/0_quickstart.md +99 -0
  18. ngio-0.2.0/docs/getting_started/1_ome_zarr_containers.md +182 -0
  19. ngio-0.2.0/docs/getting_started/2_images.md +200 -0
  20. ngio-0.2.0/docs/getting_started/3_tables.md +218 -0
  21. ngio-0.2.0/docs/getting_started/4_masked_images.md +148 -0
  22. ngio-0.2.0/docs/getting_started/5_hcs.md +163 -0
  23. ngio-0.2.0/docs/index.md +60 -0
  24. ngio-0.2.0/docs/tutorials/feature_extraction.ipynb +35 -0
  25. ngio-0.2.0/docs/tutorials/hcs_processing.ipynb +21 -0
  26. ngio-0.2.0/docs/tutorials/image_processing.ipynb +21 -0
  27. ngio-0.2.0/docs/tutorials/image_segmentation.ipynb +176 -0
  28. {ngio-0.1.6 → ngio-0.2.0}/mkdocs.yml +32 -8
  29. {ngio-0.1.6 → ngio-0.2.0}/pyproject.toml +52 -50
  30. ngio-0.2.0/src/ngio/__init__.py +43 -0
  31. ngio-0.2.0/src/ngio/common/__init__.py +54 -0
  32. ngio-0.2.0/src/ngio/common/_array_pipe.py +265 -0
  33. ngio-0.2.0/src/ngio/common/_axes_transforms.py +64 -0
  34. ngio-0.2.0/src/ngio/common/_common_types.py +5 -0
  35. ngio-0.2.0/src/ngio/common/_dimensions.py +120 -0
  36. ngio-0.2.0/src/ngio/common/_masking_roi.py +158 -0
  37. ngio-0.2.0/src/ngio/common/_pyramid.py +228 -0
  38. ngio-0.2.0/src/ngio/common/_roi.py +165 -0
  39. ngio-0.2.0/src/ngio/common/_slicer.py +96 -0
  40. ngio-0.1.6/src/ngio/pipes/_zoom_utils.py → ngio-0.2.0/src/ngio/common/_zoom.py +7 -81
  41. ngio-0.2.0/src/ngio/hcs/__init__.py +5 -0
  42. ngio-0.2.0/src/ngio/hcs/plate.py +448 -0
  43. ngio-0.2.0/src/ngio/images/__init__.py +23 -0
  44. ngio-0.2.0/src/ngio/images/abstract_image.py +349 -0
  45. ngio-0.2.0/src/ngio/images/create.py +270 -0
  46. ngio-0.2.0/src/ngio/images/image.py +453 -0
  47. ngio-0.2.0/src/ngio/images/label.py +285 -0
  48. ngio-0.2.0/src/ngio/images/masked_image.py +273 -0
  49. ngio-0.2.0/src/ngio/images/ome_zarr_container.py +738 -0
  50. ngio-0.2.0/src/ngio/ome_zarr_meta/__init__.py +47 -0
  51. ngio-0.2.0/src/ngio/ome_zarr_meta/_meta_handlers.py +791 -0
  52. ngio-0.2.0/src/ngio/ome_zarr_meta/ngio_specs/__init__.py +71 -0
  53. ngio-0.2.0/src/ngio/ome_zarr_meta/ngio_specs/_axes.py +481 -0
  54. ngio-0.2.0/src/ngio/ome_zarr_meta/ngio_specs/_channels.py +389 -0
  55. ngio-0.2.0/src/ngio/ome_zarr_meta/ngio_specs/_dataset.py +134 -0
  56. ngio-0.2.0/src/ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py +377 -0
  57. ngio-0.2.0/src/ngio/ome_zarr_meta/ngio_specs/_ngio_image.py +489 -0
  58. ngio-0.2.0/src/ngio/ome_zarr_meta/ngio_specs/_pixel_size.py +116 -0
  59. ngio-0.2.0/src/ngio/ome_zarr_meta/v04/__init__.py +23 -0
  60. ngio-0.2.0/src/ngio/ome_zarr_meta/v04/_v04_spec_utils.py +485 -0
  61. ngio-0.2.0/src/ngio/tables/__init__.py +29 -0
  62. ngio-0.2.0/src/ngio/tables/_validators.py +190 -0
  63. ngio-0.2.0/src/ngio/tables/backends/__init__.py +8 -0
  64. ngio-0.2.0/src/ngio/tables/backends/_abstract_backend.py +71 -0
  65. ngio-0.2.0/src/ngio/tables/backends/_anndata_utils.py +198 -0
  66. ngio-0.2.0/src/ngio/tables/backends/_anndata_v1.py +76 -0
  67. ngio-0.2.0/src/ngio/tables/backends/_json_v1.py +56 -0
  68. ngio-0.2.0/src/ngio/tables/backends/_table_backends.py +102 -0
  69. ngio-0.2.0/src/ngio/tables/tables_container.py +310 -0
  70. ngio-0.2.0/src/ngio/tables/v1/__init__.py +7 -0
  71. ngio-0.2.0/src/ngio/tables/v1/_feature_table.py +182 -0
  72. ngio-0.2.0/src/ngio/tables/v1/_generic_table.py +182 -0
  73. ngio-0.2.0/src/ngio/tables/v1/_roi_table.py +366 -0
  74. ngio-0.2.0/src/ngio/utils/__init__.py +46 -0
  75. ngio-0.2.0/src/ngio/utils/_datasets.py +53 -0
  76. {ngio-0.1.6 → ngio-0.2.0}/src/ngio/utils/_errors.py +10 -4
  77. ngio-0.2.0/src/ngio/utils/_fractal_fsspec_store.py +13 -0
  78. {ngio-0.1.6 → ngio-0.2.0}/src/ngio/utils/_logger.py +3 -1
  79. ngio-0.2.0/src/ngio/utils/_zarr_utils.py +401 -0
  80. ngio-0.2.0/tests/conftest.py +40 -0
  81. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/.zattrs +86 -0
  82. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/.zgroup +3 -0
  83. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/0/.zarray +27 -0
  84. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/1/.zarray +27 -0
  85. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/labels/.zattrs +5 -0
  86. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/labels/.zgroup +3 -0
  87. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zattrs +59 -0
  88. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/labels/label/.zgroup +3 -0
  89. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/labels/label/0/.zarray +25 -0
  90. ngio-0.2.0/tests/data/v04/images/test_image_c1yx.zarr/labels/label/1/.zarray +25 -0
  91. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/.zattrs +79 -0
  92. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/.zgroup +3 -0
  93. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/0/.zarray +25 -0
  94. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/1/.zarray +25 -0
  95. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/labels/.zattrs +5 -0
  96. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/labels/.zgroup +3 -0
  97. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zattrs +52 -0
  98. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/labels/label/.zgroup +3 -0
  99. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/labels/label/0/.zarray +23 -0
  100. ngio-0.2.0/tests/data/v04/images/test_image_cyx.zarr/labels/label/1/.zarray +23 -0
  101. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/.zattrs +86 -0
  102. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/.zgroup +3 -0
  103. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/0/.zarray +27 -0
  104. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/1/.zarray +27 -0
  105. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/labels/.zattrs +5 -0
  106. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/labels/.zgroup +3 -0
  107. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zattrs +59 -0
  108. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/labels/label/.zgroup +3 -0
  109. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/labels/label/0/.zarray +25 -0
  110. ngio-0.2.0/tests/data/v04/images/test_image_czyx.zarr/labels/label/1/.zarray +25 -0
  111. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/.zattrs +86 -0
  112. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/.zgroup +3 -0
  113. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/0/.zarray +27 -0
  114. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/1/.zarray +27 -0
  115. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/labels/.zattrs +5 -0
  116. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/labels/.zgroup +3 -0
  117. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zattrs +59 -0
  118. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/labels/label/.zgroup +3 -0
  119. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/labels/label/0/.zarray +25 -0
  120. ngio-0.2.0/tests/data/v04/images/test_image_tcyx.zarr/labels/label/1/.zarray +25 -0
  121. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/.zattrs +93 -0
  122. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/.zgroup +3 -0
  123. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/0/.zarray +29 -0
  124. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/1/.zarray +29 -0
  125. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/labels/.zattrs +5 -0
  126. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/labels/.zgroup +3 -0
  127. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zattrs +66 -0
  128. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/labels/label/.zgroup +3 -0
  129. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/labels/label/0/.zarray +27 -0
  130. ngio-0.2.0/tests/data/v04/images/test_image_tczyx.zarr/labels/label/1/.zarray +27 -0
  131. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/.zattrs +68 -0
  132. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/.zgroup +3 -0
  133. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/0/.zarray +25 -0
  134. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/1/.zarray +25 -0
  135. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/labels/.zattrs +5 -0
  136. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/labels/.zgroup +3 -0
  137. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zattrs +59 -0
  138. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/labels/label/.zgroup +3 -0
  139. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/labels/label/0/.zarray +25 -0
  140. ngio-0.2.0/tests/data/v04/images/test_image_tyx.zarr/labels/label/1/.zarray +25 -0
  141. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/.zattrs +75 -0
  142. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/.zgroup +3 -0
  143. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/0/.zarray +27 -0
  144. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/1/.zarray +27 -0
  145. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/labels/.zattrs +5 -0
  146. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/labels/.zgroup +3 -0
  147. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zattrs +66 -0
  148. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/labels/label/.zgroup +3 -0
  149. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/labels/label/0/.zarray +27 -0
  150. ngio-0.2.0/tests/data/v04/images/test_image_tzyx.zarr/labels/label/1/.zarray +27 -0
  151. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/.zattrs +61 -0
  152. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/.zgroup +3 -0
  153. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/0/.zarray +23 -0
  154. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/1/.zarray +23 -0
  155. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/labels/.zattrs +5 -0
  156. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/labels/.zgroup +3 -0
  157. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/labels/label/.zattrs +52 -0
  158. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/labels/label/.zgroup +3 -0
  159. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/labels/label/0/.zarray +23 -0
  160. ngio-0.2.0/tests/data/v04/images/test_image_yx.zarr/labels/label/1/.zarray +23 -0
  161. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/.zattrs +68 -0
  162. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/.zgroup +3 -0
  163. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/0/.zarray +25 -0
  164. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/1/.zarray +25 -0
  165. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/labels/.zattrs +5 -0
  166. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/labels/.zgroup +3 -0
  167. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zattrs +59 -0
  168. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/labels/label/.zgroup +3 -0
  169. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/labels/label/0/.zarray +25 -0
  170. ngio-0.2.0/tests/data/v04/images/test_image_zyx.zarr/labels/label/1/.zarray +25 -0
  171. ngio-0.2.0/tests/data/v04/meta/base_ome_zarr_image_meta.json +73 -0
  172. ngio-0.2.0/tests/data/v04/meta/base_ome_zarr_image_meta_wrong_axis_order.json +73 -0
  173. ngio-0.2.0/tests/data/v04/meta/base_ome_zarr_label_meta.json +50 -0
  174. ngio-0.2.0/tests/unit/common/test_dimensions.py +78 -0
  175. ngio-0.2.0/tests/unit/common/test_pyramid.py +27 -0
  176. ngio-0.2.0/tests/unit/common/test_roi.py +43 -0
  177. ngio-0.2.0/tests/unit/hcs/test_plate.py +57 -0
  178. ngio-0.2.0/tests/unit/images/test_create.py +128 -0
  179. ngio-0.2.0/tests/unit/images/test_images.py +25 -0
  180. ngio-0.2.0/tests/unit/images/test_masked_images.py +75 -0
  181. ngio-0.2.0/tests/unit/images/test_omezarr_container.py +162 -0
  182. ngio-0.2.0/tests/unit/tables/test_backends.py +199 -0
  183. ngio-0.2.0/tests/unit/tables/test_feature_table.py +27 -0
  184. ngio-0.2.0/tests/unit/tables/test_generic_table.py +57 -0
  185. ngio-0.2.0/tests/unit/tables/test_masking_roi_table_v1.py +62 -0
  186. ngio-0.2.0/tests/unit/tables/test_roi_table_v1.py +68 -0
  187. ngio-0.2.0/tests/unit/tables/test_table_group.py +34 -0
  188. ngio-0.2.0/tests/unit/tables/test_validators.py +53 -0
  189. ngio-0.2.0/tests/unit/test_ome_zarr_meta/test_image_handler.py +15 -0
  190. ngio-0.2.0/tests/unit/test_ome_zarr_meta/test_unit_ngio_specs.py +468 -0
  191. ngio-0.2.0/tests/unit/test_ome_zarr_meta/test_unit_v04_utils.py +41 -0
  192. ngio-0.2.0/tests/unit/utils/test_download_datasets.py +17 -0
  193. ngio-0.2.0/tests/unit/utils/test_zarr_utils.py +185 -0
  194. ngio-0.1.6/.github/workflows/build_docs.yml +0 -50
  195. ngio-0.1.6/docs/api/core.md +0 -8
  196. ngio-0.1.6/docs/getting-started.md +0 -34
  197. ngio-0.1.6/docs/index.md +0 -43
  198. ngio-0.1.6/docs/notebooks/basic_usage.ipynb +0 -323
  199. ngio-0.1.6/docs/notebooks/image.ipynb +0 -343
  200. ngio-0.1.6/docs/notebooks/processing.ipynb +0 -314
  201. ngio-0.1.6/setup_data.sh +0 -9
  202. ngio-0.1.6/src/ngio/__init__.py +0 -15
  203. ngio-0.1.6/src/ngio/core/__init__.py +0 -7
  204. ngio-0.1.6/src/ngio/core/dimensions.py +0 -122
  205. ngio-0.1.6/src/ngio/core/image_handler.py +0 -228
  206. ngio-0.1.6/src/ngio/core/image_like_handler.py +0 -549
  207. ngio-0.1.6/src/ngio/core/label_handler.py +0 -410
  208. ngio-0.1.6/src/ngio/core/ngff_image.py +0 -387
  209. ngio-0.1.6/src/ngio/core/roi.py +0 -92
  210. ngio-0.1.6/src/ngio/core/utils.py +0 -287
  211. ngio-0.1.6/src/ngio/io/__init__.py +0 -19
  212. ngio-0.1.6/src/ngio/io/_zarr.py +0 -88
  213. ngio-0.1.6/src/ngio/io/_zarr_group_utils.py +0 -60
  214. ngio-0.1.6/src/ngio/iterators/__init__.py +0 -1
  215. ngio-0.1.6/src/ngio/ngff_meta/__init__.py +0 -27
  216. ngio-0.1.6/src/ngio/ngff_meta/fractal_image_meta.py +0 -1267
  217. ngio-0.1.6/src/ngio/ngff_meta/meta_handler.py +0 -92
  218. ngio-0.1.6/src/ngio/ngff_meta/utils.py +0 -235
  219. ngio-0.1.6/src/ngio/ngff_meta/v04/__init__.py +0 -6
  220. ngio-0.1.6/src/ngio/ngff_meta/v04/specs.py +0 -158
  221. ngio-0.1.6/src/ngio/ngff_meta/v04/zarr_utils.py +0 -376
  222. ngio-0.1.6/src/ngio/pipes/__init__.py +0 -7
  223. ngio-0.1.6/src/ngio/pipes/_slicer_transforms.py +0 -176
  224. ngio-0.1.6/src/ngio/pipes/_transforms.py +0 -33
  225. ngio-0.1.6/src/ngio/pipes/data_pipe.py +0 -52
  226. ngio-0.1.6/src/ngio/tables/__init__.py +0 -11
  227. ngio-0.1.6/src/ngio/tables/_ad_reader.py +0 -80
  228. ngio-0.1.6/src/ngio/tables/_utils.py +0 -301
  229. ngio-0.1.6/src/ngio/tables/tables_group.py +0 -252
  230. ngio-0.1.6/src/ngio/tables/v1/__init__.py +0 -7
  231. ngio-0.1.6/src/ngio/tables/v1/_generic_table.py +0 -201
  232. ngio-0.1.6/src/ngio/tables/v1/feature_tables.py +0 -182
  233. ngio-0.1.6/src/ngio/tables/v1/masking_roi_tables.py +0 -243
  234. ngio-0.1.6/src/ngio/tables/v1/roi_tables.py +0 -285
  235. ngio-0.1.6/src/ngio/utils/__init__.py +0 -30
  236. ngio-0.1.6/src/ngio/utils/_common_types.py +0 -5
  237. ngio-0.1.6/src/ngio/utils/_pydantic_utils.py +0 -52
  238. ngio-0.1.6/tests/core/conftest.py +0 -50
  239. ngio-0.1.6/tests/core/test_image_handler.py +0 -31
  240. ngio-0.1.6/tests/core/test_image_like_handler.py +0 -74
  241. ngio-0.1.6/tests/core/test_label_handler.py +0 -30
  242. ngio-0.1.6/tests/core/test_ngff_image.py +0 -87
  243. ngio-0.1.6/tests/core/test_roi.py +0 -20
  244. ngio-0.1.6/tests/io/conftest.py +0 -66
  245. ngio-0.1.6/tests/io/test_zarr_group_utils.py +0 -28
  246. ngio-0.1.6/tests/ngff_meta/conftest.py +0 -44
  247. ngio-0.1.6/tests/ngff_meta/test_fractal_image_meta.py +0 -37
  248. ngio-0.1.6/tests/ngff_meta/test_pixel_size.py +0 -27
  249. ngio-0.1.6/tests/ngff_meta/test_utils.py +0 -121
  250. ngio-0.1.6/tests/ngff_meta/test_v04.py +0 -86
  251. ngio-0.1.6/tests/pipes/conftest.py +0 -46
  252. ngio-0.1.6/tests/pipes/test_zoom.py +0 -102
  253. ngio-0.1.6/tests/tables/conftest.py +0 -39
  254. ngio-0.1.6/tests/tables/test_table_conversion.py +0 -82
  255. ngio-0.1.6/tests/tables/test_table_group.py +0 -39
  256. ngio-0.1.6/tests/tables/test_v1_tables.py +0 -55
  257. ngio-0.1.6/tests/tables/test_validation.py +0 -53
  258. {ngio-0.1.6 → ngio-0.2.0}/.copier-answers.yml +0 -0
  259. {ngio-0.1.6 → ngio-0.2.0}/.gitattributes +0 -0
  260. {ngio-0.1.6 → ngio-0.2.0}/.github/ISSUE_TEMPLATE.md +0 -0
  261. {ngio-0.1.6 → ngio-0.2.0}/.github/TEST_FAIL_TEMPLATE.md +0 -0
  262. {ngio-0.1.6 → ngio-0.2.0}/.github/dependabot.yml +0 -0
  263. {ngio-0.1.6 → ngio-0.2.0}/LICENSE +0 -0
  264. /ngio-0.1.6/src/ngio/io/_zarr_array_utils.py → /ngio-0.2.0/index.md +0 -0
@@ -0,0 +1,97 @@
1
+ #!/bin/bash
2
+ # filepath: download_zarr_datasets.sh
3
+
4
+ # Default download directory
5
+ DOWNLOAD_DIR="data"
6
+
7
+ # Create download directory if it doesn't exist
8
+ mkdir -p "$DOWNLOAD_DIR"
9
+
10
+ # Function to check MD5 hash
11
+ check_md5() {
12
+ local file="$1"
13
+ local expected="$2"
14
+
15
+ if [[ "$(uname)" == "Darwin" ]]; then
16
+ # macOS
17
+ actual=$(md5 -q "$file")
18
+ else
19
+ # Linux/Ubuntu
20
+ actual=$(md5sum "$file" | awk '{print $1}')
21
+ fi
22
+
23
+ echo "Expected: $expected"
24
+ echo "Actual: $actual"
25
+
26
+ if [[ "$actual" == "$expected" ]]; then
27
+ return 0 # Success
28
+ else
29
+ return 1 # Failure
30
+ fi
31
+ }
32
+
33
+ # Function to download a file
34
+ download_file() {
35
+ local url="$1"
36
+ local output="$2"
37
+
38
+ echo "Downloading $url to $output..."
39
+
40
+ if command -v curl &> /dev/null; then
41
+ curl -L -o "$output" "$url"
42
+ elif command -v wget &> /dev/null; then
43
+ wget -O "$output" "$url"
44
+ else
45
+ echo "Error: Neither curl nor wget is available. Please install one of them."
46
+ exit 1
47
+ fi
48
+ }
49
+
50
+ # Function to process a dataset
51
+ process_dataset() {
52
+ local filename="$1"
53
+ local url="$2"
54
+ local expected_hash="$3"
55
+
56
+ local file_path="$DOWNLOAD_DIR/$filename"
57
+
58
+ echo "Processing $filename..."
59
+
60
+ # Check if file exists and has the correct hash
61
+ if [[ -f "$file_path" ]] && check_md5 "$file_path" "$expected_hash"; then
62
+ echo "File exists and has the correct hash."
63
+ else
64
+ # File doesn't exist or has incorrect hash
65
+ if [[ -f "$file_path" ]]; then
66
+ echo "File exists but has incorrect hash. Redownloading..."
67
+ else
68
+ echo "File doesn't exist. Downloading..."
69
+ fi
70
+
71
+ download_file "$url" "$file_path"
72
+
73
+ # Verify the downloaded file
74
+ if check_md5 "$file_path" "$expected_hash"; then
75
+ echo "Download successful and hash verified."
76
+ else
77
+ echo "Error: Downloaded file has incorrect hash."
78
+ return 1
79
+ fi
80
+ fi
81
+
82
+ echo "File is ready at $file_path"
83
+ return 0
84
+ }
85
+
86
+ # Process the CardioMyocyte dataset
87
+ process_dataset "20200812-CardiomyocyteDifferentiation14-Cycle1.zarr.zip" \
88
+ "https://zenodo.org/records/13305156/files/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr.zip" \
89
+ "efc21fe8d4ea3abab76226d8c166452c"
90
+
91
+ process_dataset "20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr.zip" \
92
+ "https://zenodo.org/records/13305316/files/20200812-CardiomyocyteDifferentiation14-Cycle1_mip.zarr.zip" \
93
+ "3ed3ea898e0ed42d397da2e1dbe40750"
94
+ # To add more datasets, add more calls to process_dataset like this:
95
+ # process_dataset "filename.zip" "download_url" "expected_md5_hash"
96
+
97
+ echo "All datasets processed."
@@ -0,0 +1,61 @@
1
+ name: Build Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "v*"
9
+
10
+ jobs:
11
+ download-test-ome-zarr:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Check and Download Artifacts
16
+ run: |
17
+ bash .github/scripts/download_data.sh
18
+
19
+ deploy:
20
+ name: Deploy Docs
21
+ needs: download-test-ome-zarr
22
+ runs-on: ubuntu-latest
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: 🐍 Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: "3.13"
33
+ cache-dependency-path: "pyproject.toml"
34
+ cache: "pip"
35
+
36
+ - name: Install Dependencies
37
+ run: |
38
+ python -m pip install -U pip
39
+ python -m pip install .[dev]
40
+ python -m pip install .[docs]
41
+
42
+ - name: Configure Git user
43
+ run: |
44
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
45
+ git config --local user.name "github-actions[bot]"
46
+
47
+ - name: Deploy docs
48
+ run: |
49
+ VERSION=$(echo $GITHUB_REF | sed 's/refs\/tags\///' | sed 's/refs\/heads\///')
50
+ echo "Deploying version $VERSION"
51
+ # Check if the version is a stable release
52
+ # Meaning that starts with "v" and contains only numbers and dots
53
+ if [[ $GITHUB_REF == refs/tags/* ]] && [[ $VERSION =~ ^v[0-9.]+$ ]]; then
54
+ mike deploy --push --update-aliases $VERSION stable
55
+ mike set-default --push stable
56
+ echo "Deployed stable version"
57
+ else
58
+ mike deploy --push dev
59
+ mike set-default --push dev
60
+ echo "Deployed development version"
61
+ fi
@@ -26,21 +26,49 @@ jobs:
26
26
  - uses: actions/checkout@v4
27
27
  - run: pipx run check-manifest
28
28
 
29
+
30
+ download-test-ome-zarr:
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - name: Check and Download Artifacts
35
+ run: |
36
+ bash .github/scripts/download_data.sh
37
+ - name: Upload Artifacts
38
+ uses: actions/upload-artifact@v4
39
+ with:
40
+ name: data
41
+ path: data
42
+
43
+
29
44
  test:
30
45
  name: ${{ matrix.platform }} (${{ matrix.python-version }})
46
+ needs: download-test-ome-zarr
31
47
  runs-on: ${{ matrix.platform }}
32
48
  strategy:
33
49
  fail-fast: false
34
50
  matrix:
35
- python-version: ["3.10", "3.11", "3.12", "3.13"]
36
- # Skip Windows for now It's seems there are some issues with the
37
- # ZarrV3 on Windows
51
+ python-version: ["3.11", "3.12", "3.13"]
38
52
  platform: [ubuntu-latest, macos-latest, windows-latest]
39
53
  # platform: [ubuntu-latest, macos-latest]
54
+ exclude:
55
+ - python-version: "3.11"
56
+ platform: windows-latest
57
+ - python-version: "3.12"
58
+ platform: windows-latest
40
59
 
41
60
  steps:
42
61
  - uses: actions/checkout@v4
43
62
 
63
+ - uses: actions/download-artifact@v4
64
+ with:
65
+ name: data
66
+ path: data
67
+
68
+ - name: Check Artifacts
69
+ run: |
70
+ ls -l data
71
+
44
72
  - name: 🐍 Set up Python ${{ matrix.python-version }}
45
73
  uses: actions/setup-python@v5
46
74
  with:
@@ -78,30 +106,6 @@ jobs:
78
106
  token: ${{ secrets.CODECOV_TOKEN }}
79
107
  files: /home/runner/work/ngio/ngio/coverage.xml
80
108
 
81
- zarrv3:
82
- name: Test zarr-python v3 compatibility
83
- runs-on: ubuntu-latest
84
-
85
- steps:
86
- - uses: actions/checkout@v4
87
-
88
- - name: 🐍 Set up Python
89
- uses: actions/setup-python@v5
90
- with:
91
- python-version: "3.11"
92
- cache-dependency-path: "pyproject.toml"
93
- cache: "pip"
94
-
95
- - name: Install Dependencies
96
- run: |
97
- python -m pip install -U pip
98
- # if running a cron job, we add the --pre flag to test against pre-releases
99
- python -m pip install .[dev3] ${{ github.event_name == 'schedule' && '--pre' || '' }}
100
-
101
- - name: 🧪 Run Tests
102
- run: pytest
103
- continue-on-error: true
104
-
105
109
  deploy:
106
110
  name: Deploy
107
111
  needs: test
@@ -116,8 +116,19 @@ ENV/
116
116
  pixi.lock
117
117
  *.egg-info
118
118
 
119
+ # Ignore all .zarr directories
119
120
  *.zarr
121
+ # but allow .zarr in tests/data
122
+ !tests/data/**/**/test_*.zarr
120
123
 
121
124
  # ignore data directory
122
- data/
123
- *.zip
125
+ ./data/
126
+ *.zip
127
+
128
+ src/ngio/_v01
129
+ tests/_v01
130
+
131
+ # Ignore locks
132
+ *.lock
133
+
134
+ benchmark/*
@@ -21,7 +21,7 @@ repos:
21
21
  args: [--force-exclude, --write-changes]
22
22
 
23
23
  - repo: https://github.com/charliermarsh/ruff-pre-commit
24
- rev: v0.4.8
24
+ rev: v0.9.6
25
25
  hooks:
26
26
  - id: ruff
27
27
  args: [--fix] # may also add '--unsafe-fixes'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngio
3
- Version: 0.1.6
3
+ Version: 0.2.0
4
4
  Summary: Next Generation file format IO
5
5
  Project-URL: homepage, https://github.com/lorenzocerrone/ngio
6
6
  Project-URL: repository, https://github.com/lorenzocerrone/ngio
@@ -10,55 +10,40 @@ License-File: LICENSE
10
10
  Classifier: Development Status :: 3 - Alpha
11
11
  Classifier: License :: OSI Approved :: BSD License
12
12
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
15
14
  Classifier: Programming Language :: Python :: 3.12
16
15
  Classifier: Programming Language :: Python :: 3.13
17
16
  Classifier: Typing :: Typed
18
- Requires-Python: >=3.10
17
+ Requires-Python: <3.14,>=3.11
19
18
  Requires-Dist: aiohttp
20
19
  Requires-Dist: anndata>=0.8.0
21
20
  Requires-Dist: dask[array]
21
+ Requires-Dist: dask[distributed]
22
+ Requires-Dist: filelock
22
23
  Requires-Dist: numpy
24
+ Requires-Dist: ome-zarr-models
23
25
  Requires-Dist: pandas>=1.2.0
26
+ Requires-Dist: pooch
24
27
  Requires-Dist: pydantic
25
28
  Requires-Dist: requests
26
- Provides-Extra: core
27
- Requires-Dist: dask-image; extra == 'core'
28
- Requires-Dist: dask[distributed]; extra == 'core'
29
- Requires-Dist: zarr<3; extra == 'core'
30
- Provides-Extra: dev2
31
- Requires-Dist: dask-image; extra == 'dev2'
32
- Requires-Dist: dask[distributed]; extra == 'dev2'
33
- Requires-Dist: ipython; extra == 'dev2'
34
- Requires-Dist: matplotlib; extra == 'dev2'
35
- Requires-Dist: mypy; extra == 'dev2'
36
- Requires-Dist: napari; extra == 'dev2'
37
- Requires-Dist: notebook; extra == 'dev2'
38
- Requires-Dist: pdbpp; extra == 'dev2'
39
- Requires-Dist: plotly; extra == 'dev2'
40
- Requires-Dist: pre-commit; extra == 'dev2'
41
- Requires-Dist: pyqt5; extra == 'dev2'
42
- Requires-Dist: pytest; extra == 'dev2'
43
- Requires-Dist: pytest-cov; extra == 'dev2'
44
- Requires-Dist: rich; extra == 'dev2'
45
- Requires-Dist: ruff; extra == 'dev2'
46
- Requires-Dist: scikit-image; extra == 'dev2'
47
- Requires-Dist: zarr<3; extra == 'dev2'
48
- Provides-Extra: dev3
49
- Requires-Dist: dask-image; extra == 'dev3'
50
- Requires-Dist: dask[distributed]; extra == 'dev3'
51
- Requires-Dist: ipython; extra == 'dev3'
52
- Requires-Dist: mypy; extra == 'dev3'
53
- Requires-Dist: notebook; extra == 'dev3'
54
- Requires-Dist: pdbpp; extra == 'dev3'
55
- Requires-Dist: pre-commit; extra == 'dev3'
56
- Requires-Dist: pytest; extra == 'dev3'
57
- Requires-Dist: pytest-cov; extra == 'dev3'
58
- Requires-Dist: rich; extra == 'dev3'
59
- Requires-Dist: ruff; extra == 'dev3'
60
- Requires-Dist: zarr==v3.0.0-alpha.4; extra == 'dev3'
29
+ Requires-Dist: xarray
30
+ Requires-Dist: zarr<3
31
+ Provides-Extra: dev
32
+ Requires-Dist: devtools; extra == 'dev'
33
+ Requires-Dist: matplotlib; extra == 'dev'
34
+ Requires-Dist: mypy; extra == 'dev'
35
+ Requires-Dist: napari; extra == 'dev'
36
+ Requires-Dist: notebook; extra == 'dev'
37
+ Requires-Dist: pdbpp; extra == 'dev'
38
+ Requires-Dist: pre-commit; extra == 'dev'
39
+ Requires-Dist: pyqt5; extra == 'dev'
40
+ Requires-Dist: rich; extra == 'dev'
41
+ Requires-Dist: ruff; extra == 'dev'
42
+ Requires-Dist: scikit-image; extra == 'dev'
61
43
  Provides-Extra: docs
44
+ Requires-Dist: markdown-exec[ansi]; extra == 'docs'
45
+ Requires-Dist: matplotlib; extra == 'docs'
46
+ Requires-Dist: mike; extra == 'docs'
62
47
  Requires-Dist: mkdocs; extra == 'docs'
63
48
  Requires-Dist: mkdocs-autorefs; extra == 'docs'
64
49
  Requires-Dist: mkdocs-git-committers-plugin-2; extra == 'docs'
@@ -66,11 +51,13 @@ Requires-Dist: mkdocs-git-revision-date-localized-plugin; extra == 'docs'
66
51
  Requires-Dist: mkdocs-jupyter; extra == 'docs'
67
52
  Requires-Dist: mkdocs-material; extra == 'docs'
68
53
  Requires-Dist: mkdocstrings[python]; extra == 'docs'
54
+ Requires-Dist: rich; extra == 'docs'
69
55
  Requires-Dist: scikit-image; extra == 'docs'
56
+ Requires-Dist: tabulate; extra == 'docs'
70
57
  Provides-Extra: test
71
58
  Requires-Dist: pytest; extra == 'test'
72
59
  Requires-Dist: pytest-cov; extra == 'test'
73
- Requires-Dist: zarr<3; extra == 'test'
60
+ Requires-Dist: scikit-image; extra == 'test'
74
61
  Description-Content-Type: text/markdown
75
62
 
76
63
  # NGIO - Next Generation file format IO
@@ -78,7 +65,7 @@ Description-Content-Type: text/markdown
78
65
  [![License](https://img.shields.io/pypi/l/ngio.svg?color=green)](https://github.com/lorenzocerrone/ngio/raw/main/LICENSE)
79
66
  [![PyPI](https://img.shields.io/pypi/v/ngio.svg?color=green)](https://pypi.org/project/ngio)
80
67
  [![Python Version](https://img.shields.io/pypi/pyversions/ngio.svg?color=green)](https://python.org)
81
- [![CI](https://github.com/lorenzocerrone/ngio/actions/workflows/ci.yml/badge.svg)](https://github.com/lorenzocerrone/ngio/actions/workflows/ci.yml)
68
+ [![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)
82
69
  [![codecov](https://codecov.io/gh/fractal-analytics-platform/ngio/graph/badge.svg?token=FkmF26FZki)](https://codecov.io/gh/fractal-analytics-platform/ngio)
83
70
 
84
71
  NGIO is a Python library to streamline OME-Zarr image analysis workflows.
@@ -86,9 +73,9 @@ NGIO is a Python library to streamline OME-Zarr image analysis workflows.
86
73
  **Main Goals:**
87
74
 
88
75
  - Abstract object base API for handling OME-Zarr files
89
- - Powefull iterators for processing data using common access patterns
76
+ - Powerful iterators for processing data using common access patterns
90
77
  - Tight integration with [Fractal's Table Fractal](https://fractal-analytics-platform.github.io/fractal-tasks-core/tables/)
91
- - Validate OME-Zarr files
78
+ - Validation of OME-Zarr files
92
79
 
93
80
  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/)
94
81
 
@@ -108,7 +95,7 @@ To get started, check out the [Getting Started](https://fractal-analytics-platfo
108
95
  | Basic Iterators | Ongoing | End-September | Read and Write Iterators for common access patterns |
109
96
  | Base Documentation | ✅ | End-September | API Documentation and Examples |
110
97
  | Beta Ready Testing | ✅ | End-September | Beta Testing; Library is ready for testing, but the API is not stable |
111
- | Streaming from Fractal | Ongoing | December | Ngio can stream ome-zarr from fractal |
98
+ | Streaming from Fractal | Ongoing | December | Ngio can stream OME-Zarr from fractal |
112
99
  | Mask Iterators | Ongoing | Early 2025 | Iterators over Masked Tables |
113
100
  | Advanced Iterators | Not started | mid-2025 | Iterators for advanced access patterns |
114
101
  | Parallel Iterators | Not started | mid-2025 | Concurrent Iterators for parallel read and write |
@@ -3,7 +3,7 @@
3
3
  [![License](https://img.shields.io/pypi/l/ngio.svg?color=green)](https://github.com/lorenzocerrone/ngio/raw/main/LICENSE)
4
4
  [![PyPI](https://img.shields.io/pypi/v/ngio.svg?color=green)](https://pypi.org/project/ngio)
5
5
  [![Python Version](https://img.shields.io/pypi/pyversions/ngio.svg?color=green)](https://python.org)
6
- [![CI](https://github.com/lorenzocerrone/ngio/actions/workflows/ci.yml/badge.svg)](https://github.com/lorenzocerrone/ngio/actions/workflows/ci.yml)
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
7
  [![codecov](https://codecov.io/gh/fractal-analytics-platform/ngio/graph/badge.svg?token=FkmF26FZki)](https://codecov.io/gh/fractal-analytics-platform/ngio)
8
8
 
9
9
  NGIO is a Python library to streamline OME-Zarr image analysis workflows.
@@ -11,9 +11,9 @@ NGIO is a Python library to streamline OME-Zarr image analysis workflows.
11
11
  **Main Goals:**
12
12
 
13
13
  - Abstract object base API for handling OME-Zarr files
14
- - Powefull iterators for processing data using common access patterns
14
+ - Powerful iterators for processing data using common access patterns
15
15
  - Tight integration with [Fractal's Table Fractal](https://fractal-analytics-platform.github.io/fractal-tasks-core/tables/)
16
- - Validate OME-Zarr files
16
+ - Validation of OME-Zarr files
17
17
 
18
18
  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/)
19
19
 
@@ -33,7 +33,7 @@ To get started, check out the [Getting Started](https://fractal-analytics-platfo
33
33
  | Basic Iterators | Ongoing | End-September | Read and Write Iterators for common access patterns |
34
34
  | Base Documentation | ✅ | End-September | API Documentation and Examples |
35
35
  | Beta Ready Testing | ✅ | End-September | Beta Testing; Library is ready for testing, but the API is not stable |
36
- | Streaming from Fractal | Ongoing | December | Ngio can stream ome-zarr from fractal |
36
+ | Streaming from Fractal | Ongoing | December | Ngio can stream OME-Zarr from fractal |
37
37
  | Mask Iterators | Ongoing | Early 2025 | Iterators over Masked Tables |
38
38
  | Advanced Iterators | Not started | mid-2025 | Iterators for advanced access patterns |
39
39
  | Parallel Iterators | Not started | mid-2025 | Concurrent Iterators for parallel read and write |
@@ -1,3 +1,4 @@
1
1
  [default.extend-words]
2
2
  # Don't correct the surname "Teh"
3
- OME = "OME"
3
+ OME = "OME"
4
+ FO = "FO"
@@ -0,0 +1,6 @@
1
+ # ngio.common API documentation
2
+
3
+ !!! warning
4
+ Coming soon, ngio API documentation is not yet available.
5
+ If you have any questions please reach out to us on GitHub or via email.
6
+ We are happy to help you with any questions or issues you may have.
@@ -0,0 +1,6 @@
1
+ # ngio.hcs API documentation
2
+
3
+ !!! warning
4
+ Coming soon, ngio API documentation is not yet available.
5
+ If you have any questions please reach out to us on GitHub or via email.
6
+ We are happy to help you with any questions or issues you may have.
@@ -0,0 +1,6 @@
1
+ # ngio.images API documentation
2
+
3
+ !!! warning
4
+ Coming soon, ngio API documentation is not yet available.
5
+ If you have any questions please reach out to us on GitHub or via email.
6
+ We are happy to help you with any questions or issues you may have.
@@ -0,0 +1,6 @@
1
+ # ngio API documentation
2
+
3
+ !!! warning
4
+ Coming soon, ngio API documentation is not yet available.
5
+ If you have any questions please reach out to us on GitHub or via email.
6
+ We are happy to help you with any questions or issues you may have.
@@ -0,0 +1,6 @@
1
+ # ngio.tables API documentation
2
+
3
+ !!! warning
4
+ Coming soon, ngio API documentation is not yet available.
5
+ If you have any questions please reach out to us on GitHub or via email.
6
+ We are happy to help you with any questions or issues you may have.
@@ -0,0 +1,6 @@
1
+ # ngio.utils
2
+
3
+ !!! warning
4
+ Coming soon, ngio API documentation is not yet available.
5
+ If you have any questions please reach out to us on GitHub or via email.
6
+ We are happy to help you with any questions or issues you may have.
@@ -0,0 +1,2 @@
1
+ !!! warning
2
+ The library is still in the early stages of development, the code of conduct is not yet established.
@@ -0,0 +1,4 @@
1
+ !!! warning
2
+ The library is still in the early stages of development, no contribution guidelines are established yet.
3
+ But contributions are welcome! Please open an issue or a pull request to discuss your ideas.
4
+ We are looking for contributors to help us improve the library and documentation.
@@ -0,0 +1,99 @@
1
+ # Quickstart
2
+
3
+ `ngio` is a Python package that provides a simple and intuitive API for reading and writing data to and from various data sources. This guide will walk you through the basics of using `ngio` to read and write data.
4
+
5
+ ## Installation
6
+
7
+ `ngio` can be installed from PyPI, conda-forge, or from source.
8
+
9
+ - Python `>=3.11`
10
+
11
+ === "pip"
12
+
13
+ The recommended way to install `ngio` is from PyPI using pip:
14
+
15
+ ```bash
16
+ pip install ngio
17
+ ```
18
+
19
+ === "mamba/conda"
20
+
21
+ Alternatively, you can install `ngio` using mamba:
22
+
23
+ ```bash
24
+ mamba install -c conda-forge ngio
25
+ ```
26
+
27
+ or conda:
28
+
29
+ ```bash
30
+ conda install -c conda-forge ngio
31
+ ```
32
+
33
+ === "Source"
34
+
35
+ 1. Clone the repository:
36
+ ```bash
37
+ git clone https://github.com/fractal-analytics-platform/ngio.git
38
+ cd ngio
39
+ ```
40
+
41
+ 2. Install the package:
42
+ ```bash
43
+ pip install .
44
+ ```
45
+
46
+ ### Troubleshooting
47
+
48
+ Please report installation problems by opening an issue on our [GitHub repository](https://github.com/fractal-analytics-platform/ngio).
49
+
50
+ ## Setup some test data
51
+
52
+ Let's start by downloading a sample OME-Zarr dataset to work with.
53
+
54
+ ```python exec="true" source="material-block" session="quickstart"
55
+ from pathlib import Path
56
+ from ngio.utils import download_ome_zarr_dataset
57
+
58
+ # Download a sample dataset
59
+ download_dir = Path("./data")
60
+ download_dir = Path(".").absolute().parent.parent / "data" # markdown-exec: hide
61
+ hcs_path = download_ome_zarr_dataset("CardiomyocyteSmallMip", download_dir=download_dir)
62
+ image_path = hcs_path / "B" / "03" / "0"
63
+ ```
64
+
65
+ ## Open an OME-Zarr image
66
+
67
+ Let's start by opening an OME-Zarr file and inspecting its contents.
68
+
69
+ ```pycon exec="true" source="console" session="quickstart"
70
+ >>> from ngio import open_ome_zarr_container
71
+ >>> ome_zarr_container = open_ome_zarr_container(image_path)
72
+ >>> ome_zarr_container
73
+ >>> print(ome_zarr_container) # markdown-exec: hide
74
+ ```
75
+
76
+ ### What is the OmeZarr container?
77
+
78
+ The `ome_zarr_container` is the core of ngio and the entry point to working with OME-Zarr images. It provides high-level access to the image metadata, images, labels, and tables.
79
+
80
+ ### What is the OmeZarr container not?
81
+
82
+ The `OmeZarr Container` object does not allow the user to interact with the image data directly. For that, we need to use the `Image`, `Label`, and `Table` objects.
83
+
84
+ ## Next steps
85
+
86
+ To learn how to work with the `OmeZarr Container` object, but also with the image, label, and table data, check out the following guides:
87
+
88
+ - [Ome-Zarr Container](1_ome_zarr_containers.md): An overview on how to user the Ome-Zarr Container object and how to create new images and labels.
89
+ - [Images/Labels](2_images.md): To know more on how to work with image data.
90
+ - [Tables](3_tables.md): To know more on how to work with table data, and how you can combine tables with image data.
91
+ - [Masked Images/Labels](4_masked_images.md): To know more on how to work with masked image data.
92
+ - [HCS Plates](5_hcs.md): To know more on how to work with HCS Plate data.
93
+
94
+ Also, checkout our jupyer notebook tutorials for more examples:
95
+
96
+ - [Image Processing](../tutorials/image_processing.ipynb): Learn how to perform simple image processing operations.
97
+ - [Image Segmentation](../tutorials/image_segmentation.ipynb): Learn how to create new labels from images.
98
+ - [Feature Extraction](../tutorials/feature_extraction.ipynb): Learn how to extract features from images.
99
+ - [HCS Processing](../tutorials/hcs_processing.ipynb): Learn how to process high-content screening data using ngio.