eubi-bridge-lite 0.1.4__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 (83) hide show
  1. eubi_bridge_lite-0.1.4/LICENSE +21 -0
  2. eubi_bridge_lite-0.1.4/PKG-INFO +485 -0
  3. eubi_bridge_lite-0.1.4/README.md +452 -0
  4. eubi_bridge_lite-0.1.4/eubi_bridge/__init__.py +65 -0
  5. eubi_bridge_lite-0.1.4/eubi_bridge/cli.py +135 -0
  6. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/__init__.py +0 -0
  7. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/aggregative_conversion_base.py +465 -0
  8. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/conversion_worker.py +1197 -0
  9. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/dispatcher.py +757 -0
  10. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/fileset_io.py +837 -0
  11. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/metadata_update_worker.py +70 -0
  12. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/updater.py +68 -0
  13. eubi_bridge_lite-0.1.4/eubi_bridge/conversion/worker_init.py +263 -0
  14. eubi_bridge_lite-0.1.4/eubi_bridge/core/__init__.py +0 -0
  15. eubi_bridge_lite-0.1.4/eubi_bridge/core/config_models.py +1240 -0
  16. eubi_bridge_lite-0.1.4/eubi_bridge/core/czi_reader.py +738 -0
  17. eubi_bridge_lite-0.1.4/eubi_bridge/core/data_manager.py +2693 -0
  18. eubi_bridge_lite-0.1.4/eubi_bridge/core/h5_reader.py +122 -0
  19. eubi_bridge_lite-0.1.4/eubi_bridge/core/ims_reader.py +159 -0
  20. eubi_bridge_lite-0.1.4/eubi_bridge/core/memory.py +176 -0
  21. eubi_bridge_lite-0.1.4/eubi_bridge/core/metadata_extractors.py +284 -0
  22. eubi_bridge_lite-0.1.4/eubi_bridge/core/micro_source.py +652 -0
  23. eubi_bridge_lite-0.1.4/eubi_bridge/core/ozp_writer.py +263 -0
  24. eubi_bridge_lite-0.1.4/eubi_bridge/core/pff_reader.py +205 -0
  25. eubi_bridge_lite-0.1.4/eubi_bridge/core/pyramid_reader.py +119 -0
  26. eubi_bridge_lite-0.1.4/eubi_bridge/core/reader_interface.py +176 -0
  27. eubi_bridge_lite-0.1.4/eubi_bridge/core/readers.py +282 -0
  28. eubi_bridge_lite-0.1.4/eubi_bridge/core/sample_channels.py +108 -0
  29. eubi_bridge_lite-0.1.4/eubi_bridge/core/scale.py +298 -0
  30. eubi_bridge_lite-0.1.4/eubi_bridge/core/tiff_reader.py +573 -0
  31. eubi_bridge_lite-0.1.4/eubi_bridge/core/writers.py +1661 -0
  32. eubi_bridge_lite-0.1.4/eubi_bridge/ebridge.py +2312 -0
  33. eubi_bridge_lite-0.1.4/eubi_bridge/mp_logging_setup.py +43 -0
  34. eubi_bridge_lite-0.1.4/eubi_bridge/ngff/__init__.py +0 -0
  35. eubi_bridge_lite-0.1.4/eubi_bridge/ngff/defaults.py +67 -0
  36. eubi_bridge_lite-0.1.4/eubi_bridge/ngff/multiscales.py +1413 -0
  37. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/__init__.py +1 -0
  38. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/app.py +77 -0
  39. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/core/__init__.py +1 -0
  40. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/core/batch.py +1235 -0
  41. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/core/config.py +64 -0
  42. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/core/file_service.py +298 -0
  43. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/eurobioimaging-logo.webp +0 -0
  44. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/main_window.py +185 -0
  45. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/pages/__init__.py +1 -0
  46. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/pages/convert_page.py +2920 -0
  47. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/pages/inspect_page.py +647 -0
  48. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/server/config_manager.py +584 -0
  49. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/server/zarr_plane_server.py +2079 -0
  50. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/settings_dialog.py +361 -0
  51. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/__init__.py +1 -0
  52. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/batch_cell_editor.py +517 -0
  53. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/channel_panel.py +298 -0
  54. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/grouped_header.py +176 -0
  55. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/image_widget.py +321 -0
  56. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/log_widget.py +162 -0
  57. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/sidebar_browser.py +733 -0
  58. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/widgets/zarr_viewer.py +747 -0
  59. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/workers/__init__.py +1 -0
  60. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/workers/_conv_subprocess.py +136 -0
  61. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/workers/conversion_worker.py +406 -0
  62. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/workers/minmax_worker.py +95 -0
  63. eubi_bridge_lite-0.1.4/eubi_bridge/qt_gui/workers/render_worker.py +170 -0
  64. eubi_bridge_lite-0.1.4/eubi_bridge/utils/__init__.py +86 -0
  65. eubi_bridge_lite-0.1.4/eubi_bridge/utils/array_utils.py +507 -0
  66. eubi_bridge_lite-0.1.4/eubi_bridge/utils/capabilities.py +75 -0
  67. eubi_bridge_lite-0.1.4/eubi_bridge/utils/json_utils.py +83 -0
  68. eubi_bridge_lite-0.1.4/eubi_bridge/utils/jvm_manager.py +381 -0
  69. eubi_bridge_lite-0.1.4/eubi_bridge/utils/logging_config.py +71 -0
  70. eubi_bridge_lite-0.1.4/eubi_bridge/utils/metadata_utils.py +522 -0
  71. eubi_bridge_lite-0.1.4/eubi_bridge/utils/misc_utils.py +311 -0
  72. eubi_bridge_lite-0.1.4/eubi_bridge/utils/optional_deps.py +55 -0
  73. eubi_bridge_lite-0.1.4/eubi_bridge/utils/path_utils.py +787 -0
  74. eubi_bridge_lite-0.1.4/eubi_bridge/utils/storage_utils.py +74 -0
  75. eubi_bridge_lite-0.1.4/eubi_bridge/utils/unit_converter.py +100 -0
  76. eubi_bridge_lite-0.1.4/eubi_bridge_lite.egg-info/PKG-INFO +485 -0
  77. eubi_bridge_lite-0.1.4/eubi_bridge_lite.egg-info/SOURCES.txt +81 -0
  78. eubi_bridge_lite-0.1.4/eubi_bridge_lite.egg-info/dependency_links.txt +1 -0
  79. eubi_bridge_lite-0.1.4/eubi_bridge_lite.egg-info/entry_points.txt +3 -0
  80. eubi_bridge_lite-0.1.4/eubi_bridge_lite.egg-info/requires.txt +17 -0
  81. eubi_bridge_lite-0.1.4/eubi_bridge_lite.egg-info/top_level.txt +1 -0
  82. eubi_bridge_lite-0.1.4/pyproject.toml +54 -0
  83. eubi_bridge_lite-0.1.4/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Euro-BioImaging
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,485 @@
1
+ Metadata-Version: 2.4
2
+ Name: eubi-bridge-lite
3
+ Version: 0.1.4
4
+ Summary: Convert microscopy images to OME-Zarr: eubi-bridge without Java and Bio-Formats.
5
+ Author-email: Bugra Özdemir <bugraa.ozdemir@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Euro-BioImaging/EuBI-Bridge
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Programming Language :: Python :: 3.12
10
+ Classifier: Programming Language :: Python :: 3.13
11
+ Classifier: Programming Language :: Python :: 3.14
12
+ Requires-Python: >=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: numpy>=1.24
16
+ Requires-Dist: zarr<3.2,>=3.0
17
+ Requires-Dist: tensorstore>=0.0.0
18
+ Requires-Dist: tifffile<2026,>=2025.5.21
19
+ Requires-Dist: micro-reader>=0.0.1
20
+ Requires-Dist: ome_zarr_pyramid[remote]>=0.1.0
21
+ Requires-Dist: h5py
22
+ Requires-Dist: ome-types
23
+ Requires-Dist: pydantic>=2.11.7
24
+ Requires-Dist: pandas
25
+ Requires-Dist: natsort>=0.0.0
26
+ Requires-Dist: psutil>=7.0.0
27
+ Requires-Dist: rich>=14.1.0
28
+ Requires-Dist: fire>=0.0.0
29
+ Requires-Dist: s3fs>=0.0.0
30
+ Requires-Dist: PyQt6<=6.9.1,>=6.6.0
31
+ Requires-Dist: pillow
32
+ Dynamic: license-file
33
+
34
+ # EuBI-Bridge
35
+
36
+ [![Documentation](https://img.shields.io/badge/documentation-online-green)](https://euro-bioimaging.github.io/EuBI-Bridge/)
37
+
38
+ EuBI-Bridge is a tool for **distributed conversion of microscopy image collections to OME-Zarr**. Conversion can be performed through either a command-line interface (CLI) or a graphical user interface (GUI). The installation described below provides access to both interfaces.
39
+
40
+ A key feature of EuBI-Bridge is **aggregative conversion**, which combines multiple input images along user-specified axes into a single OME-Zarr container. This is particularly useful when images belong to the same multidimensional dataset but are stored as separate, unlinked files. By aggregating these files during conversion, EuBI-Bridge can reconstruct the intended multidimensional dataset.
41
+
42
+ EuBI-Bridge is built on several powerful libraries, including `zarr`, `tensorstore` and `dask`, among others.
43
+
44
+ Input files are read with [micro-reader](https://pypi.org/project/micro-reader/) by default. It reads the common microscopy formats without Java. If a file cannot be read by `micro-reader`, EuBI-Bridge falls back to other readers (such as `bioio`- and `Bio-Formats`-based readers) for that particular file. Java only starts when this happens.
45
+
46
+
47
+ ## Installation
48
+
49
+ **Important: EuBI-Bridge is currently only compatible with Python 3.11 or 3.12 due to conflicting dependencies.
50
+ We are working on supporting a wider range of Python versions in future releases.**
51
+
52
+ ### Recommended: conda
53
+
54
+ The recommended way to install EuBI-Bridge is in a conda environment. This
55
+ route also installs Qt, so the graphical interface works without any further
56
+ setup:
57
+
58
+ ```bash
59
+ mamba create -n eubizarr openjdk=11.* maven python=3.12 pyqt6=6.8.1
60
+ ```
61
+
62
+ Then install EuBI-Bridge via pip in the conda environment:
63
+
64
+ ```bash
65
+ conda activate eubizarr
66
+ pip install --no-cache-dir "eubi-bridge==0.1.4"
67
+ eubi reset_config # see "After installing or upgrading" below
68
+ ```
69
+
70
+ ### Alternative: pip only
71
+
72
+ Installing into a plain virtual environment also works, provided your Python is
73
+ version 3.11 or 3.12:
74
+
75
+ ```bash
76
+ python -m venv venv # Python must be either version 3.11 or 3.12.
77
+ source venv/bin/activate
78
+ pip install "eubi-bridge==0.1.4" # installs both GUI and CLI
79
+ eubi reset_config # see "After installing or upgrading" below
80
+ ```
81
+
82
+ **On Linux this installs the graphical interface but not the Qt system
83
+ libraries it needs at runtime**, so the graphical interface may fail to start. See
84
+ [Linux: the GUI does not start](#linux-the-gui-does-not-start) below for the fix.
85
+ The command-line interface is unaffected.
86
+
87
+ ### After installing or upgrading
88
+
89
+ Run this once:
90
+
91
+ ```bash
92
+ eubi reset_config
93
+ ```
94
+
95
+ EuBI-Bridge keeps your settings in a configuration file. That file is written the
96
+ first time you run the tool, and later versions do not change it. So if you have
97
+ used EuBI-Bridge before, you keep the old defaults until you reset it.
98
+
99
+ - Resetting gives you the current defaults. For example, files are now read with
100
+ micro-reader, and Java only starts if a file needs Bio-Formats.
101
+ - It overwrites your default settings. Run `eubi show_config` first if you
102
+ want to note them down. Configurations you saved under a name are kept.
103
+ - On a fresh install it does no harm.
104
+
105
+ Some settings have new names. The old names still work.
106
+
107
+ - `max_workers` is now `max_processes`.
108
+ - `max_concurrency` is now `max_threads`.
109
+ - `micro_read_concurrency` is now `decode_threads`.
110
+ - `bf_read_concurrency` is now `bioformats_threads`.
111
+ - `memory_per_worker` is now `slurm_worker_memory` (SLURM only). On your own computer,
112
+ use `memory_budget` (see [Speed and memory](#speed-and-memory)).
113
+
114
+ ### Troubleshooting
115
+
116
+ #### Linux: the GUI does not start
117
+
118
+ This applies to the pip-only route. On Linux, `pip` installs PyQt6 but not the
119
+ system libraries it needs at runtime, so the `eubi-gui` command (which is run to launch the GUI) may stop with an error such
120
+ as:
121
+
122
+ ```bash
123
+ EuBI-Bridge could not start its graphical interface: libEGL.so.1: cannot open shared object file
124
+ ```
125
+
126
+ Install the Qt system libraries with your package manager:
127
+
128
+ ```bash
129
+ # Debian / Ubuntu
130
+ sudo apt install libegl1 libgl1 libxkbcommon-x11-0 libdbus-1-3 libxcb-cursor0
131
+
132
+ # Fedora / RHEL
133
+ sudo dnf install mesa-libEGL mesa-libGL libxkbcommon-x11 dbus-libs xcb-util-cursor
134
+ ```
135
+
136
+ If you cannot install system packages, use the recommended conda route instead:
137
+ `mamba create ... pyqt6=6.8.1` brings its own Qt libraries and avoids this
138
+ problem entirely. The `eubi` command-line interface needs none of them and
139
+ works either way.
140
+
141
+ #### Building wheel errors
142
+
143
+ If you receive a `Building wheel` error such as:
144
+
145
+ ```bash
146
+ Building wheel for ... error
147
+ error: subprocess-exited-with-error
148
+
149
+ × python setup.py bdist_wheel did not run successfully.
150
+ │ exit code: 1
151
+ ```
152
+ then try the following:
153
+
154
+ ```bash
155
+ # In the `eubizarr` environment
156
+ mamba install cmake zlib boost # preinstall dependencies that can help build from source
157
+ pip install --no-cache-dir "eubi-bridge==0.1.4" # try installing again with the dependencies available
158
+ eubi reset_config
159
+ ```
160
+
161
+ ## Documentation
162
+
163
+ Find the documentation for EuBI-Bridge [here](https://euro-bioimaging.github.io/EuBI-Bridge/)
164
+
165
+ ## Graphical interface
166
+
167
+ Launch the graphical interface by running `eubi-gui` in the terminal. The four short videos below walk you through one complete job: converting several images to OME-Zarr, and then inspecting one of the outputs.
168
+
169
+ The videos cover the common scenario: one-to-one conversion from a collection of files. More advanced features such as aggregative conversions (concatenation of multiple files), editable batch tables, custom configuration files and editing output metadata are all supported by the interface but not yet demonstrated in the videos; demos for those will be provided soon. In the meantime the [documentation](https://euro-bioimaging.github.io/EuBI-Bridge/) describes the API, and every control in the interface carries a tooltip.
170
+
171
+ ### 1. Selecting input and output folders
172
+
173
+ Navigate to your images, filter them with include and exclude patterns (which accept star `*` expressions), tick the files to be converted, and choose where the OME-Zarr output should be written.
174
+
175
+ https://github.com/user-attachments/assets/0a474606-d443-40f0-8f36-23053c61cc81
176
+
177
+ ### 2. Choosing conversion parameters
178
+
179
+ Work through the parameter tabs. The tabs cover different parameter categories ranging from resource allocation, through reader options, chunking, sharding and compression, downscaling, channel and pixel metadata overrides, and more. Each field explains itself on hover, and settings can be saved to a configuration file for reuse. The Cluster tab sets how many images and threads run at once and how much memory the conversion may use (see [Speed and memory](#speed-and-memory)).
180
+
181
+ https://github.com/user-attachments/assets/c7e3ab3b-37cf-4565-a37a-f2b6fa985961
182
+
183
+ ### 3. Running a conversion
184
+
185
+ Start the job and watch it progress. The log reports each file as it is read, converted and downscaled, so a failure points at the file that caused it.
186
+
187
+ https://github.com/user-attachments/assets/3492e69d-ea83-4363-b3c7-90a9c00be76c
188
+
189
+ ### 4. Inspecting the result
190
+
191
+ Switch to the Inspect tab to open one of the converted OME-Zarr stores from the list in the sidebar. In the Inspect/Metadata path, find full OME-Zarr metadata, including axis names, units, pixel sizes, the chunk and shard layout and compression per pyramid level. Pixel sizes and units can be corrected here and saved back into the OME-Zarr. Switch to the Inspect/Viewer path and visualise the OME-Zarr. Adjust a specific resolution layer via Zoom slider. Browse through the z slices or timepoints. Pan the frame of view using the left mouse button. Add or remove specific channels, and adjust the channel metadata such as colours, viewed pixel range and channel names. The updated visualisation metadata can also be saved back into the OME-Zarr.
192
+
193
+ https://github.com/user-attachments/assets/08149eb8-1cb6-403b-81a9-668ce4637f24
194
+
195
+ The same recordings are attached to the
196
+ [v0.1.2-media release](https://github.com/Euro-BioImaging/EuBI-Bridge/releases/tag/v0.1.2-media) for viewing outside GitHub. They are not part of
197
+ the repository, so cloning or pip-installing the package does not download them.
198
+
199
+ ## Command line interface
200
+
201
+ ### Unary Conversion
202
+
203
+ Given a dataset structured as follows:
204
+
205
+ ```bash
206
+ multichannel_timeseries
207
+ ├── Channel1-T0001.tif
208
+ ├── Channel1-T0002.tif
209
+ ├── Channel1-T0003.tif
210
+ ├── Channel1-T0004.tif
211
+ ├── Channel2-T0001.tif
212
+ ├── Channel2-T0002.tif
213
+ ├── Channel2-T0003.tif
214
+ └── Channel2-T0004.tif
215
+ ```
216
+
217
+ To convert each TIFF into a separate OME-Zarr container (unary conversion):
218
+
219
+ ```bash
220
+ eubi to_zarr multichannel_timeseries multichannel_timeseries_zarr
221
+ ```
222
+
223
+ By default this writes OME-Zarr 0.4 (zarr version 2). Use `--ome_zarr_version`
224
+ to choose the version. For OME-Zarr 0.5 (zarr version 3, which supports sharding):
225
+
226
+ ```bash
227
+ eubi to_zarr multichannel_timeseries multichannel_timeseries_zarr --ome_zarr_version 0.5
228
+ ```
229
+
230
+ `--zarr_format` still works, but it is deprecated. Use `--ome_zarr_version` instead.
231
+
232
+ Both of these commands will perform unary conversion, resulting in the following output:
233
+
234
+ ```bash
235
+ multichannel_timeseries_zarr
236
+ ├── Channel1-T0001.zarr
237
+ ├── Channel1-T0002.zarr
238
+ ├── Channel1-T0003.zarr
239
+ ├── Channel1-T0004.zarr
240
+ ├── Channel2-T0001.zarr
241
+ ├── Channel2-T0002.zarr
242
+ ├── Channel2-T0003.zarr
243
+ └── Channel2-T0004.zarr
244
+ ```
245
+
246
+ Use **wildcards** to specifically convert the images belonging to Channel1:
247
+
248
+ ```bash
249
+ eubi to_zarr "multichannel_timeseries/Channel1*" multichannel_timeseries_channel1_zarr
250
+ ```
251
+
252
+ ### Aggregative Conversion (Concatenation Along Dimensions)
253
+
254
+ To concatenate images along specific dimensions, EuBI-Bridge needs to be informed
255
+ of file patterns that specify image dimensions. For this example,
256
+ the file pattern for the channel dimension is `Channel`, which is followed by the channel index,
257
+ and the file pattern for the time dimension is `T`, which is followed by the time index.
258
+
259
+ To concatenate along the **time** dimension:
260
+
261
+ ```bash
262
+ eubi to_zarr multichannel_timeseries multichannel_timeseries_concat_zarr \
263
+ --channel_tag Channel \
264
+ --time_tag T \
265
+ --concatenation_axes t
266
+ ```
267
+
268
+ Output:
269
+
270
+ ```bash
271
+ multichannel_timeseries_concat_zarr
272
+ ├── Channel1-T_tset.zarr
273
+ └── Channel2-T_tset.zarr
274
+ ```
275
+
276
+ **Important note:** if the `--channel_tag` was not provided, the tool would not be aware
277
+ of the multiple channels in the image and try to concatenate all images into a single one-channeled OME-Zarr. Therefore,
278
+ when an aggregative conversion is performed, all dimensions existing in the input files must be specified via their respective tags.
279
+
280
+ For multidimensional concatenation (**channel** + **time**):
281
+
282
+ ```bash
283
+ eubi to_zarr multichannel_timeseries multichannel_timeseries_concat_zarr \
284
+ --channel_tag Channel \
285
+ --time_tag T \
286
+ --concatenation_axes ct
287
+ ```
288
+
289
+ Note that both axes are specified via the argument `--concatenation_axes ct`.
290
+
291
+ Output:
292
+
293
+ ```bash
294
+ multichannel_timeseries_concat_zarr
295
+ └── Channel_cset-T_tset.zarr
296
+ ```
297
+
298
+ ### Handling Nested Directories
299
+
300
+ For datasets stored in nested directories such as:
301
+
302
+ ```bash
303
+ multichannel_timeseries_nested
304
+ ├── Channel1
305
+ │   ├── T0001.tif
306
+ │   ├── T0002.tif
307
+ │   ├── T0003.tif
308
+ │   ├── T0004.tif
309
+ ├── Channel2
310
+ │   ├── T0001.tif
311
+ │   ├── T0002.tif
312
+ │   ├── T0003.tif
313
+ │   ├── T0004.tif
314
+ ```
315
+
316
+ EuBI-Bridge automatically detects the nested structure. To concatenate along both channel and time dimensions:
317
+
318
+ ```bash
319
+ eubi to_zarr \
320
+ multichannel_timeseries_nested \
321
+ multichannel_timeseries_nested_concat_zarr \
322
+ --channel_tag Channel \
323
+ --time_tag T \
324
+ --concatenation_axes ct
325
+ ```
326
+
327
+ Output:
328
+
329
+ ```bash
330
+ multichannel_timeseries_nested_concat_zarr
331
+ └── Channel_cset-T_tset.zarr
332
+ ```
333
+
334
+ To concatenate along the channel dimension only:
335
+
336
+ ```bash
337
+ eubi to_zarr \
338
+ multichannel_timeseries_nested \
339
+ multichannel_timeseries_nested_concat_zarr \
340
+ --channel_tag Channel \
341
+ --time_tag T \
342
+ --concatenation_axes c
343
+ ```
344
+
345
+ Output:
346
+
347
+ ```bash
348
+ multichannel_timeseries_nested_concat_zarr
349
+ ├── Channel_cset-T0001.zarr
350
+ ├── Channel_cset-T0002.zarr
351
+ ├── Channel_cset-T0003.zarr
352
+ └── Channel_cset-T0004.zarr
353
+ ```
354
+
355
+ ### Selective Data Conversion
356
+
357
+ To recursively select specific files for conversion, wildcard patterns can be used.
358
+ For example, to concatenate only **timepoint 3** along the channel dimension:
359
+
360
+ ```bash
361
+ eubi to_zarr \
362
+ "multichannel_timeseries_nested/**/*T0003*" \
363
+ multichannel_timeseries_nested_concat_zarr \
364
+ --channel_tag Channel \
365
+ --time_tag T \
366
+ --concatenation_axes c
367
+ ```
368
+
369
+ Output:
370
+
371
+ ```bash
372
+ multichannel_timeseries_nested_concat_zarr
373
+ └── Channel_cset-T0003.zarr
374
+ ```
375
+
376
+ **Note:** When using wildcards, the input directory path must be enclosed
377
+ in quotes as shown in the example above.
378
+
379
+ ### Handling Categorical Dimension Patterns
380
+
381
+ For datasets where channel names are categorical such as in:
382
+
383
+ ```bash
384
+ blueredchannels_timeseries
385
+ ├── Blue-T0001.tif
386
+ ├── Blue-T0002.tif
387
+ ├── Blue-T0003.tif
388
+ ├── Blue-T0004.tif
389
+ ├── Red-T0001.tif
390
+ ├── Red-T0002.tif
391
+ ├── Red-T0003.tif
392
+ └── Red-T0004.tif
393
+ ```
394
+
395
+ Specify categorical names as a comma-separated list:
396
+
397
+ ```bash
398
+ eubi to_zarr \
399
+ blueredchannels_timeseries \
400
+ blueredchannels_timeseries_concat_zarr \
401
+ --channel_tag Blue,Red \
402
+ --time_tag T \
403
+ --concatenation_axes ct
404
+ ```
405
+
406
+ Output:
407
+
408
+ ```bash
409
+ blueredchannels_timeseries_concat_zarr
410
+ └── BlueRed_cset-T_tset.zarr
411
+ ```
412
+
413
+ Note that the categorical names are aggregated in the output OME-Zarr name.
414
+
415
+
416
+ With nested input structure such as in:
417
+
418
+ ```bash
419
+ blueredchannels_timeseries_nested
420
+ ├── Blue
421
+ │   ├── T0001.tif
422
+ │   ├── T0002.tif
423
+ │   ├── T0003.tif
424
+ │   └── T0004.tif
425
+ └── Red
426
+ ├── T0001.tif
427
+ ├── T0002.tif
428
+ ├── T0003.tif
429
+ └── T0004.tif
430
+ ```
431
+
432
+ One can run the exact same command:
433
+
434
+ ```bash
435
+ eubi to_zarr \
436
+ blueredchannels_timeseries_nested \
437
+ blueredchannels_timeseries_nested_concat_zarr \
438
+ --channel_tag Blue,Red \
439
+ --time_tag T \
440
+ --concatenation_axes ct
441
+ ```
442
+
443
+ Output:
444
+
445
+ ```bash
446
+ blueredchannels_timeseries_nested_concat_zarr
447
+ └── BlueRed_cset-T_tset.zarr
448
+ ```
449
+
450
+ ## Speed and memory
451
+
452
+ EuBI-Bridge reads each image once and writes all resolution levels from that read. It
453
+ stays within the memory you give it, however large the images are.
454
+
455
+ You set three things:
456
+
457
+ - `--max_processes`: how many images are converted at once, each in its own process.
458
+ - `--max_threads`: how many parts of an image each conversion works on at once.
459
+ - `--memory_budget`: how much memory the whole run may use, for example `16GB`. The
460
+ default, `auto`, is half of the memory that is free when the run starts.
461
+
462
+ ```bash
463
+ eubi to_zarr input_dir output_dir --max_processes 4 --max_threads 4 --memory_budget 8GB
464
+ ```
465
+
466
+ For example, 2347 TIFF planes (17.6 GB) were converted into a 6-level OME-Zarr 0.5 with
467
+ large shards in about 1.3 minutes with `--memory_budget 1.5GB`, using less than 1 GB.
468
+
469
+ Set them once with `eubi configure cluster`, or in the Cluster tab of the graphical
470
+ interface. On a SLURM cluster, `--slurm_worker_memory` sets the memory of each worker
471
+ job instead.
472
+
473
+ The OME-Zarr is written by [ome_zarr_pyramid](https://pypi.org/project/ome_zarr_pyramid/)
474
+ by default. If you need to, you can choose:
475
+
476
+ - `--writer eubi`: EuBI-Bridge's own writer. It gives the same pixels.
477
+ - `--io_backend zarrista`: write with the Rust-based zarrista library. Install it with
478
+ `pip install "dyna-zarr[zarrista]"`.
479
+
480
+ ## Additional Notes
481
+
482
+ - EuBI-Bridge is in the **beta stage**, and significant updates may be expected.
483
+ - **Community support:** Questions and contributions are welcome! Please report any issues.
484
+
485
+