ngio 0.1.3__py3-none-any.whl → 0.1.5__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.
@@ -823,9 +823,7 @@ class Dataset:
823
823
  raise ValueError("Spatial axes must have a unit.")
824
824
  if return_type not in SpaceUnits.allowed_names():
825
825
  raise ValueError(f"Invalid space unit {return_type}.")
826
- if isinstance(return_type, str):
827
- return_type = SpaceUnits(return_type)
828
- return return_type
826
+ return SpaceUnits(return_type)
829
827
 
830
828
  @property
831
829
  def pixel_size(self) -> PixelSize:
@@ -850,8 +848,7 @@ class Dataset:
850
848
  if len(types) == 0:
851
849
  return None
852
850
  elif len(types) == 1:
853
- assert isinstance(types[0], TimeUnits)
854
- return types[0]
851
+ return TimeUnits(types[0])
855
852
  else:
856
853
  raise ValueError("Multiple time axes found. Only one time axis is allowed.")
857
854
 
@@ -110,7 +110,13 @@ def vanilla_omero_v04_to_fractal(omero04: Omero04) -> Omero:
110
110
  for channel04 in omero04.channels:
111
111
  # Convert the window to a dictionary
112
112
  label = channel04.label
113
- wavelength_id = channel04.extra_fields.get("wavelength_id", label)
113
+
114
+ if "wavelength_id" in channel04.extra_fields:
115
+ # If the wavelength_id is present, pop it from the extra fields
116
+ # so that it is not added to the channel_visualisation
117
+ wavelength_id = channel04.extra_fields.pop("wavelength_id")
118
+ else:
119
+ wavelength_id = label
114
120
 
115
121
  if channel04.window is None:
116
122
  window04 = Window04(
@@ -161,6 +167,7 @@ def fractal_omero_to_vanilla_v04(omero: Omero) -> Omero04:
161
167
  color=channel.channel_visualisation.color,
162
168
  active=channel.channel_visualisation.active,
163
169
  window=window04,
170
+ wavelength_id=channel.wavelength_id,
164
171
  **channel.channel_visualisation.extra_fields,
165
172
  )
166
173
  list_channels04.append(channel04)
@@ -156,14 +156,17 @@ class TableGroup:
156
156
 
157
157
  list_of_tables = self._get_list_of_tables()
158
158
  self._validate_list_of_tables(list_of_tables=list_of_tables)
159
+
160
+ all_table_types = ["roi_table", "feature_table", "masking_roi_table"]
161
+
159
162
  if table_type is None:
160
163
  return list_of_tables
161
164
 
162
165
  else:
163
- if table_type not in ["roi_table", "feature_table", "masking_roi_table"]:
166
+ if table_type not in all_table_types:
164
167
  raise ValueError(
165
168
  f"Table type {table_type} not recognized. "
166
- " Allowed values are: 'roi', 'feature', 'masking_roi'."
169
+ f" Allowed values are: {all_table_types}"
167
170
  )
168
171
  list_of_typed_tables = []
169
172
  for table_name in list_of_tables:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngio
3
- Version: 0.1.3
3
+ Version: 0.1.5
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
@@ -13,12 +13,12 @@ ngio/io/_zarr_array_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
13
13
  ngio/io/_zarr_group_utils.py,sha256=-cqgxQBvSqPhy5m7iXADOCji3IiEmCgc7zOLeJW5fYw,1754
14
14
  ngio/iterators/__init__.py,sha256=-jQ5h6oNftLKtiHDru8nPOrR3x8H1rMo85hzvqkhxmw,29
15
15
  ngio/ngff_meta/__init__.py,sha256=HhtHzjjk55gaHYbjiHoHRyYmOs1QZgBdWeCBb7O19Vo,560
16
- ngio/ngff_meta/fractal_image_meta.py,sha256=VfRBEhj1PrxF5OReiKhXhO1BAnA5NUGHyY_xZvIHwNw,43472
16
+ ngio/ngff_meta/fractal_image_meta.py,sha256=yc97iEGj5VjaCWv0Md94b5I2p9qzx94DMu_HlyKmrmg,43353
17
17
  ngio/ngff_meta/meta_handler.py,sha256=YDqOl-UUzE-flqC2EXGbJc-ctqZsULsZzA0Xj6X7XkM,2588
18
18
  ngio/ngff_meta/utils.py,sha256=eZSlm1-XJAGiThSol8RW7a_61Crj91f9vXbBGssWnhk,7978
19
19
  ngio/ngff_meta/v04/__init__.py,sha256=zlIL9-R3fNT_mgrOxE51dGyhnJlZ1UX0uRNeEl8WuRM,239
20
20
  ngio/ngff_meta/v04/specs.py,sha256=cjdMlL8L8Sbk-cGq5J3-wgOxQ9zr3r3u2q09fDI11kM,4256
21
- ngio/ngff_meta/v04/zarr_utils.py,sha256=ZCheqDpuaRqxlJCn3Q6igszbvw3X_Nr4qAp-RA-NaT0,11567
21
+ ngio/ngff_meta/v04/zarr_utils.py,sha256=02ISrsAGIXB1iLfcXPpqDljDlp0vC8Y_MyL5c016FY8,11859
22
22
  ngio/pipes/__init__.py,sha256=Ypt9bCqrk0qSg81GTBNqH5oljMg2rQPwyOWVZRKzaYg,299
23
23
  ngio/pipes/_slicer_transforms.py,sha256=UyN_aeAg-mtO9wsbqcvUIvnV5PJFTbj8AUmegMsF05k,5812
24
24
  ngio/pipes/_transforms.py,sha256=S7PqIwyf10i1cjQ-lKcJLr7YLfW2zKJKGf6DKKP3bTA,1067
@@ -27,7 +27,7 @@ ngio/pipes/data_pipe.py,sha256=SBe-3kTgbHyvFC2lVYyVZj12JazmHCx9QaTDZW1PNxU,1907
27
27
  ngio/tables/__init__.py,sha256=kedgmeeFVxBAJACoZ1yxfoyTmlmI1HCBWFhgyprbNWI,260
28
28
  ngio/tables/_ad_reader.py,sha256=OQJ3ZwS0wMedlSjz-wQuovIDBojnHRk2Qhq6FL29248,2677
29
29
  ngio/tables/_utils.py,sha256=GFOROQUubpYiZMSJ1tdqUWZGBcXAXGdf18iK2_oj8-0,10236
30
- ngio/tables/tables_group.py,sha256=idcdCAT517ZzoGG6fwRc-yLfBjsfAGXDwg9m-bSdWqM,8603
30
+ ngio/tables/tables_group.py,sha256=DFSDVQz6dYdvI00sKXEeDG7FOX1vAWXiHDDVwEfxL9I,8633
31
31
  ngio/tables/v1/__init__.py,sha256=vwJwo3lSpp6feGcwbn6lWivD1MJ_A8Py7WFsL40xUs0,308
32
32
  ngio/tables/v1/_generic_table.py,sha256=sW9fIyfZZt7QJclFzgWrMFSnCk7gKTP5Kj2atIKi6oA,6084
33
33
  ngio/tables/v1/feature_tables.py,sha256=piC6_eOGOt9IyzXWYqHlR09v0z9Ywm1o8gsdEAsEWts,5892
@@ -38,7 +38,7 @@ ngio/utils/_common_types.py,sha256=ylo6RfCyKVyXPx1Mz7WAwFfz8F85R9yd2_TPlRGRUyo,1
38
38
  ngio/utils/_errors.py,sha256=rLy9LOFkaEmsSD0-nToKUrXY1ZuPfcpcGpmeHVSnTNg,583
39
39
  ngio/utils/_logger.py,sha256=zvFG-Ta3ZIJxTyY93zYoPGp2A6TTUf7mSO0zr_uFy4A,837
40
40
  ngio/utils/_pydantic_utils.py,sha256=uN5-76cjE3bvV8GvLX62fpxoRi8GOsZu6K5aynGH1bY,1711
41
- ngio-0.1.3.dist-info/METADATA,sha256=H75ePMg5vNzlZ2KGAmblELVRXevDwxOqMDwgJaIZpxU,5705
42
- ngio-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
43
- ngio-0.1.3.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
44
- ngio-0.1.3.dist-info/RECORD,,
41
+ ngio-0.1.5.dist-info/METADATA,sha256=foHqb5q_WPlk8-fJ2fnwBcirrAY_rbcT0NYPATqy7us,5705
42
+ ngio-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
43
+ ngio-0.1.5.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
44
+ ngio-0.1.5.dist-info/RECORD,,
File without changes