tiamat-python 0.1.17__tar.gz → 0.1.18__tar.gz

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 (51) hide show
  1. {tiamat_python-0.1.17/tiamat_python.egg-info → tiamat_python-0.1.18}/PKG-INFO +1 -1
  2. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/zarr.py +17 -4
  3. {tiamat_python-0.1.17 → tiamat_python-0.1.18/tiamat_python.egg-info}/PKG-INFO +1 -1
  4. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/LICENSE +0 -0
  5. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/README.md +0 -0
  6. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/README.rst +0 -0
  7. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/pyproject.toml +0 -0
  8. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/setup.cfg +0 -0
  9. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/setup.py +0 -0
  10. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tests/test_metadata.py +0 -0
  11. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tests/test_package.py +0 -0
  12. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tests/test_pipeline.py +0 -0
  13. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/__init__.py +0 -0
  14. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/array.py +0 -0
  15. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/cache.py +0 -0
  16. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/cli.py +0 -0
  17. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/constants.py +0 -0
  18. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/errors.py +0 -0
  19. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/io.py +0 -0
  20. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/metadata/__init__.py +0 -0
  21. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/metadata/dimensions.py +0 -0
  22. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/metadata/metadata.py +0 -0
  23. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/pipeline.py +0 -0
  24. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/__init__.py +0 -0
  25. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/factory.py +0 -0
  26. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/generic.py +0 -0
  27. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/memory.py +0 -0
  28. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/nifti.py +0 -0
  29. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/pipeline.py +0 -0
  30. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/processing.py +0 -0
  31. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/protocol.py +0 -0
  32. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/readers/stack.py +0 -0
  33. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/serialization.py +0 -0
  34. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/__init__.py +0 -0
  35. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/access.py +0 -0
  36. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/affine.py +0 -0
  37. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/axes.py +0 -0
  38. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/color.py +0 -0
  39. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/coordinates.py +0 -0
  40. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/dfield.py +0 -0
  41. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/intensity_mapping.py +0 -0
  42. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/mask.py +0 -0
  43. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/metadata.py +0 -0
  44. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/normalization.py +0 -0
  45. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/protocol.py +0 -0
  46. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat/transformers/view.py +0 -0
  47. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat_python.egg-info/SOURCES.txt +0 -0
  48. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat_python.egg-info/dependency_links.txt +0 -0
  49. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat_python.egg-info/entry_points.txt +0 -0
  50. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat_python.egg-info/requires.txt +0 -0
  51. {tiamat_python-0.1.17 → tiamat_python-0.1.18}/tiamat_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tiamat-python
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: Tiled Image Access, Manipulation, and Analysis Toolkit
5
5
  Author-email: "Big Data Analytics Group, Forschungszentrum Juelich, Institute of Neuroscience and Medicine (INM-1)" <inm1-bda@fz-juelich.de>
6
6
  License:
@@ -22,7 +22,7 @@ except Exception: # pragma: no cover
22
22
 
23
23
  from tiamat.cache import instance_cache
24
24
  from tiamat.io import ImageAccessor
25
- from tiamat.metadata import ImageMetadata
25
+ from tiamat.metadata import ImageMetadata, dimensions
26
26
  from tiamat.readers.protocol import ImageReader
27
27
 
28
28
  # retrieved from https://ngff.openmicroscopy.org/specifications/0.5/index.html#axes-metadata
@@ -212,7 +212,7 @@ class OmeZarrReader(ImageReader):
212
212
  image=arr,
213
213
  metadata=self.read_metadata(),
214
214
  accessor=accessor,
215
- image_scale=tuple(level_factors),
215
+ image_scale=self._to_spatial_meta(level_factors),
216
216
  )
217
217
 
218
218
  @instance_cache
@@ -346,9 +346,22 @@ class OmeZarrReader(ImageReader):
346
346
  raise TypeError(f"Cannot determine value range for dtype {dtype}")
347
347
  return info.min, info.max
348
348
 
349
+ def _to_spatial_meta(self, values: list[float]) -> tuple[float, ...]:
350
+ """
351
+ Project a per-axis vector onto the spatial ``(x, y, z)`` order.
352
+
353
+ ``values`` is in this reader's ``axes_names`` order (e.g. ``c, x, y, z``).
354
+ The rest of tiamat treats ``scale`` and ``spacing`` as spatial-only vectors
355
+ in ``META_DIMENSIONS`` order (see ``tiamat.metadata.dimensions``), so non-spatial
356
+ axes (channel, time) are dropped and the remaining ones reordered by name.
357
+ """
358
+ by_axis = dict(zip(self.axes_names, values))
359
+ meta_axes = (dimensions.X, dimensions.Y, dimensions.Z)
360
+ return tuple(by_axis[axis] for axis in meta_axes if axis in by_axis)
361
+
349
362
  @cached_property
350
363
  def pixel_spacing(self) -> tuple[float, ...]:
351
- return tuple(self._dataset_physical_scales(0))
364
+ return self._to_spatial_meta(self._dataset_physical_scales(0))
352
365
 
353
366
  def _scale_transform_for_dataset(self, level: int) -> list[float]:
354
367
  transforms = self._datasets[level].get("coordinateTransformations", [])
@@ -398,7 +411,7 @@ class OmeZarrReader(ImageReader):
398
411
  def scales(self) -> list[tuple[float, ...]]:
399
412
  factors = []
400
413
  for lvl in range(len(self._datasets)):
401
- factors.append(tuple(self._level_factors(lvl)[::-1]))
414
+ factors.append(self._to_spatial_meta(self._level_factors(lvl)))
402
415
  return factors
403
416
 
404
417
  @instance_cache
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tiamat-python
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: Tiled Image Access, Manipulation, and Analysis Toolkit
5
5
  Author-email: "Big Data Analytics Group, Forschungszentrum Juelich, Institute of Neuroscience and Medicine (INM-1)" <inm1-bda@fz-juelich.de>
6
6
  License:
File without changes
File without changes
File without changes
File without changes