ngio 0.2.0b1__py3-none-any.whl → 0.2.0b3__py3-none-any.whl

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.
@@ -179,13 +179,6 @@ def _mask_pipe_common(
179
179
  **slice_kwargs,
180
180
  )
181
181
 
182
- if "c" in slice_kwargs.keys():
183
- # This makes the strong assumption that the
184
- # user is passing the channel axis as "c"
185
- # This will fail if the channel axis is queried
186
- # with a different on-disk name
187
- slice_kwargs.pop("c")
188
-
189
182
  label_patch = get_pipe(
190
183
  label_array,
191
184
  dimensions=dimensions_label,
@@ -99,6 +99,36 @@ class AbstractImage(Generic[_image_handler]):
99
99
  """Return the dimensions of the image."""
100
100
  return self._dimensions
101
101
 
102
+ @property
103
+ def is_3d(self) -> bool:
104
+ """Return True if the image is 3D."""
105
+ return self.dimensions.is_3d
106
+
107
+ @property
108
+ def is_2d(self) -> bool:
109
+ """Return True if the image is 2D."""
110
+ return self.dimensions.is_2d
111
+
112
+ @property
113
+ def is_time_series(self) -> bool:
114
+ """Return True if the image is a time series."""
115
+ return self.dimensions.is_time_series
116
+
117
+ @property
118
+ def is_2d_time_series(self) -> bool:
119
+ """Return True if the image is a 2D time series."""
120
+ return self.dimensions.is_2d_time_series
121
+
122
+ @property
123
+ def is_3d_time_series(self) -> bool:
124
+ """Return True if the image is a 3D time series."""
125
+ return self.dimensions.is_3d_time_series
126
+
127
+ @property
128
+ def is_multi_channels(self) -> bool:
129
+ """Return True if the image is multichannel."""
130
+ return self.dimensions.is_multi_channels
131
+
102
132
  @property
103
133
  def pixel_size(self) -> PixelSize:
104
134
  """Return the pixel size of the image."""
@@ -125,6 +125,36 @@ class OmeZarrContainer:
125
125
  """Return the paths of the levels in the image."""
126
126
  return self._images_container.levels_paths
127
127
 
128
+ @property
129
+ def is_3d(self) -> bool:
130
+ """Return True if the image is 3D."""
131
+ return self.get_image().is_3d
132
+
133
+ @property
134
+ def is_2d(self) -> bool:
135
+ """Return True if the image is 2D."""
136
+ return self.get_image().is_2d
137
+
138
+ @property
139
+ def is_time_series(self) -> bool:
140
+ """Return True if the image is a time series."""
141
+ return self.get_image().is_time_series
142
+
143
+ @property
144
+ def is_2d_time_series(self) -> bool:
145
+ """Return True if the image is a 2D time series."""
146
+ return self.get_image().is_2d_time_series
147
+
148
+ @property
149
+ def is_3d_time_series(self) -> bool:
150
+ """Return True if the image is a 3D time series."""
151
+ return self.get_image().is_3d_time_series
152
+
153
+ @property
154
+ def is_multi_channels(self) -> bool:
155
+ """Return True if the image is multichannel."""
156
+ return self.get_image().is_multi_channels
157
+
128
158
  def initialize_channel_meta(
129
159
  self,
130
160
  labels: Collection[str] | int | None = None,
@@ -342,12 +342,6 @@ class NgioLabelMeta(AbstractNgioImageMeta):
342
342
  ) -> None:
343
343
  """Initialize the ImageMeta object."""
344
344
  super().__init__(version, name, datasets)
345
-
346
- # Make sure that there are no channel axes
347
- channel_axis = self.axes_mapper.get_axis("c")
348
- if channel_axis is not None:
349
- raise NgioValidationError("Label metadata must not have channel axes.")
350
-
351
345
  image_label = (
352
346
  ImageLabelSource.default_init(self.version)
353
347
  if image_label is None
@@ -41,6 +41,9 @@ def custom_read_zarr(
41
41
  """
42
42
  group, _ = open_group_wrapper(store=store, mode="r")
43
43
 
44
+ if not isinstance(group.store, zarr.DirectoryStore):
45
+ elem_to_read = ["X", "obs", "var"]
46
+
44
47
  if elem_to_read is None:
45
48
  elem_to_read = [
46
49
  "X",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngio
3
- Version: 0.2.0b1
3
+ Version: 0.2.0b3
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
@@ -41,6 +41,7 @@ Requires-Dist: rich; extra == 'dev'
41
41
  Requires-Dist: ruff; extra == 'dev'
42
42
  Requires-Dist: scikit-image; extra == 'dev'
43
43
  Provides-Extra: docs
44
+ Requires-Dist: mike; extra == 'docs'
44
45
  Requires-Dist: mkdocs; extra == 'docs'
45
46
  Requires-Dist: mkdocs-autorefs; extra == 'docs'
46
47
  Requires-Dist: mkdocs-git-committers-plugin-2; extra == 'docs'
@@ -60,7 +61,7 @@ Description-Content-Type: text/markdown
60
61
  [![License](https://img.shields.io/pypi/l/ngio.svg?color=green)](https://github.com/lorenzocerrone/ngio/raw/main/LICENSE)
61
62
  [![PyPI](https://img.shields.io/pypi/v/ngio.svg?color=green)](https://pypi.org/project/ngio)
62
63
  [![Python Version](https://img.shields.io/pypi/pyversions/ngio.svg?color=green)](https://python.org)
63
- [![CI](https://github.com/lorenzocerrone/ngio/actions/workflows/ci.yml/badge.svg)](https://github.com/lorenzocerrone/ngio/actions/workflows/ci.yml)
64
+ [![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)
64
65
  [![codecov](https://codecov.io/gh/fractal-analytics-platform/ngio/graph/badge.svg?token=FkmF26FZki)](https://codecov.io/gh/fractal-analytics-platform/ngio)
65
66
 
66
67
  NGIO is a Python library to streamline OME-Zarr image analysis workflows.
@@ -96,3 +97,4 @@ To get started, check out the [Getting Started](https://fractal-analytics-platfo
96
97
  | Parallel Iterators | Not started | mid-2025 | Concurrent Iterators for parallel read and write |
97
98
  | Full Documentation | Not started | 2025 | Complete Documentation |
98
99
  | Release 1.0 (Commitment to API) | Not started | 2025 | API is stable; breaking changes will be avoided |
100
+
@@ -1,6 +1,6 @@
1
1
  ngio/__init__.py,sha256=8-5UcDEIPVIM3mk4GqyBJNteQo0WZNOox1-F6UJoHjg,1001
2
2
  ngio/common/__init__.py,sha256=4MLD3Xgr6-I6NwGoY7pa5qQfbfEobFCW3KvLybYcgOc,1373
3
- ngio/common/_array_pipe.py,sha256=TTdSGJp8eFFycfme_gtdSKk9vcu-A--PhpP4qSi7N40,7840
3
+ ngio/common/_array_pipe.py,sha256=rZQMB3cgMSnpvZpLZEndNZVdWZIOMWgvYqeEOLz7XQ0,7576
4
4
  ngio/common/_axes_transforms.py,sha256=kWU0M5erNmgWBXdu5LNv-tLW3jqkT00MMYX7cz-kyHs,2035
5
5
  ngio/common/_common_types.py,sha256=OkAYNSNjZkixL1MI-HPBVuXamheFBr862uJ4PvTxmhk,129
6
6
  ngio/common/_dimensions.py,sha256=UV2XulWaROb3Y2f4fv27ZkTIu-MoS53U26aDkrv-_lk,3900
@@ -12,12 +12,12 @@ ngio/common/_zoom.py,sha256=KsURa5VuixmpbAAY5-6obmuQV8vfiHKZqBxZDXvchpM,5473
12
12
  ngio/hcs/__init__.py,sha256=9YNmtHgCKhYSjmAE2-YVg5BycH-5cQGAE9xFrxxWo8c,188
13
13
  ngio/hcs/plate.py,sha256=b-EHns-OGQF_RXEa-GDzP2TJFqpRFc0rBKdgf4l7MwU,12409
14
14
  ngio/images/__init__.py,sha256=aijqG14eyqVgHtnlcKVNx37FRfT6QvKt8V6bwBpX_r8,526
15
- ngio/images/abstract_image.py,sha256=zA1LAZNAuBmZwInUhL33NiFLsCtfyEhI-4XPIRQgCIg,8770
15
+ ngio/images/abstract_image.py,sha256=UQpcp--SzJITIZfSg_KZWU9_mIC11LdHTuITJdxCNTE,9671
16
16
  ngio/images/create.py,sha256=wQfoB9pmQkHFFYE3WNbhgQt36XhoTopGcPGcEXTNI-0,9764
17
17
  ngio/images/image.py,sha256=BL9TINwYrT2_HdkhCKoRcfy7XqiiwEIVQvHDFkF8ZWc,15246
18
18
  ngio/images/label.py,sha256=gvVuRUsrDBk-EpsuUMepC4M5hYPb5yTVvWwozaLM7-g,9333
19
19
  ngio/images/masked_image.py,sha256=4YYVqf8OtIp-wWGVGUKMHMTqod4p4F7ZyWrsUIXMjEs,7905
20
- ngio/images/omezarr_container.py,sha256=80bqjl3Km7lAp0p_eKOpslgCY1UEj-7kM8M67THUZHo,26469
20
+ ngio/images/omezarr_container.py,sha256=db5KnWAfWoaEekNmWxVQPAI3xXXeQGItQ3gvBbr55VA,27376
21
21
  ngio/ome_zarr_meta/__init__.py,sha256=EfBX9ppb_wliSIcVb4NBDt3dFVldeIJ0h9tY9HELRY4,1075
22
22
  ngio/ome_zarr_meta/_meta_handlers.py,sha256=BLvYt5PONYrWkEb2XgEiAXR_OX9rfeX_C0eEqen0jQA,25549
23
23
  ngio/ome_zarr_meta/ngio_specs/__init__.py,sha256=ZpghXfbq0r-YJklD7J76BRMTlzEIAJFzneYlsosdyTY,1548
@@ -25,7 +25,7 @@ ngio/ome_zarr_meta/ngio_specs/_axes.py,sha256=zgAE0-2DHzJfqGqBhyjY7y_6qAgDLdV9iu
25
25
  ngio/ome_zarr_meta/ngio_specs/_channels.py,sha256=ufZuYuTO5PJA1vcBrNAcuZCMgIEwF57buPloTHIzB1Q,14082
26
26
  ngio/ome_zarr_meta/ngio_specs/_dataset.py,sha256=xT4GY2mdIsm6nAP8bXRj5E9-P6rS-iwzcXT_o3pZajo,4696
27
27
  ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py,sha256=YQlobPYU7vbo9fShHQyCfzLlDUlP-mprAivay6W4-A0,11610
28
- ngio/ome_zarr_meta/ngio_specs/_ngio_image.py,sha256=6bJNONxf1UbpxF635Dckm7RTG11zY0EWyRNtQAUkBYw,17004
28
+ ngio/ome_zarr_meta/ngio_specs/_ngio_image.py,sha256=74L3ibo0SurKnbkxt0Re9jEVcLf63ZJouL2ZHpHZDbc,16776
29
29
  ngio/ome_zarr_meta/ngio_specs/_pixel_size.py,sha256=QZy94THDBkeLgOtN6o_jF3oXSewRxdM2E7ZTSBTo7RU,3878
30
30
  ngio/ome_zarr_meta/v04/__init__.py,sha256=dJRzzxyYc81kf-0Hip_bqvbdManaM8XTdQX2meWyCSs,583
31
31
  ngio/ome_zarr_meta/v04/_v04_spec_utils.py,sha256=G4GGarkktjdsIzHUhaoZEL69-r-ZLpLz6y5TDVsN4W0,15939
@@ -34,7 +34,7 @@ ngio/tables/_validators.py,sha256=RzF09YrlUSb-xdVlosuU-_BaLswtvhpduHfzLaWu2mY,64
34
34
  ngio/tables/tables_container.py,sha256=FXp-s_zKqbMcBFh4515kbSdxYaFK1ULE2Pf0pzlnpEE,9845
35
35
  ngio/tables/backends/__init__.py,sha256=NlOXmZXDA1kOCVONUyo_aqSjdMHmfqk-3xuKBLXpaUM,217
36
36
  ngio/tables/backends/_abstract_backend.py,sha256=JlaHqLjDm2uVnXFWxsHMojNeKo3leg6uauzoFMSF5O4,2256
37
- ngio/tables/backends/_anndata_utils.py,sha256=TnrjOI70tSRl0bYJvVzvMSMojD61GDK3Uo8wS6EOXZg,6816
37
+ ngio/tables/backends/_anndata_utils.py,sha256=zo85K0bwgyQKBj8hQASfOSWugdd4BPUTyT6_tRO58fI,6917
38
38
  ngio/tables/backends/_anndata_v1.py,sha256=hhEwoBybWFDHqajOk_JEazniYmhAlCehOYTtmcYJfyY,2615
39
39
  ngio/tables/backends/_json_v1.py,sha256=9ZC0d_tMiiugm-VXDL3sRFfESzSnnY9kAtSxoXYV-dY,1910
40
40
  ngio/tables/backends/_table_backends.py,sha256=XXtnZqVDbMqFkbUkHbf9IBNz4teCouLpa5fWgEgVtfg,3269
@@ -48,7 +48,7 @@ ngio/utils/_errors.py,sha256=pKQ12LUjQLYE1nUawemA5h7HsgznjaSvV1n2PQU33N0,759
48
48
  ngio/utils/_fractal_fsspec_store.py,sha256=7qoGLiLi8JQFh9Ej_z5WNwQQuWrujb0f6p9nj8ocsS8,548
49
49
  ngio/utils/_logger.py,sha256=HIuqD_2ShfFGDswBddcouStbKfL0Vz_ah8cAIFGhbS8,888
50
50
  ngio/utils/_zarr_utils.py,sha256=r075cNpr-JHZ1PaDHX1KlENIGMvLf-WTTYwpODACWm4,12924
51
- ngio-0.2.0b1.dist-info/METADATA,sha256=J-tCuj8BXolhGSU57DFUkgm3dvFkyQq9JQy5MrXznTs,4933
52
- ngio-0.2.0b1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
53
- ngio-0.2.0b1.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
54
- ngio-0.2.0b1.dist-info/RECORD,,
51
+ ngio-0.2.0b3.dist-info/METADATA,sha256=hvC4PR-EEJBiDvSHl4Bq_0I924a0ifhf0r1vdVsiQ6k,4995
52
+ ngio-0.2.0b3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
53
+ ngio-0.2.0b3.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
54
+ ngio-0.2.0b3.dist-info/RECORD,,
File without changes