ngio 0.3.5__py3-none-any.whl → 0.4.0a1__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.
Files changed (61) hide show
  1. ngio/__init__.py +6 -0
  2. ngio/common/__init__.py +50 -48
  3. ngio/common/_array_io_pipes.py +549 -0
  4. ngio/common/_array_io_utils.py +508 -0
  5. ngio/common/_dimensions.py +63 -27
  6. ngio/common/_masking_roi.py +38 -10
  7. ngio/common/_pyramid.py +9 -7
  8. ngio/common/_roi.py +571 -72
  9. ngio/common/_synt_images_utils.py +101 -0
  10. ngio/common/_zoom.py +17 -12
  11. ngio/common/transforms/__init__.py +5 -0
  12. ngio/common/transforms/_label.py +12 -0
  13. ngio/common/transforms/_zoom.py +109 -0
  14. ngio/experimental/__init__.py +5 -0
  15. ngio/experimental/iterators/__init__.py +17 -0
  16. ngio/experimental/iterators/_abstract_iterator.py +170 -0
  17. ngio/experimental/iterators/_feature.py +151 -0
  18. ngio/experimental/iterators/_image_processing.py +169 -0
  19. ngio/experimental/iterators/_rois_utils.py +127 -0
  20. ngio/experimental/iterators/_segmentation.py +278 -0
  21. ngio/hcs/_plate.py +41 -36
  22. ngio/images/__init__.py +22 -1
  23. ngio/images/_abstract_image.py +247 -117
  24. ngio/images/_create.py +15 -15
  25. ngio/images/_create_synt_container.py +128 -0
  26. ngio/images/_image.py +425 -62
  27. ngio/images/_label.py +33 -30
  28. ngio/images/_masked_image.py +396 -122
  29. ngio/images/_ome_zarr_container.py +203 -66
  30. ngio/{common → images}/_table_ops.py +41 -41
  31. ngio/ome_zarr_meta/ngio_specs/__init__.py +2 -8
  32. ngio/ome_zarr_meta/ngio_specs/_axes.py +151 -128
  33. ngio/ome_zarr_meta/ngio_specs/_channels.py +55 -18
  34. ngio/ome_zarr_meta/ngio_specs/_dataset.py +7 -7
  35. ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py +3 -3
  36. ngio/ome_zarr_meta/ngio_specs/_ngio_image.py +11 -68
  37. ngio/ome_zarr_meta/v04/_v04_spec_utils.py +1 -1
  38. ngio/resources/20200812-CardiomyocyteDifferentiation14-Cycle1_B03/mask.png +0 -0
  39. ngio/resources/20200812-CardiomyocyteDifferentiation14-Cycle1_B03/nuclei.png +0 -0
  40. ngio/resources/20200812-CardiomyocyteDifferentiation14-Cycle1_B03/raw.jpg +0 -0
  41. ngio/resources/__init__.py +54 -0
  42. ngio/resources/resource_model.py +35 -0
  43. ngio/tables/backends/_abstract_backend.py +5 -6
  44. ngio/tables/backends/_anndata.py +1 -1
  45. ngio/tables/backends/_anndata_utils.py +3 -3
  46. ngio/tables/backends/_non_zarr_backends.py +1 -1
  47. ngio/tables/backends/_table_backends.py +0 -1
  48. ngio/tables/backends/_utils.py +3 -3
  49. ngio/tables/v1/_roi_table.py +156 -69
  50. ngio/utils/__init__.py +2 -3
  51. ngio/utils/_logger.py +19 -0
  52. ngio/utils/_zarr_utils.py +1 -5
  53. {ngio-0.3.5.dist-info → ngio-0.4.0a1.dist-info}/METADATA +3 -1
  54. ngio-0.4.0a1.dist-info/RECORD +76 -0
  55. ngio/common/_array_pipe.py +0 -288
  56. ngio/common/_axes_transforms.py +0 -64
  57. ngio/common/_common_types.py +0 -5
  58. ngio/common/_slicer.py +0 -96
  59. ngio-0.3.5.dist-info/RECORD +0 -61
  60. {ngio-0.3.5.dist-info → ngio-0.4.0a1.dist-info}/WHEEL +0 -0
  61. {ngio-0.3.5.dist-info → ngio-0.4.0a1.dist-info}/licenses/LICENSE +0 -0
@@ -1,7 +1,7 @@
1
1
  """Abstract class for handling OME-NGFF images."""
2
2
 
3
3
  import warnings
4
- from collections.abc import Collection
4
+ from collections.abc import Sequence
5
5
 
6
6
  import numpy as np
7
7
 
@@ -9,10 +9,7 @@ from ngio.images._create import create_empty_image_container
9
9
  from ngio.images._image import Image, ImagesContainer
10
10
  from ngio.images._label import Label, LabelsContainer
11
11
  from ngio.images._masked_image import MaskedImage, MaskedLabel
12
- from ngio.ome_zarr_meta import (
13
- NgioImageMeta,
14
- PixelSize,
15
- )
12
+ from ngio.ome_zarr_meta import NgioImageMeta, PixelSize, find_label_meta_handler
16
13
  from ngio.ome_zarr_meta.ngio_specs import (
17
14
  DefaultNgffVersion,
18
15
  DefaultSpaceUnit,
@@ -58,7 +55,21 @@ def _default_label_container(handler: ZarrGroupHandler) -> LabelsContainer | Non
58
55
 
59
56
 
60
57
  class OmeZarrContainer:
61
- """This class contains an OME-Zarr image and its associated tables and labels."""
58
+ """This class is an object representation of an OME-Zarr image.
59
+
60
+ It provides methods to access:
61
+ - The multiscale image metadata
62
+ - To open images at different levels of resolution
63
+ - To access labels and tables associated with the image.
64
+ - To derive new images, labels, and add tables to the image.
65
+ - To modify the image metadata, such as axes units and channel metadata.
66
+
67
+ Attributes:
68
+ images_container (ImagesContainer): The container for the images.
69
+ labels_container (LabelsContainer): The container for the labels.
70
+ tables_container (TablesContainer): The container for the tables.
71
+
72
+ """
62
73
 
63
74
  _images_container: ImagesContainer
64
75
  _labels_container: LabelsContainer | None
@@ -71,7 +82,14 @@ class OmeZarrContainer:
71
82
  label_container: LabelsContainer | None = None,
72
83
  validate_paths: bool = False,
73
84
  ) -> None:
74
- """Initialize the OmeZarrContainer."""
85
+ """Initialize the OmeZarrContainer.
86
+
87
+ Args:
88
+ group_handler (ZarrGroupHandler): The Zarr group handler.
89
+ table_container (TablesContainer | None): The tables container.
90
+ label_container (LabelsContainer | None): The labels container.
91
+ validate_paths (bool): Whether to validate the paths of the image multiscale
92
+ """
75
93
  self._group_handler = group_handler
76
94
  self._images_container = ImagesContainer(self._group_handler)
77
95
 
@@ -101,7 +119,11 @@ class OmeZarrContainer:
101
119
 
102
120
  @property
103
121
  def images_container(self) -> ImagesContainer:
104
- """Return the image container."""
122
+ """Return the images container.
123
+
124
+ Returns:
125
+ ImagesContainer: The images container.
126
+ """
105
127
  return self._images_container
106
128
 
107
129
  def _get_labels_container(self) -> LabelsContainer | None:
@@ -193,19 +215,47 @@ class OmeZarrContainer:
193
215
  """Return the time unit of the image."""
194
216
  return self.image_meta.time_unit
195
217
 
218
+ @property
219
+ def channel_labels(self) -> list[str]:
220
+ """Return the channels of the image."""
221
+ image = self.get_image()
222
+ return image.channel_labels
223
+
224
+ @property
225
+ def wavelength_ids(self) -> list[str | None]:
226
+ """Return the list of wavelength of the image."""
227
+ image = self.get_image()
228
+ return image.wavelength_ids
229
+
230
+ @property
231
+ def num_channels(self) -> int:
232
+ """Return the number of channels."""
233
+ return len(self.channel_labels)
234
+
235
+ def get_channel_idx(
236
+ self, channel_label: str | None = None, wavelength_id: str | None = None
237
+ ) -> int:
238
+ """Get the index of a channel by its label or wavelength ID."""
239
+ image = self.get_image()
240
+ return image.channels_meta.get_channel_idx(
241
+ channel_label=channel_label, wavelength_id=wavelength_id
242
+ )
243
+
196
244
  def set_channel_meta(
197
245
  self,
198
- labels: Collection[str] | int | None = None,
199
- wavelength_id: Collection[str] | None = None,
246
+ labels: Sequence[str] | int | None = None,
247
+ wavelength_id: Sequence[str] | None = None,
200
248
  percentiles: tuple[float, float] | None = None,
201
- colors: Collection[str] | None = None,
202
- active: Collection[bool] | None = None,
249
+ colors: Sequence[str] | None = None,
250
+ active: Sequence[bool] | None = None,
203
251
  **omero_kwargs: dict,
204
252
  ) -> None:
205
253
  """Create a ChannelsMeta object with the default unit."""
206
254
  self._images_container.set_channel_meta(
207
255
  labels=labels,
208
256
  wavelength_id=wavelength_id,
257
+ start=None,
258
+ end=None,
209
259
  percentiles=percentiles,
210
260
  colors=colors,
211
261
  active=active,
@@ -262,9 +312,57 @@ class OmeZarrContainer:
262
312
  path=path, pixel_size=pixel_size, strict=strict
263
313
  )
264
314
 
315
+ def _find_matching_masking_label(
316
+ self,
317
+ masking_label_name: str | None = None,
318
+ masking_table_name: str | None = None,
319
+ pixel_size: PixelSize | None = None,
320
+ ) -> tuple[Label, MaskingRoiTable]:
321
+ if masking_label_name is not None and masking_table_name is not None:
322
+ # Both provided
323
+ masking_label = self.get_label(
324
+ name=masking_label_name, pixel_size=pixel_size, strict=False
325
+ )
326
+ masking_table = self.get_masking_roi_table(name=masking_table_name)
327
+
328
+ elif masking_label_name is not None and masking_table_name is None:
329
+ # Only the label provided
330
+ masking_label = self.get_label(
331
+ name=masking_label_name, pixel_size=pixel_size, strict=False
332
+ )
333
+
334
+ for table_name in self.list_roi_tables():
335
+ table = self.get_generic_roi_table(name=table_name)
336
+ if isinstance(table, MaskingRoiTable):
337
+ if table.reference_label == masking_label_name:
338
+ masking_table = table
339
+ break
340
+ else:
341
+ masking_table = masking_label.build_masking_roi_table()
342
+
343
+ elif masking_table_name is not None and masking_label_name is None:
344
+ # Only the table provided
345
+ masking_table = self.get_masking_roi_table(name=masking_table_name)
346
+
347
+ if masking_table.reference_label is None:
348
+ raise NgioValueError(
349
+ f"Masking table {masking_table_name} does not have a reference "
350
+ "label. Please provide the masking_label_name explicitly."
351
+ )
352
+ masking_label = self.get_label(
353
+ name=masking_table.reference_label,
354
+ pixel_size=pixel_size,
355
+ strict=False,
356
+ )
357
+ else:
358
+ raise NgioValueError(
359
+ "Neither masking_label_name nor masking_table_name were provided."
360
+ )
361
+ return masking_label, masking_table
362
+
265
363
  def get_masked_image(
266
364
  self,
267
- masking_label_name: str,
365
+ masking_label_name: str | None = None,
268
366
  masking_table_name: str | None = None,
269
367
  path: str | None = None,
270
368
  pixel_size: PixelSize | None = None,
@@ -273,26 +371,27 @@ class OmeZarrContainer:
273
371
  """Get a masked image at a specific level.
274
372
 
275
373
  Args:
276
- masking_label_name (str): The name of the label.
277
- masking_table_name (str | None): The name of the masking table.
374
+ masking_label_name (str | None): The name of the masking label to use.
375
+ If None, the masking table must be provided.
376
+ masking_table_name (str | None): The name of the masking table to use.
377
+ If None, the masking label must be provided.
278
378
  path (str | None): The path to the image in the ome_zarr file.
379
+ If None, the first level will be used.
279
380
  pixel_size (PixelSize | None): The pixel size of the image.
381
+ This is only used if path is None.
280
382
  strict (bool): Only used if the pixel size is provided. If True, the
281
383
  pixel size must match the image pixel size exactly. If False, the
282
384
  closest pixel size level will be returned.
283
385
  """
284
386
  image = self.get_image(path=path, pixel_size=pixel_size, strict=strict)
285
- masking_label = self.get_label(
286
- name=masking_label_name, path=path, pixel_size=pixel_size, strict=strict
387
+ masking_label, masking_table = self._find_matching_masking_label(
388
+ masking_label_name=masking_label_name,
389
+ masking_table_name=masking_table_name,
390
+ pixel_size=pixel_size,
287
391
  )
288
- if masking_table_name is None:
289
- masking_table = masking_label.build_masking_roi_table()
290
- else:
291
- masking_table = self.get_masking_roi_table(name=masking_table_name)
292
-
293
392
  return MaskedImage(
294
393
  group_handler=image._group_handler,
295
- path=masking_label.path,
394
+ path=image.path,
296
395
  meta_handler=image.meta_handler,
297
396
  label=masking_label,
298
397
  masking_roi_table=masking_table,
@@ -302,12 +401,12 @@ class OmeZarrContainer:
302
401
  self,
303
402
  store: StoreOrGroup,
304
403
  ref_path: str | None = None,
305
- shape: Collection[int] | None = None,
306
- labels: Collection[str] | None = None,
404
+ shape: Sequence[int] | None = None,
405
+ labels: Sequence[str] | None = None,
307
406
  pixel_size: PixelSize | None = None,
308
- axes_names: Collection[str] | None = None,
407
+ axes_names: Sequence[str] | None = None,
309
408
  name: str | None = None,
310
- chunks: Collection[int] | None = None,
409
+ chunks: Sequence[int] | None = None,
311
410
  dtype: str | None = None,
312
411
  copy_labels: bool = False,
313
412
  copy_tables: bool = False,
@@ -319,11 +418,11 @@ class OmeZarrContainer:
319
418
  store (StoreOrGroup): The Zarr store or group to create the image in.
320
419
  ref_path (str | None): The path to the reference image in
321
420
  the image container.
322
- shape (Collection[int] | None): The shape of the new image.
323
- labels (Collection[str] | None): The labels of the new image.
421
+ shape (Sequence[int] | None): The shape of the new image.
422
+ labels (Sequence[str] | None): The labels of the new image.
324
423
  pixel_size (PixelSize | None): The pixel size of the new image.
325
- axes_names (Collection[str] | None): The axes names of the new image.
326
- chunks (Collection[int] | None): The chunk shape of the new image.
424
+ axes_names (Sequence[str] | None): The axes names of the new image.
425
+ chunks (Sequence[int] | None): The chunk shape of the new image.
327
426
  dtype (str | None): The data type of the new image.
328
427
  name (str | None): The name of the new image.
329
428
  copy_labels (bool): Whether to copy the labels from the reference image.
@@ -541,7 +640,7 @@ class OmeZarrContainer:
541
640
  def get_masked_label(
542
641
  self,
543
642
  label_name: str,
544
- masking_label_name: str,
643
+ masking_label_name: str | None = None,
545
644
  masking_table_name: str | None = None,
546
645
  path: str | None = None,
547
646
  pixel_size: PixelSize | None = None,
@@ -551,7 +650,7 @@ class OmeZarrContainer:
551
650
 
552
651
  Args:
553
652
  label_name (str): The name of the label.
554
- masking_label_name (str): The name of the masking label.
653
+ masking_label_name (str | None): The name of the masking label.
555
654
  masking_table_name (str | None): The name of the masking table.
556
655
  path (str | None): The path to the image in the ome_zarr file.
557
656
  pixel_size (PixelSize | None): The pixel size of the image.
@@ -562,14 +661,11 @@ class OmeZarrContainer:
562
661
  label = self.get_label(
563
662
  name=label_name, path=path, pixel_size=pixel_size, strict=strict
564
663
  )
565
- masking_label = self.get_label(
566
- name=masking_label_name, path=path, pixel_size=pixel_size, strict=strict
664
+ masking_label, masking_table = self._find_matching_masking_label(
665
+ masking_label_name=masking_label_name,
666
+ masking_table_name=masking_table_name,
667
+ pixel_size=pixel_size,
567
668
  )
568
- if masking_table_name is None:
569
- masking_table = masking_label.build_masking_roi_table()
570
- else:
571
- masking_table = self.get_masking_roi_table(name=masking_table_name)
572
-
573
669
  return MaskedLabel(
574
670
  group_handler=label._group_handler,
575
671
  path=label.path,
@@ -582,11 +678,11 @@ class OmeZarrContainer:
582
678
  self,
583
679
  name: str,
584
680
  ref_image: Image | Label | None = None,
585
- shape: Collection[int] | None = None,
681
+ shape: Sequence[int] | None = None,
586
682
  pixel_size: PixelSize | None = None,
587
- axes_names: Collection[str] | None = None,
588
- chunks: Collection[int] | None = None,
589
- dtype: str | None = None,
683
+ axes_names: Sequence[str] | None = None,
684
+ chunks: Sequence[int] | None = None,
685
+ dtype: str = "uint32",
590
686
  overwrite: bool = False,
591
687
  ) -> "Label":
592
688
  """Create an empty OME-Zarr label from a reference image.
@@ -597,12 +693,12 @@ class OmeZarrContainer:
597
693
  name (str): The name of the new image.
598
694
  ref_image (Image | Label | None): A reference image that will be used
599
695
  to create the new image.
600
- shape (Collection[int] | None): The shape of the new image.
696
+ shape (Sequence[int] | None): The shape of the new image.
601
697
  pixel_size (PixelSize | None): The pixel size of the new image.
602
- axes_names (Collection[str] | None): The axes names of the new image.
698
+ axes_names (Sequence[str] | None): The axes names of the new image.
603
699
  For labels, the channel axis is not allowed.
604
- chunks (Collection[int] | None): The chunk shape of the new image.
605
- dtype (str | None): The data type of the new image.
700
+ chunks (Sequence[int] | None): The chunk shape of the new image.
701
+ dtype (str): The data type of the new label.
606
702
  overwrite (bool): Whether to overwrite an existing image.
607
703
 
608
704
  Returns:
@@ -667,9 +763,50 @@ def open_image(
667
763
  )
668
764
 
669
765
 
766
+ def open_label(
767
+ store: StoreOrGroup,
768
+ name: str | None = None,
769
+ path: str | None = None,
770
+ pixel_size: PixelSize | None = None,
771
+ strict: bool = True,
772
+ cache: bool = False,
773
+ mode: AccessModeLiteral = "r+",
774
+ ) -> Label:
775
+ """Open a single level label from an OME-Zarr Label group.
776
+
777
+ Args:
778
+ store (StoreOrGroup): The Zarr store or group to create the image in.
779
+ name (str | None): The name of the label. If None,
780
+ we will try to open the store as a multiscale label.
781
+ path (str | None): The path to the image in the ome_zarr file.
782
+ pixel_size (PixelSize | None): The pixel size of the image.
783
+ strict (bool): Only used if the pixel size is provided. If True, the
784
+ pixel size must match the image pixel size exactly. If False, the
785
+ closest pixel size level will be returned.
786
+ cache (bool): Whether to use a cache for the zarr group metadata.
787
+ mode (AccessModeLiteral): The access mode for the image. Defaults to "r+".
788
+
789
+ """
790
+ group_handler = ZarrGroupHandler(store, cache, mode)
791
+ if name is None:
792
+ label_meta_handler = find_label_meta_handler(group_handler)
793
+ path = label_meta_handler.meta.get_dataset(
794
+ path=path, pixel_size=pixel_size, strict=strict
795
+ ).path
796
+ return Label(group_handler, path, label_meta_handler)
797
+
798
+ labels_container = LabelsContainer(group_handler)
799
+ return labels_container.get(
800
+ name=name,
801
+ path=path,
802
+ pixel_size=pixel_size,
803
+ strict=strict,
804
+ )
805
+
806
+
670
807
  def create_empty_ome_zarr(
671
808
  store: StoreOrGroup,
672
- shape: Collection[int],
809
+ shape: Sequence[int],
673
810
  xy_pixelsize: float,
674
811
  z_spacing: float = 1.0,
675
812
  time_spacing: float = 1.0,
@@ -678,14 +815,14 @@ def create_empty_ome_zarr(
678
815
  z_scaling_factor: float = 1.0,
679
816
  space_unit: SpaceUnits = DefaultSpaceUnit,
680
817
  time_unit: TimeUnits = DefaultTimeUnit,
681
- axes_names: Collection[str] | None = None,
818
+ axes_names: Sequence[str] | None = None,
682
819
  name: str | None = None,
683
- chunks: Collection[int] | None = None,
820
+ chunks: Sequence[int] | None = None,
684
821
  dtype: str = "uint16",
685
822
  channel_labels: list[str] | None = None,
686
823
  channel_wavelengths: list[str] | None = None,
687
- channel_colors: Collection[str] | None = None,
688
- channel_active: Collection[bool] | None = None,
824
+ channel_colors: Sequence[str] | None = None,
825
+ channel_active: Sequence[bool] | None = None,
689
826
  overwrite: bool = False,
690
827
  version: NgffVersions = DefaultNgffVersion,
691
828
  ) -> OmeZarrContainer:
@@ -693,7 +830,7 @@ def create_empty_ome_zarr(
693
830
 
694
831
  Args:
695
832
  store (StoreOrGroup): The Zarr store or group to create the image in.
696
- shape (Collection[int]): The shape of the image.
833
+ shape (Sequence[int]): The shape of the image.
697
834
  xy_pixelsize (float): The pixel size in x and y dimensions.
698
835
  z_spacing (float, optional): The spacing between z slices. Defaults to 1.0.
699
836
  time_spacing (float, optional): The spacing between time points.
@@ -708,19 +845,19 @@ def create_empty_ome_zarr(
708
845
  DefaultSpaceUnit.
709
846
  time_unit (TimeUnits, optional): The unit of time. Defaults to
710
847
  DefaultTimeUnit.
711
- axes_names (Collection[str] | None, optional): The names of the axes.
848
+ axes_names (Sequence[str] | None, optional): The names of the axes.
712
849
  If None the canonical names are used. Defaults to None.
713
850
  name (str | None, optional): The name of the image. Defaults to None.
714
- chunks (Collection[int] | None, optional): The chunk shape. If None the shape
851
+ chunks (Sequence[int] | None, optional): The chunk shape. If None the shape
715
852
  is used. Defaults to None.
716
853
  dtype (str, optional): The data type of the image. Defaults to "uint16".
717
854
  channel_labels (list[str] | None, optional): The labels of the channels.
718
855
  Defaults to None.
719
856
  channel_wavelengths (list[str] | None, optional): The wavelengths of the
720
857
  channels. Defaults to None.
721
- channel_colors (Collection[str] | None, optional): The colors of the channels.
858
+ channel_colors (Sequence[str] | None, optional): The colors of the channels.
722
859
  Defaults to None.
723
- channel_active (Collection[bool] | None, optional): Whether the channels are
860
+ channel_active (Sequence[bool] | None, optional): Whether the channels are
724
861
  active. Defaults to None.
725
862
  overwrite (bool, optional): Whether to overwrite an existing image.
726
863
  Defaults to True.
@@ -768,14 +905,14 @@ def create_ome_zarr_from_array(
768
905
  z_scaling_factor: float = 1.0,
769
906
  space_unit: SpaceUnits = DefaultSpaceUnit,
770
907
  time_unit: TimeUnits = DefaultTimeUnit,
771
- axes_names: Collection[str] | None = None,
908
+ axes_names: Sequence[str] | None = None,
772
909
  channel_labels: list[str] | None = None,
773
910
  channel_wavelengths: list[str] | None = None,
774
911
  percentiles: tuple[float, float] | None = (0.1, 99.9),
775
- channel_colors: Collection[str] | None = None,
776
- channel_active: Collection[bool] | None = None,
912
+ channel_colors: Sequence[str] | None = None,
913
+ channel_active: Sequence[bool] | None = None,
777
914
  name: str | None = None,
778
- chunks: Collection[int] | None = None,
915
+ chunks: Sequence[int] | None = None,
779
916
  overwrite: bool = False,
780
917
  version: NgffVersions = DefaultNgffVersion,
781
918
  ) -> OmeZarrContainer:
@@ -798,10 +935,10 @@ def create_ome_zarr_from_array(
798
935
  DefaultSpaceUnit.
799
936
  time_unit (TimeUnits, optional): The unit of time. Defaults to
800
937
  DefaultTimeUnit.
801
- axes_names (Collection[str] | None, optional): The names of the axes.
938
+ axes_names (Sequence[str] | None, optional): The names of the axes.
802
939
  If None the canonical names are used. Defaults to None.
803
940
  name (str | None, optional): The name of the image. Defaults to None.
804
- chunks (Collection[int] | None, optional): The chunk shape. If None the shape
941
+ chunks (Sequence[int] | None, optional): The chunk shape. If None the shape
805
942
  is used. Defaults to None.
806
943
  channel_labels (list[str] | None, optional): The labels of the channels.
807
944
  Defaults to None.
@@ -809,9 +946,9 @@ def create_ome_zarr_from_array(
809
946
  channels. Defaults to None.
810
947
  percentiles (tuple[float, float] | None, optional): The percentiles of the
811
948
  channels. Defaults to None.
812
- channel_colors (Collection[str] | None, optional): The colors of the channels.
949
+ channel_colors (Sequence[str] | None, optional): The colors of the channels.
813
950
  Defaults to None.
814
- channel_active (Collection[bool] | None, optional): Whether the channels are
951
+ channel_active (Sequence[bool] | None, optional): Whether the channels are
815
952
  active. Defaults to None.
816
953
  overwrite (bool, optional): Whether to overwrite an existing image.
817
954
  Defaults to True.