micro-reader 0.0.3__tar.gz → 0.1.0__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.
- {micro_reader-0.0.3 → micro_reader-0.1.0}/PKG-INFO +150 -36
- {micro_reader-0.0.3 → micro_reader-0.1.0}/README.md +146 -34
- {micro_reader-0.0.3 → micro_reader-0.1.0}/pyproject.toml +6 -4
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/__init__.py +10 -7
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_base.py +219 -23
- micro_reader-0.1.0/src/micro_reader/_cfb.py +200 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_codecs.py +43 -5
- micro_reader-0.1.0/src/micro_reader/_errors.py +55 -0
- micro_reader-0.1.0/src/micro_reader/_eubi_guard.py +189 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_fileset.py +55 -2
- micro_reader-0.1.0/src/micro_reader/_groups.py +221 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_io.py +1 -1
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_metadata.py +5 -0
- micro_reader-0.1.0/src/micro_reader/_mosaic.py +80 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_outline.py +9 -7
- micro_reader-0.1.0/src/micro_reader/_parts.py +188 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_plate.py +27 -3
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_pool.py +1 -1
- micro_reader-0.1.0/src/micro_reader/_registry.py +187 -0
- micro_reader-0.1.0/src/micro_reader/_stack.py +82 -0
- micro_reader-0.1.0/src/micro_reader/_version.py +2 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/_czi_metadata.py +9 -4
- micro_reader-0.1.0/src/micro_reader/backends/_ets.py +149 -0
- micro_reader-0.1.0/src/micro_reader/backends/_hdf5.py +1021 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/_lif_metadata.py +8 -2
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/_nd2_legacy.py +1 -1
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/_tiff_metadata.py +280 -11
- micro_reader-0.1.0/src/micro_reader/backends/_tiff_variants.py +475 -0
- micro_reader-0.1.0/src/micro_reader/backends/_vsi_tree.py +154 -0
- micro_reader-0.1.0/src/micro_reader/backends/bdv.py +642 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/companion.py +148 -37
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/cv7000.py +107 -8
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/czi.py +265 -66
- micro_reader-0.1.0/src/micro_reader/backends/dv.py +372 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/harmony.py +116 -6
- micro_reader-0.1.0/src/micro_reader/backends/hdf5.py +260 -0
- micro_reader-0.1.0/src/micro_reader/backends/ics.py +480 -0
- micro_reader-0.1.0/src/micro_reader/backends/ilastik.py +157 -0
- micro_reader-0.1.0/src/micro_reader/backends/ims.py +331 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/incell.py +10 -3
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/lif.py +34 -40
- micro_reader-0.1.0/src/micro_reader/backends/metamorph.py +658 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/metaxpress.py +42 -4
- micro_reader-0.1.0/src/micro_reader/backends/micromanager.py +578 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/mrc.py +119 -64
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/nd2.py +1 -1
- micro_reader-0.1.0/src/micro_reader/backends/ndpis.py +205 -0
- micro_reader-0.1.0/src/micro_reader/backends/oif.py +479 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/oir.py +80 -8
- micro_reader-0.1.0/src/micro_reader/backends/omp2info.py +265 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/tiff.py +539 -63
- micro_reader-0.1.0/src/micro_reader/backends/vsi.py +457 -0
- micro_reader-0.0.3/src/micro_reader/_errors.py +0 -25
- micro_reader-0.0.3/src/micro_reader/_registry.py +0 -118
- micro_reader-0.0.3/src/micro_reader/backends/ims.py +0 -409
- {micro_reader-0.0.3 → micro_reader-0.1.0}/.gitignore +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/LICENSE +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_axes.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_index.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_jpeg_restarts.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_memory.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/_stream.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/__init__.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/_nd2_metadata.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/_nd2_structure.py +0 -0
- {micro_reader-0.0.3 → micro_reader-0.1.0}/src/micro_reader/backends/raster.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: micro-reader
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.1.0
|
|
4
4
|
Summary: Low-level, memory-bounded pixel reading for microscopy formats: read exactly the rectangle you ask for.
|
|
5
5
|
Project-URL: Homepage, https://github.com/bugraoezdemir/micro-reader
|
|
6
6
|
Project-URL: Source, https://github.com/bugraoezdemir/micro-reader
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
19
|
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
|
-
Requires-Dist: micro-reader-codecs<0.1,>=0.0.
|
|
21
|
+
Requires-Dist: micro-reader-codecs<0.1,>=0.0.2
|
|
22
22
|
Requires-Dist: numpy>=1.24
|
|
23
23
|
Requires-Dist: tifffile>=2025.5.21
|
|
24
24
|
Provides-Extra: all
|
|
@@ -36,6 +36,8 @@ Requires-Dist: pylibczirw; (python_version < '3.14') and extra == 'dev'
|
|
|
36
36
|
Requires-Dist: pytest; extra == 'dev'
|
|
37
37
|
Requires-Dist: readlif; extra == 'dev'
|
|
38
38
|
Requires-Dist: zstandard; extra == 'dev'
|
|
39
|
+
Provides-Extra: hdf5
|
|
40
|
+
Requires-Dist: h5py>=3.11; extra == 'hdf5'
|
|
39
41
|
Provides-Extra: ims
|
|
40
42
|
Requires-Dist: h5py>=3.11; extra == 'ims'
|
|
41
43
|
Provides-Extra: test
|
|
@@ -54,7 +56,7 @@ Description-Content-Type: text/markdown
|
|
|
54
56
|
|
|
55
57
|
**Memory-bounded pixel reader for microscopy images.**
|
|
56
58
|
|
|
57
|
-
`micro-reader` reads regions of large microscopy files without loading the entire image into memory. It provides a common interface across TIFF, CZI, ND2, Leica, OIR, Imaris, MRC,
|
|
59
|
+
`micro-reader` reads regions of large microscopy files without loading the entire image into memory. It provides a common interface across TIFF, CZI, ND2, Leica, OIR, OIB / OIF, Olympus VSI, Imaris, DeltaVision, MRC, common raster formats, OME companion file sets, and high-content screening plates (Harmony, MetaXpress, IN Cell, CellVoyager).
|
|
58
60
|
|
|
59
61
|
> **Status: pre-alpha (0.0.x)**
|
|
60
62
|
>
|
|
@@ -75,6 +77,14 @@ pip install "micro-reader[ims]" # Imaris (.ims)
|
|
|
75
77
|
pip install "micro-reader[codecs]" # additional codecs
|
|
76
78
|
```
|
|
77
79
|
|
|
80
|
+
## Compatibility with eubi-bridge
|
|
81
|
+
|
|
82
|
+
micro-reader 0.1.0 renamed the image index `scene` to `series`. eubi-bridge 0.1.3 to 0.2.x and eubi-bridge-lite below 0.3.0 still read `scene`, so `import micro_reader` refuses to load next to them. It raises an `ImportError` that names the installed eubi version and the two ways out: upgrade eubi (`pip install -U 'eubi-bridge>=0.3.0'`, or the same for `eubi-bridge-lite`), or keep that eubi with the micro-reader it was built for (`pip install 'micro-reader<0.1'`). The check reads the versions of the installed packages; it never imports eubi. An editable install of eubi is checked like any other: its recorded version can be out of date, so the message then says to reinstall it.
|
|
83
|
+
|
|
84
|
+
To skip the check, set the environment variable `MICRO_READER_SKIP_EUBI_CHECK=1`. Only the value `1` skips it; any other value keeps the check. micro-reader then warns once that the check was skipped. This is meant for work on an eubi checkout, not for normal use.
|
|
85
|
+
|
|
86
|
+
The check will be removed when every eubi-bridge / eubi-bridge-lite line below 0.3.0 has left the support window, checked by the release version matrix; not before.
|
|
87
|
+
|
|
78
88
|
## Quick start
|
|
79
89
|
|
|
80
90
|
```python
|
|
@@ -116,7 +126,7 @@ print(image.stats.over_read)
|
|
|
116
126
|
|
|
117
127
|
* **File**: the opened microscopy file
|
|
118
128
|
* **Image**: one image or frame that can be read as an array
|
|
119
|
-
* **Index**: identifies images that are separated by dimensions such as
|
|
129
|
+
* **Index**: identifies images that are separated by dimensions such as series, tile, view, or emission wavelength
|
|
120
130
|
|
|
121
131
|
The key distinction is:
|
|
122
132
|
|
|
@@ -169,7 +179,7 @@ Each image has an index describing where it came from:
|
|
|
169
179
|
|
|
170
180
|
```python
|
|
171
181
|
image.index
|
|
172
|
-
# {"
|
|
182
|
+
# {"series": 0, "tile": 3, "view": 0}
|
|
173
183
|
```
|
|
174
184
|
|
|
175
185
|
You can inspect all indices in the file:
|
|
@@ -182,10 +192,10 @@ f.index_range
|
|
|
182
192
|
And select images by index:
|
|
183
193
|
|
|
184
194
|
```python
|
|
185
|
-
f.select(
|
|
195
|
+
f.select(series=1, view=0)
|
|
186
196
|
```
|
|
187
197
|
|
|
188
|
-
This returns the images matching the requested indices. For example, if a file contains several
|
|
198
|
+
This returns the images matching the requested indices. For example, if a file contains several series, tiles, and views, selecting `series=1, view=0` returns the tiles belonging to that series and view.
|
|
189
199
|
|
|
190
200
|
### Available index dimensions
|
|
191
201
|
|
|
@@ -196,7 +206,7 @@ plate
|
|
|
196
206
|
acquisition
|
|
197
207
|
well
|
|
198
208
|
field
|
|
199
|
-
|
|
209
|
+
series
|
|
200
210
|
tile
|
|
201
211
|
rotation
|
|
202
212
|
view
|
|
@@ -213,6 +223,31 @@ resolution
|
|
|
213
223
|
|
|
214
224
|
Only dimensions actually present in a file appear in an image's index.
|
|
215
225
|
|
|
226
|
+
### Files made of several files
|
|
227
|
+
|
|
228
|
+
Some formats always come as several files: an OIR file with its continuation files (`name_00001`), a Micro-Manager stack split over `..._MMStack_Pos0.ome.tif`, `..._MMStack_Pos0_1.ome.tif`, an NDTiff folder, an Olympus OIF with its `.oif.files` folder, an Olympus VSI with its `_name_` folder, a DeltaVision image with its softWoRx `.log`, a plate's side files (Harmony `Assaylayout/` and `FFC_Profile/`, CellVoyager settings files, MetaXpress `_thumb` previews). Opening any of these files opens the whole image:
|
|
229
|
+
|
|
230
|
+
```python
|
|
231
|
+
f = micro_reader.open("cells_R3D.dv.log")
|
|
232
|
+
f.path # the main file: "cells_R3D.dv"
|
|
233
|
+
f.opened # what was opened: "cells_R3D.dv.log"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
You can also open the folder. A folder opens the image it belongs to (an NDTiff dataset folder, a Harmony or CellVoyager measurement folder), or the one image it holds. A folder with several images raises an error that lists them.
|
|
237
|
+
|
|
238
|
+
To sort many files at once, for example everything under a folder you want to convert, `group_files` says which files make one image:
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
g = micro_reader.group_files("experiment/")
|
|
242
|
+
for group in g.groups:
|
|
243
|
+
group.main # the file to open: "slide.vsi", "plate/Index.idx.xml"
|
|
244
|
+
group.parts # the other files of a multi-file image
|
|
245
|
+
group.members # for a plate or companion index: the files its images come from
|
|
246
|
+
g.singles # every other file, as given
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
A file that a plate or companion index names is listed only in that index's group. When the main file of a multi-file image is missing, its group has `main=None`.
|
|
250
|
+
|
|
216
251
|
## Axes
|
|
217
252
|
|
|
218
253
|
An image array uses these axes:
|
|
@@ -315,13 +350,13 @@ For example, a plain multi-page TIFF may contain 80 pages without saying whether
|
|
|
315
350
|
f = micro_reader.open("stack.tif")
|
|
316
351
|
|
|
317
352
|
print(f.index_range)
|
|
318
|
-
# {"
|
|
353
|
+
# {"series": 1, "sequence": 80}
|
|
319
354
|
|
|
320
355
|
print(len(f.images))
|
|
321
356
|
# 80
|
|
322
357
|
|
|
323
358
|
print(f.images[0].index)
|
|
324
|
-
# {"
|
|
359
|
+
# {"series": 0, "sequence": 0}
|
|
325
360
|
|
|
326
361
|
print(f.images[0].axes)
|
|
327
362
|
# yx
|
|
@@ -367,10 +402,10 @@ Each image of a pyramidal file carries its resolution level in its index. In thi
|
|
|
367
402
|
|
|
368
403
|
```python
|
|
369
404
|
print(f.index_range)
|
|
370
|
-
# {"
|
|
405
|
+
# {"series": 4, "resolution": 1}
|
|
371
406
|
|
|
372
407
|
print(f.images[0].index)
|
|
373
|
-
# {"
|
|
408
|
+
# {"series": 0, "resolution": 0}
|
|
374
409
|
```
|
|
375
410
|
|
|
376
411
|
`index_range` shows `"resolution": 1` because only the full-resolution level is in `f.images`.
|
|
@@ -378,15 +413,15 @@ print(f.images[0].index)
|
|
|
378
413
|
Lower-resolution versions are available through the image via `image.resolutions`:
|
|
379
414
|
|
|
380
415
|
```python
|
|
381
|
-
|
|
416
|
+
image_series0 = f.images[0]
|
|
382
417
|
|
|
383
|
-
|
|
418
|
+
image_series0.is_pyramidal
|
|
384
419
|
# True
|
|
385
420
|
|
|
386
|
-
|
|
421
|
+
img_series0_level2 = image_series0.resolutions[2] # a lower-resolution image
|
|
387
422
|
|
|
388
|
-
|
|
389
|
-
# {"
|
|
423
|
+
img_series0_level2.index
|
|
424
|
+
# {"series": 0, "resolution": 2}
|
|
390
425
|
```
|
|
391
426
|
|
|
392
427
|
If you prefer to expose every resolution level as an image directly under the `File` object:
|
|
@@ -398,37 +433,37 @@ f = micro_reader.open(
|
|
|
398
433
|
)
|
|
399
434
|
|
|
400
435
|
print(f.index_range)
|
|
401
|
-
# {"
|
|
436
|
+
# {"series": 4, "resolution": 6}
|
|
402
437
|
|
|
403
|
-
|
|
438
|
+
img_series0_level2 = f.select(series=0, resolution=2)[0]
|
|
404
439
|
```
|
|
405
440
|
|
|
406
441
|
Supported pyramids include:
|
|
407
442
|
|
|
408
443
|
* **Imaris**: all stored levels
|
|
409
|
-
* **TIFF**: OME-TIFF and
|
|
410
|
-
* **CZI**: stored pyramids of whole
|
|
444
|
+
* **TIFF**: OME-TIFF and whole-slide pyramids (SVS, NDPI, SCN, BIF, QPTIFF, Philips)
|
|
445
|
+
* **CZI**: stored pyramids of whole series
|
|
411
446
|
|
|
412
447
|
Other formats expose a single resolution level.
|
|
413
448
|
|
|
414
|
-
CZI pyramids belong to whole
|
|
449
|
+
CZI pyramids belong to whole series. Separately opened CZI mosaic tiles therefore do not have their own resolution levels.
|
|
415
450
|
|
|
416
451
|
## Mosaic tiles
|
|
417
452
|
|
|
418
|
-
Mosaic tiles are separate images by default.
|
|
453
|
+
Mosaic tiles are separate images by default, each with its own position.
|
|
419
454
|
|
|
420
|
-
For CZI files, you can instead
|
|
455
|
+
For CZI files and FluoView tiling sets (`.omp2info`), you can instead get one image per series, its tiles placed on one canvas:
|
|
421
456
|
|
|
422
457
|
```python
|
|
423
458
|
f = micro_reader.open(
|
|
424
459
|
path,
|
|
425
|
-
tiles="
|
|
460
|
+
tiles="mosaic",
|
|
426
461
|
)
|
|
427
462
|
```
|
|
428
463
|
|
|
429
|
-
|
|
464
|
+
CZI tiles are placed by the file's own stitching information, FluoView tiles by the tiling set's grid (where tiles overlap, the later tile is on top; areas without a tile read as 0). Other formats with tiles raise an error for `tiles="mosaic"`.
|
|
430
465
|
|
|
431
|
-
|
|
466
|
+
`tiles="stitched"`, the name before 0.1.0, still works and warns.
|
|
432
467
|
|
|
433
468
|
## Plates
|
|
434
469
|
|
|
@@ -451,7 +486,7 @@ f.select(well=plate.well_index("B2"))
|
|
|
451
486
|
|
|
452
487
|
`f.outline()` shows the plates, wells and fields of a file.
|
|
453
488
|
|
|
454
|
-
Zeiss CZI plates are read as plates with `plates=True`, and as
|
|
489
|
+
Zeiss CZI plates are read as plates with `plates=True`, and as series otherwise:
|
|
455
490
|
|
|
456
491
|
```python
|
|
457
492
|
f = micro_reader.open("plate.czi", plates=True)
|
|
@@ -459,6 +494,12 @@ f = micro_reader.open("plate.czi", plates=True)
|
|
|
459
494
|
|
|
460
495
|
Missing plane files are read as zeros, with a `MissingImagesWarning`. A field without any of its files is left out.
|
|
461
496
|
|
|
497
|
+
A plane file whose size or pixel type differs from what the index describes raises an error when it is read. To find such files before reading anything, check them all at once:
|
|
498
|
+
|
|
499
|
+
```python
|
|
500
|
+
f.check_members() # opens every plane file once; returns how many were checked
|
|
501
|
+
```
|
|
502
|
+
|
|
462
503
|
When the channels of a field have different z sampling, `image.parts` gives one image per group of channels that share it.
|
|
463
504
|
|
|
464
505
|
## Metadata
|
|
@@ -524,13 +565,21 @@ The position is omitted when it cannot be determined reliably.
|
|
|
524
565
|
|
|
525
566
|
| Format | Notes |
|
|
526
567
|
| -------------------- | ----------------------------------------------------- |
|
|
527
|
-
| **TIFF / BigTIFF** | TIFF, OME-TIFF, ImageJ, LSM, STK
|
|
568
|
+
| **TIFF / BigTIFF** | TIFF, OME-TIFF, ImageJ, LSM, STK, Micro-Manager, whole-slide TIFFs |
|
|
528
569
|
| **OME companion** | `.companion.ome` sets of OME-TIFF files |
|
|
529
|
-
| **CZI** | Zeiss CZI, including mosaic tiles
|
|
570
|
+
| **CZI** | Zeiss CZI, including mosaic tiles (separate or on one canvas) |
|
|
530
571
|
| **ND2** | Nikon ND2, including legacy JPEG 2000 ND2 |
|
|
531
572
|
| **Leica** | LIF, LOF, LIFEXT, XLIF, XLEF, XLCF |
|
|
532
|
-
| **OIR** | Olympus / Evident FluoView
|
|
533
|
-
| **
|
|
573
|
+
| **OIR** | Olympus / Evident FluoView, including tiling sets (`.omp2info`) |
|
|
574
|
+
| **OIB / OIF** | Olympus FluoView FV1000 / FV1200 / FV3000 |
|
|
575
|
+
| **VSI** | Olympus / Evident cellSens and VS120 / VS200 slide scanners |
|
|
576
|
+
| **NDPIS** | Hamamatsu NanoZoomer fluorescence sets (one NDPI per channel) |
|
|
577
|
+
| **Imaris** | `.ims`, with the `[hdf5]` extra |
|
|
578
|
+
| **HDF5** | ilastik, BigDataViewer / BigStitcher, Luxendo, Fiji HDF5, with the `[hdf5]` extra |
|
|
579
|
+
| **ICS / IDS** | Image Cytometry Standard 1.0 and 2.0 (SVI Huygens and others) |
|
|
580
|
+
| **MetaMorph** | `.nd` acquisitions and their TIFF / STK files |
|
|
581
|
+
| **Micro-Manager 1.4**| image-per-file acquisitions (`metadata.txt` + one TIFF per plane) |
|
|
582
|
+
| **DeltaVision** | `.dv`, `.r3d` (softWoRx, OMX, Priism) |
|
|
534
583
|
| **MRC** | Common MRC modes and extended headers |
|
|
535
584
|
| **Plates (HCS)** | Harmony, MetaXpress, IN Cell and CellVoyager plates |
|
|
536
585
|
| **JPEG / PNG / BMP** | Common raster image formats |
|
|
@@ -549,6 +598,14 @@ Supported TIFF formats include:
|
|
|
549
598
|
* ImageJ
|
|
550
599
|
* Zeiss LSM
|
|
551
600
|
* MetaMorph STK
|
|
601
|
+
* Micro-Manager stacks (MMStack and NDTiff), also when one acquisition is spread over several files
|
|
602
|
+
* Whole-slide TIFFs: Aperio SVS, Hamamatsu NDPI, Leica SCN, Ventana / Roche BIF (VENTANA DP 200, iScan Coreo), PerkinElmer / Akoya QPTIFF and Philips
|
|
603
|
+
|
|
604
|
+
Micro-Manager stage positions are series. NDTiff channel names and pixel sizes come from the dataset's index and frame metadata.
|
|
605
|
+
|
|
606
|
+
A whole-slide file gives the slide first, then the other pictures it stores as further series, as Bio-Formats lists them: `label` and `macro` (overview), and for some formats `thumbnail` (QPTIFF) or `probability` (BIF tissue map). Pixel sizes, positions and channel names come from each vendor's own metadata.
|
|
607
|
+
|
|
608
|
+
Ventana BIF scans store overlapping tiles. VENTANA DP 200 scans are composed as Roche's description of the format places them. iScan Coreo scans, which that description does not cover, are composed as OpenSlide shows them, with one difference: each tile starts at the nearest whole pixel and keeps its stored pixels, where OpenSlide interpolates to a sub-pixel position. Areas outside the scanned regions read as 0. Layouts that were not checked on real files (other EncodeInfo versions, several focal planes, overlapping scan areas) raise an error.
|
|
552
609
|
|
|
553
610
|
Compressed TIFF data is decoded only for the strips or tiles needed by the requested region.
|
|
554
611
|
|
|
@@ -580,19 +637,29 @@ An OME companion file (`.companion.ome`) describes images stored in separate TIF
|
|
|
580
637
|
f = micro_reader.open("data.companion.ome")
|
|
581
638
|
```
|
|
582
639
|
|
|
583
|
-
Opening one of the TIFF files
|
|
640
|
+
Opening one of the TIFF files of the set also reads the whole set, as if the companion had been opened: `f.path` is then the companion, and the companion's metadata is used. To read only that file, with its pixel sizes, channels and position taken from the companion:
|
|
641
|
+
|
|
642
|
+
```python
|
|
643
|
+
f = micro_reader.open("data_t001.ome.tif", multifile=False)
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
If the companion is missing or does not list the file, opening the whole set raises an error that names `multifile=False`. With `multifile=False` the file is then read without pixel sizes, with a `CompanionWarning`. A TIFF whose metadata lives in another OME-TIFF (instead of a `.companion.ome`) works the same way, with that OME-TIFF in the companion's place.
|
|
647
|
+
|
|
648
|
+
Some OME-TIFF sets keep the full OME-XML in their TIFF files instead of a companion. Opening one of those files also reads the whole set, and `multifile=False` reads only the planes stored in that file, with the set's metadata.
|
|
649
|
+
|
|
650
|
+
Micro-Manager stacks always open whole, also with `multifile=False`: they split their files by size, so one file does not hold a complete part of the image.
|
|
584
651
|
|
|
585
652
|
### CZI
|
|
586
653
|
|
|
587
654
|
CZI files support:
|
|
588
655
|
|
|
589
656
|
* mosaic tiles
|
|
590
|
-
*
|
|
657
|
+
* series
|
|
591
658
|
* views
|
|
592
659
|
* rotations
|
|
593
660
|
* RGB
|
|
594
661
|
* large files
|
|
595
|
-
* stored
|
|
662
|
+
* stored series pyramids
|
|
596
663
|
|
|
597
664
|
CZI-specific operations include:
|
|
598
665
|
|
|
@@ -643,18 +710,65 @@ These are represented using the common image/index model.
|
|
|
643
710
|
|
|
644
711
|
Olympus / Evident FluoView OIR files are supported, including companion files and spectral scans.
|
|
645
712
|
|
|
713
|
+
A multi-area tiling set is opened through its index, `.omp2info`, or its folder: one image per tile, each at the stage position the index gives it (the tiles' own files record none), or one canvas per group with `tiles="mosaic"`. Positions follow the protocol's grid, not a registration. The grid step was derived from one sample, as the backend documents.
|
|
714
|
+
|
|
715
|
+
### Olympus OIB and OIF
|
|
716
|
+
|
|
717
|
+
Older FluoView files come in two forms with the same content: an OIB is one file, an OIF is a `.oif` settings file plus a `.oif.files` folder with one TIFF per plane. Both open as one `t c z y x` image, with pixel sizes, z and time steps, channel names, colours and wavelengths. Opening any file in the `.oif.files` folder opens the OIF.
|
|
718
|
+
|
|
719
|
+
### Olympus VSI
|
|
720
|
+
|
|
721
|
+
A cellSens VSI is a `.vsi` file plus a `_<name>_` folder that holds the pixels (`stack1/frame_t.ets`, `stack10000/frame_t.ets`, ...). The images are listed as Bio-Formats lists them: one per scanned area, named as in cellSens, with the slide label (`label`) and overview (`overview`) when the scanner took them, and the slide photo (`macro`) last. Each scanned area keeps its resolution levels.
|
|
722
|
+
|
|
723
|
+
Images are `t c z y x` (`t c z y x s` for brightfield RGB scans), with pixel sizes, z and time steps, and each channel's name, colour and emission wavelength. Stage positions are not read.
|
|
724
|
+
|
|
725
|
+
Opening the `_<name>_` folder, a `stack` folder or a file in it opens the `.vsi`. An `.ets` file whose `.vsi` is missing is read alone, with a warning, when it is a plain 2-D image; its size is then rounded up to whole tiles.
|
|
726
|
+
|
|
646
727
|
### Imaris
|
|
647
728
|
|
|
648
729
|
Install Imaris support with:
|
|
649
730
|
|
|
650
731
|
```bash
|
|
651
|
-
pip install "micro-reader[
|
|
732
|
+
pip install "micro-reader[hdf5]"
|
|
652
733
|
```
|
|
653
734
|
|
|
735
|
+
(`[ims]` is the extra's former name and still works.)
|
|
736
|
+
|
|
654
737
|
Imaris resolution level 0 is exposed at the actual image size, with Imaris chunk padding removed.
|
|
655
738
|
|
|
656
739
|
Chunked compression is decoded in parallel.
|
|
657
740
|
|
|
741
|
+
### HDF5: ilastik, BigDataViewer, Luxendo, Fiji
|
|
742
|
+
|
|
743
|
+
These need the `[hdf5]` extra as well.
|
|
744
|
+
|
|
745
|
+
* **ilastik**: every dataset with ilastik's `axistags` (its exports, its input files, steinbock's `img`) is one image, in the dataset's own axis order. Pixel sizes are read where ilastik recorded units (`axis_units`, since 2025-09).
|
|
746
|
+
* **BigDataViewer / BigStitcher**: the XML with its HDF5 file (also partitioned). One image per tile, angle and illumination, channels on `c` and time points on `t`, with the stored resolution levels. Opening the HDF5 file opens its XML.
|
|
747
|
+
* **Luxendo / Bruker light-sheet** (`.lux.h5`): one stack per file. A whole acquisition opens through the Imaris file Luxendo writes next to it.
|
|
748
|
+
* **Fiji HDF5** (the Vibez plugin): datasets with `element_size_um`; `t<n>/channel<n>` datasets make one `t c z y x` image.
|
|
749
|
+
|
|
750
|
+
### ICS / IDS
|
|
751
|
+
|
|
752
|
+
ICS 1.0 (an `.ics` header with an `.ids` pixel file; opening either opens the image) and ICS 2.0 (one file), as written by SVI Huygens and others. Gzip-compressed pixels are read without decompressing the whole file. Images that store rows bottom-up (`coordinates cartesian`) are returned top-down, as Bio-Formats does.
|
|
753
|
+
|
|
754
|
+
### MetaMorph .nd
|
|
755
|
+
|
|
756
|
+
A MetaMorph multi-dimensional acquisition: an `.nd` file and the TIFF / STK files named after it. One image per stage position (`series`), `t c z y x`, channels named by the wavelengths. Opening the `.nd` file, any of its files or its folder opens the whole set. The stage coordinates the files record are kept as `Metadata.stage_position`, not as a position: which point of the field they mark is not recorded.
|
|
757
|
+
|
|
758
|
+
### Micro-Manager 1.4
|
|
759
|
+
|
|
760
|
+
Image-per-file acquisitions (Micro-Manager 1.4 and the 2.0 betas): a folder per stage position with a `metadata.txt` and one TIFF per plane. One image per stage position, `t c z y x`, with channel names and colours, pixel sizes and the z step. Opening any file or folder of the acquisition opens the whole acquisition.
|
|
761
|
+
|
|
762
|
+
### Hamamatsu NDPIS
|
|
763
|
+
|
|
764
|
+
An `.ndpis` set lists one NDPI file per fluorescence channel. Opened, it is one slide image with one channel per file, at every stored resolution level; channels are named by their filter set. Each NDPI file still opens alone as an ordinary slide.
|
|
765
|
+
|
|
766
|
+
### DeltaVision
|
|
767
|
+
|
|
768
|
+
DeltaVision files (`.dv`, `.r3d`, `.r3d_d3d`, also deconvolved and projected ones) are recognised by their content, whatever their extension. The image keeps the file's own order of time, waves and z (for example `ctzyx`).
|
|
769
|
+
|
|
770
|
+
Pixel sizes, and each channel's emission and excitation wavelengths, are read from the file. Channel names come from the softWoRx acquisition log next to it (`<file>.log`); a deconvolved or projected file takes the names from the log of the raw file it was made from. Stage positions are not read.
|
|
771
|
+
|
|
658
772
|
### MRC
|
|
659
773
|
|
|
660
774
|
Supported MRC modes include:
|