ngio 0.2.8__py3-none-any.whl → 0.2.10__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.
@@ -2,15 +2,12 @@
2
2
 
3
3
  from collections.abc import Collection
4
4
  from enum import Enum
5
- from logging import Logger
6
5
  from typing import Literal, TypeVar
7
6
 
8
7
  import numpy as np
9
8
  from pydantic import BaseModel, ConfigDict, Field
10
9
 
11
- from ngio.utils import NgioValidationError, NgioValueError
12
-
13
- logger = Logger(__name__)
10
+ from ngio.utils import NgioValidationError, NgioValueError, ngio_logger
14
11
 
15
12
  T = TypeVar("T")
16
13
 
@@ -102,20 +99,20 @@ class Axis(BaseModel):
102
99
  def implicit_type_cast(self, cast_type: AxisType) -> "Axis":
103
100
  unit = self.unit
104
101
  if self.axis_type != cast_type:
105
- logger.warning(
102
+ ngio_logger.warning(
106
103
  f"Axis {self.on_disk_name} has type {self.axis_type}. "
107
104
  f"Casting to {cast_type}."
108
105
  )
109
106
 
110
107
  if cast_type == AxisType.time and unit is None:
111
- logger.warning(
108
+ ngio_logger.warning(
112
109
  f"Time axis {self.on_disk_name} has unit {self.unit}. "
113
110
  f"Casting to {DefaultSpaceUnit}."
114
111
  )
115
112
  unit = DefaultTimeUnit
116
113
 
117
114
  if cast_type == AxisType.space and unit is None:
118
- logger.warning(
115
+ ngio_logger.warning(
119
116
  f"Space axis {self.on_disk_name} has unit {unit}. "
120
117
  f"Casting to {DefaultSpaceUnit}."
121
118
  )
@@ -321,7 +321,8 @@ class MaskingRoiTableV1(_GenericRoiTableV1[MaskingRoiTableV1Meta]):
321
321
  """Create a new ROI table."""
322
322
  meta = MaskingRoiTableV1Meta()
323
323
  if reference_label is not None:
324
- meta.region = RegionMeta(path=reference_label)
324
+ path = f"../labels/{reference_label}"
325
+ meta.region = RegionMeta(path=path)
325
326
  super().__init__(meta, rois)
326
327
 
327
328
  def __repr__(self) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngio
3
- Version: 0.2.8
3
+ Version: 0.2.10
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
@@ -21,7 +21,7 @@ ngio/images/ome_zarr_container.py,sha256=-9bbzNtsVAjU1X_h78Lr5LOV0JXtOiWVWqmt3DF
21
21
  ngio/ome_zarr_meta/__init__.py,sha256=oZ8PEsWM7U0KwzpsnvVfX9k4UfuTz5sZ8B6B9eY5hyY,1193
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
- ngio/ome_zarr_meta/ngio_specs/_axes.py,sha256=Kqe9T7LWa_9o3UWS5uzALyyNluIhXxWhDGxWY4-GIo8,16707
24
+ ngio/ome_zarr_meta/ngio_specs/_axes.py,sha256=tHtx6NfBgDcCgDk9CosjIjw1KZJ2qi0i_eoLgrdiEWw,16681
25
25
  ngio/ome_zarr_meta/ngio_specs/_channels.py,sha256=2L-HM9K1Xu4qRI2MiXPqgCuHdCBRydEW1StThcqEuvY,15120
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
@@ -44,14 +44,14 @@ ngio/tables/backends/_utils.py,sha256=D0zI8_b6HEBZ2ER-80JvEEh_2-aCC1kpyKJGDPBPHc
44
44
  ngio/tables/v1/__init__.py,sha256=XWi6f_KbjbX45Ku-7uymJRSTVWyFAPAAEp_TXDeZV4s,314
45
45
  ngio/tables/v1/_feature_table.py,sha256=2pZEENyZAmn_Awezu8VLGq90d-J7aXd6Ry8gNNR0wAQ,6104
46
46
  ngio/tables/v1/_generic_table.py,sha256=O2fu8k_TjhWEZtJxlU3Uj7ZTZnc75vLlvjw5lweSnd8,5710
47
- ngio/tables/v1/_roi_table.py,sha256=zGoISSC5q0UHyc0hcxfm2xpw2W6wUocoYctdi5nMmwg,11460
47
+ ngio/tables/v1/_roi_table.py,sha256=_0sBUuVuH_XBZlPiWq1RK2_cgXdyu_Y9jPyhzTBUWCE,11499
48
48
  ngio/utils/__init__.py,sha256=r3nuLWgp6-cQlS4ODjYSBrfgdTLkCOVke9jKbn1NpkA,1129
49
49
  ngio/utils/_datasets.py,sha256=EdYJHIifpRou4f43dIuiKsdxe4K6FaeS4f1_e_EYrcI,1727
50
50
  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.8.dist-info/METADATA,sha256=Rf7imDRysf67wo02l22A8DX2TjeWQLndDdzPp48YncY,5215
55
- ngio-0.2.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
- ngio-0.2.8.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
57
- ngio-0.2.8.dist-info/RECORD,,
54
+ ngio-0.2.10.dist-info/METADATA,sha256=zKKD86qM9mMDMwDZGdn3fYFq7uLO8D5UuobZEFCuyVE,5216
55
+ ngio-0.2.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
56
+ ngio-0.2.10.dist-info/licenses/LICENSE,sha256=UgN_a1QCeNh9rZWfz-wORQFxE3elQzLWPQaoK6N6fxQ,1502
57
+ ngio-0.2.10.dist-info/RECORD,,
File without changes