ngio 0.2.5__py3-none-any.whl → 0.2.7__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.
ngio/hcs/plate.py CHANGED
@@ -399,7 +399,7 @@ class OmeZarrPlate:
399
399
  acquisition_id: int | None = None,
400
400
  acquisition_name: str | None = None,
401
401
  atomic: bool = False,
402
- ) -> StoreOrGroup | None:
402
+ ) -> str:
403
403
  """Add an image to an ome-zarr plate."""
404
404
  if image_path is not None:
405
405
  image_path = path_in_well_validation(path=image_path)
@@ -450,8 +450,8 @@ class OmeZarrPlate:
450
450
  meta_handler._group_handler.clean_cache()
451
451
 
452
452
  if image_path is not None:
453
- return group_handler.get_group(image_path, create_mode=True)
454
- return None
453
+ return f"{well_path}/{image_path}"
454
+ return well_path
455
455
 
456
456
  def atomic_add_image(
457
457
  self,
@@ -460,14 +460,14 @@ class OmeZarrPlate:
460
460
  image_path: str,
461
461
  acquisition_id: int | None = None,
462
462
  acquisition_name: str | None = None,
463
- ) -> StoreOrGroup:
463
+ ) -> str:
464
464
  """Parallel safe version of add_image."""
465
465
  if image_path is None:
466
466
  raise ValueError(
467
467
  "Image path cannot be None for atomic add_image. "
468
468
  "If your intent is to add a well, use add_well instead."
469
469
  )
470
- group = self._add_image(
470
+ path = self._add_image(
471
471
  row=row,
472
472
  column=column,
473
473
  image_path=image_path,
@@ -475,12 +475,7 @@ class OmeZarrPlate:
475
475
  acquisition_name=acquisition_name,
476
476
  atomic=True,
477
477
  )
478
- if group is None:
479
- raise ValueError(
480
- f"Some error occurred while adding image {image_path} "
481
- f"to well {row}{column}."
482
- )
483
- return group
478
+ return path
484
479
 
485
480
  def add_image(
486
481
  self,
@@ -489,14 +484,14 @@ class OmeZarrPlate:
489
484
  image_path: str,
490
485
  acquisition_id: int | None = None,
491
486
  acquisition_name: str | None = None,
492
- ) -> StoreOrGroup:
487
+ ) -> str:
493
488
  """Add an image to an ome-zarr plate."""
494
489
  if image_path is None:
495
490
  raise ValueError(
496
491
  "Image path cannot be None for atomic add_image. "
497
492
  "If your intent is to add a well, use add_well instead."
498
493
  )
499
- group = self._add_image(
494
+ path = self._add_image(
500
495
  row=row,
501
496
  column=column,
502
497
  image_path=image_path,
@@ -504,12 +499,7 @@ class OmeZarrPlate:
504
499
  acquisition_name=acquisition_name,
505
500
  atomic=False,
506
501
  )
507
- if group is None:
508
- raise ValueError(
509
- f"Some error occurred while adding image {image_path} "
510
- f"to well {row}{column}."
511
- )
512
- return group
502
+ return path
513
503
 
514
504
  def add_well(
515
505
  self,
@@ -344,7 +344,7 @@ class ChannelsMeta(BaseModel):
344
344
  _wavelength_id = _check_elements(wavelength_id, str)
345
345
  _wavelength_id = _check_unique(wavelength_id)
346
346
 
347
- _colors: Collection[str | NgioColors] = ["random"] * len(labels)
347
+ _colors: Collection[str | NgioColors | None] = [None] * len(labels)
348
348
  if isinstance(colors, Collection):
349
349
  _colors = _check_elements(colors, str | NgioColors)
350
350
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngio
3
- Version: 0.2.5
3
+ Version: 0.2.7
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,7 +10,7 @@ ngio/common/_roi.py,sha256=dq1iVT8-G_zWuxcYWJeHfviBSbPgsyKUcDL3Vg6jx6I,5122
10
10
  ngio/common/_slicer.py,sha256=AKpwXRncOmF9nhjKYma0C_41WqAgSv860beKGx-aw-0,3075
11
11
  ngio/common/_zoom.py,sha256=KsURa5VuixmpbAAY5-6obmuQV8vfiHKZqBxZDXvchpM,5473
12
12
  ngio/hcs/__init__.py,sha256=5oAYT_454WGhms97kxo8gS4_rKHtFf_x-9uu8M_VeVM,356
13
- ngio/hcs/plate.py,sha256=zmhHXRsoc4s_-bPccYCH9rqoYg419j-T-NF-OojXRZM,30509
13
+ ngio/hcs/plate.py,sha256=WmUw8qZgWUPBBTqtV8lh_7T0vtRzMkAmduM8b969Ni4,30082
14
14
  ngio/images/__init__.py,sha256=DYbXAdBgPxyjBRdJrWvU0UnBRI0gUMmx9KaJ-Bucvz4,533
15
15
  ngio/images/abstract_image.py,sha256=8PNQPZjiDz-pcTFXSJAVw7nUr4yL_iRwqDEUTKkAnp0,10266
16
16
  ngio/images/create.py,sha256=XYn30m_2OSZeHHASYHc3eK9u_gZIYy9wo6mGdRGaq5c,9473
@@ -22,7 +22,7 @@ ngio/ome_zarr_meta/__init__.py,sha256=oZ8PEsWM7U0KwzpsnvVfX9k4UfuTz5sZ8B6B9eY5hy
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=05NQukZG0nNvjzf8AKWGu7PhjhQcImGSAOK3D3Bg-Js,1786
24
24
  ngio/ome_zarr_meta/ngio_specs/_axes.py,sha256=Kqe9T7LWa_9o3UWS5uzALyyNluIhXxWhDGxWY4-GIo8,16707
25
- ngio/ome_zarr_meta/ngio_specs/_channels.py,sha256=ufZuYuTO5PJA1vcBrNAcuZCMgIEwF57buPloTHIzB1Q,14082
25
+ ngio/ome_zarr_meta/ngio_specs/_channels.py,sha256=piK_SZ1Oay2_f2Sq4BFMOadMYc2yI1itfH075qxFznc,14085
26
26
  ngio/ome_zarr_meta/ngio_specs/_dataset.py,sha256=hY8ogPPxvCgVg6k02t3zUr24lasYrvnxBd1iPEigdG4,5892
27
27
  ngio/ome_zarr_meta/ngio_specs/_ngio_hcs.py,sha256=uh345KQmEQtslIyMmLK9sB-NbjPYxi0Y9FuYIFhd3Rc,17465
28
28
  ngio/ome_zarr_meta/ngio_specs/_ngio_image.py,sha256=8E38Mgw-l0Ff1nkmCJIzo64G_paAVhM8xktUS_V5egY,17960
@@ -51,7 +51,7 @@ ngio/utils/_errors.py,sha256=pKQ12LUjQLYE1nUawemA5h7HsgznjaSvV1n2PQU33N0,759
51
51
  ngio/utils/_fractal_fsspec_store.py,sha256=7qoGLiLi8JQFh9Ej_z5WNwQQuWrujb0f6p9nj8ocsS8,548
52
52
  ngio/utils/_logger.py,sha256=HIuqD_2ShfFGDswBddcouStbKfL0Vz_ah8cAIFGhbS8,888
53
53
  ngio/utils/_zarr_utils.py,sha256=qOI-HL2HsfFLCj_yxsTR-aq4oHpSqS9KR13aEIvhGDY,13593
54
- ngio-0.2.5.dist-info/METADATA,sha256=CfWGOhGP41xxTqsvNvwDeA4nT2hjeMS6yMJ4xHalXqo,5215
55
- ngio-0.2.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
- ngio-0.2.5.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
57
- ngio-0.2.5.dist-info/RECORD,,
54
+ ngio-0.2.7.dist-info/METADATA,sha256=DI47tFwc8OP-d0nuqNHv4pSUhg15pJiU2uUDmiq9Q-U,5215
55
+ ngio-0.2.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
+ ngio-0.2.7.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
57
+ ngio-0.2.7.dist-info/RECORD,,
File without changes