tiamat-python 0.1.10__tar.gz → 0.1.11__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 (48) hide show
  1. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/PKG-INFO +1 -1
  2. tiamat_python-0.1.11/README.rst +206 -0
  3. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/zarr.py +16 -26
  4. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat_python.egg-info/PKG-INFO +1 -1
  5. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat_python.egg-info/SOURCES.txt +1 -0
  6. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/LICENSE +0 -0
  7. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/README.md +0 -0
  8. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/pyproject.toml +0 -0
  9. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/setup.cfg +0 -0
  10. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/setup.py +0 -0
  11. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tests/test_metadata.py +0 -0
  12. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tests/test_package.py +0 -0
  13. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/__init__.py +0 -0
  14. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/array.py +0 -0
  15. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/cache.py +0 -0
  16. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/cli.py +0 -0
  17. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/constants.py +0 -0
  18. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/errors.py +0 -0
  19. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/io.py +0 -0
  20. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/metadata/__init__.py +0 -0
  21. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/metadata/dimensions.py +0 -0
  22. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/metadata/metadata.py +0 -0
  23. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/pipeline.py +0 -0
  24. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/__init__.py +0 -0
  25. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/factory.py +0 -0
  26. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/generic.py +0 -0
  27. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/memory.py +0 -0
  28. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/nifti.py +0 -0
  29. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/pipeline.py +0 -0
  30. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/processing.py +0 -0
  31. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/protocol.py +0 -0
  32. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/readers/stack.py +0 -0
  33. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/serialization.py +0 -0
  34. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/__init__.py +0 -0
  35. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/access.py +0 -0
  36. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/affine.py +0 -0
  37. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/axes.py +0 -0
  38. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/color.py +0 -0
  39. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/coordinates.py +0 -0
  40. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/dfield.py +0 -0
  41. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/metadata.py +0 -0
  42. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/normalization.py +0 -0
  43. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/protocol.py +0 -0
  44. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat/transformers/view.py +0 -0
  45. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat_python.egg-info/dependency_links.txt +0 -0
  46. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat_python.egg-info/entry_points.txt +0 -0
  47. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/tiamat_python.egg-info/requires.txt +0 -0
  48. {tiamat_python-0.1.10 → tiamat_python-0.1.11}/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.10
3
+ Version: 0.1.11
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:
@@ -0,0 +1,206 @@
1
+ .. image:: https://jugit.fz-juelich.de/inm-1/bda/software/data_access/tiamat/tiamat/-/raw/develop/assets/logo512.png
2
+ :height: 128px
3
+ :align: center
4
+
5
+ ========
6
+ tiamat
7
+ ========
8
+
9
+ ----
10
+
11
+ ````````````````````````````````````````````````````````````````
12
+ Tiled Image Access, Manipulation, and Analysis Toolkit
13
+ ````````````````````````````````````````````````````````````````
14
+
15
+ ----
16
+
17
+ **tiamat** is a modular Python toolkit for accessing, transforming, and exposing large scientific image datasets.
18
+ It provides a flexible, pluggable pipeline model that separates data access (*readers*), transformation (*transformers*), and delivery (*interfaces*) — allowing on-the-fly, tool-agnostic image workflows without data duplication or format conversion.
19
+
20
+ Supported outputs include NumPy arrays, Napari, Neuroglancer, OpenSeadragon, and FUSE-mounted virtual filesystems.
21
+
22
+ ----
23
+
24
+ ========================
25
+ 📑 Table of Contents
26
+ ========================
27
+
28
+ 1. `Quick Start <#quick-start>`_
29
+ 2. `Installation <#installation>`_
30
+ 3. `Core Concepts <#core-concepts>`_
31
+ 4. `Examples <#examples>`_
32
+ 5. `Development Guidelines <#development-guidelines>`_
33
+ 6. `Contributing <#contributing>`_
34
+ 7. `Data <#data>`_
35
+ 8. `Acknowledgements <#acknowledgements>`_
36
+ 9. `Contributors <#contributors>`_
37
+ 10. `License <#license>`_
38
+
39
+ ----
40
+
41
+ ==================
42
+ 🚀 Quick Start
43
+ ==================
44
+
45
+ .. quickstart-start
46
+
47
+ .. code-block:: python
48
+
49
+ from tiamat.pipeline import Pipeline
50
+ from tiamat.io import ImageAccessor
51
+ from tiamat.transformers.color import LUTTransformer
52
+
53
+ # Create a pipeline with fractional coordinate access and a rainbow colormap
54
+ pipeline = Pipeline(
55
+ image_transformers=[LUTTransformer(colormap="rainbow")]
56
+ )
57
+
58
+ # Request the central 50% of the image
59
+ accessor = ImageAccessor(x=(0.25, 0.75), y=(0.25, 0.75))
60
+ result = pipeline("example_image.tif", accessor=accessor)
61
+
62
+ # Get the transformed NumPy image and metadata
63
+ image = result.image
64
+ metadata = result.metadata
65
+
66
+ .. quickstart-end
67
+
68
+ ----
69
+
70
+ ==================
71
+ 📦 Installation
72
+ ==================
73
+
74
+ .. installation-start
75
+
76
+ Install the latest development version directly from GitLab:
77
+
78
+ .. code-block:: bash
79
+
80
+ pip install git+https://jugit.fz-juelich.de/inm-1/bda/software/data_access/tiamat/tiamat
81
+
82
+ .. installation-end
83
+
84
+ ----
85
+
86
+ ==================
87
+ 🧠 Core Concepts
88
+ ==================
89
+
90
+ .. coreconcepts-start
91
+
92
+ Tiamat defines a modular pipeline composed of:
93
+
94
+ - **Readers** – Load image data from formats like TIFF, NIfTI, HDF5, or memory arrays.
95
+ - **Transformers** – Apply dynamic, on-the-fly transformations (e.g., colormaps, axis reordering, tiling).
96
+ - **Interfaces** – Serve data to tools like Napari, Neuroglancer, OpenSeadragon, or directly as arrays.
97
+
98
+ This decoupled architecture allows you to:
99
+
100
+ - Build pipelines from reusable components
101
+ - Extend with custom readers or transformers
102
+ - Avoid costly format conversions
103
+
104
+ .. coreconcepts-end
105
+
106
+ ----
107
+
108
+ ============
109
+ 📁 Examples
110
+ ============
111
+
112
+ .. examples-start
113
+
114
+ See the ``examples/`` directory for usage demonstrations and pipeline configurations.
115
+
116
+ .. examples-end
117
+
118
+ ----
119
+
120
+ ==============================
121
+ 🛠️ Development Guidelines
122
+ ==============================
123
+
124
+ .. development-start
125
+
126
+ - Follow `PEP 561 <https://peps.python.org/pep-0561/>`_ type hinting
127
+ - Use `Google-style docstrings <https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings>`_
128
+ - Formatting: ``flake8`` with line length 120
129
+ - Tests: ``pytest`` unit tests
130
+ - Feature development follows ``git-flow``
131
+
132
+ .. development-end
133
+
134
+ ----
135
+
136
+ ==================
137
+ 🤝 Contributing
138
+ ==================
139
+
140
+ **We welcome contributions!**
141
+
142
+ .. contributing-start
143
+
144
+ - Fork the repository and work on a feature branch
145
+ - Submit a Merge Request (MR) into ``develop``
146
+ - All contributions are reviewed and tested before merging
147
+
148
+ .. contributing-end
149
+
150
+ This project follows the `git-flow workflow <https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow>`_.
151
+ Releases are merged into ``master`` from ``develop`` on a regular basis.
152
+
153
+ ----
154
+
155
+ ============
156
+ 📂 Data
157
+ ============
158
+
159
+ .. data-start
160
+
161
+ Some test and example datasets require ``git-lfs`` for download.
162
+
163
+ .. data-end
164
+
165
+ ----
166
+
167
+ ==================
168
+ 👥 Contributors
169
+ ==================
170
+
171
+ .. contributors-start
172
+
173
+ - Forschungszentrum Jülich, Institute of Neuroscience and Medicine (INM-1)
174
+ - Community contributors via GitLab merge requests
175
+
176
+ .. contributors-end
177
+
178
+ ----
179
+
180
+ ============
181
+ 📄 License
182
+ ============
183
+
184
+ .. license-start
185
+
186
+ Apache 2.0 – see `LICENSE <./LICENSE>`_ for details.
187
+
188
+ .. license-end
189
+
190
+ ----
191
+
192
+ ========================
193
+ 🙏 Acknowledgements
194
+ ========================
195
+
196
+ .. acknowledgements-start
197
+
198
+ This project received funding from the European Union's Horizon 2020 Research and Innovation Programme, grant agreement
199
+ 101147319 (EBRAINS 2.0 Project), the Helmholtz Association port-folio theme "Supercomputing and Modeling for the Human
200
+ Brain", the Helmholtz Association's Initiative and Networking Fund through the Helmholtz International BigBrain
201
+ Analytics and Learning Laboratory (HIBALL) under the Helmholtz International Lab grant agreement InterLabs-0015,
202
+ from HELMHOLTZ IMAGING, a platform of the Helmholtz Information & Data Science Incubator [X-BRAIN, grant number:
203
+ ZT-I-PF-4-061], and from the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under the National
204
+ Research Data Infrastructure – NFDI 46/1 – 501864659.
205
+
206
+ .. acknowledgements-end
@@ -275,22 +275,25 @@ class OmeZarrReader(ImageReader):
275
275
  return tuple([1.0] * len(axes))
276
276
  return tuple(scale_vec)
277
277
 
278
- @cached_property
279
- def scales(self) -> List[float]:
280
- # XY downsample factors per level (relative to level 0); fallback heuristic if XY unknown
281
- axes = self.axes_names
282
- y_idx = axes.index("y") if "y" in axes else None
278
+ @instance_cache
279
+ def _level_factors(self, level: int) -> List[float]:
283
280
  base = self._get_level_array(0).shape
284
- base_y = base[y_idx] if y_idx is not None else None
285
-
281
+ cur = self._get_level_array(level).shape
286
282
  factors: List[float] = []
287
- for i, _ in enumerate(self._datasets):
288
- a = self._get_level_array(i)
289
- if base_y is not None:
290
- f = base_y / float(a.shape[y_idx])
291
- factors.append(float(f))
283
+ spatial = {"z", "y", "x"}
284
+ for i, a in enumerate(self.axes_names):
285
+ if a in spatial:
286
+ factors.append(float(cur[i]) / float(base[i]))
292
287
  else:
293
- factors.append(1.0 if i == 0 else max(2.0, factors[-1] * 2))
288
+ factors.append(1.0)
289
+ return factors
290
+
291
+ @cached_property
292
+ def scales(self) -> List[float]:
293
+ factors = []
294
+ for lvl in range(len(self._datasets)):
295
+ factors.append(tuple(self._level_factors(lvl)[::-1]))
296
+
294
297
  return factors
295
298
 
296
299
  @instance_cache
@@ -311,19 +314,6 @@ class OmeZarrReader(ImageReader):
311
314
  order.append(self.axes_names.index(a))
312
315
  return order
313
316
 
314
- @instance_cache
315
- def _level_factors(self, level: int) -> List[float]:
316
- base = self._get_level_array(0).shape
317
- cur = self._get_level_array(level).shape
318
- factors: List[float] = []
319
- spatial = {"z", "y", "x"}
320
- for i, a in enumerate(self.axes_names):
321
- if a in spatial:
322
- factors.append(float(base[i]) / float(cur[i]))
323
- else:
324
- factors.append(1.0)
325
- return factors
326
-
327
317
  def _select_level_from_target(self, per_axis_target: List[float]) -> int:
328
318
  spatial_idx = self._spatial_indices
329
319
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tiamat-python
3
- Version: 0.1.10
3
+ Version: 0.1.11
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:
@@ -1,5 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
+ README.rst
3
4
  pyproject.toml
4
5
  setup.py
5
6
  tests/test_metadata.py
File without changes
File without changes
File without changes
File without changes