Skip to content

Commit 3ab89ba

Browse files
ziw-liuieivanov
andauthored
Universal API implementations for Micro-Manager OME-TIFF and NDTiff (#185)
* wip: draft mmstack ome-tiff fov * MM FOV base class * tests * bump tifffile * comment * fix indent after rebase * use get default * test pixel indexing * set MM metadata * style * update dependencies * add xarray * move old readers to the `_deprecated` namespace * uapi for ndtiff * refactor test setup to parametrize by dataset use globals instead of fixtures since parametrization happens before fixture evaluation * convert mmstack * fix and test chunking * fix metadata conversion and test ndtiff * update cli * fix scaling * test 1.4 and incomplete ome-tiffs * move reader tests * deprecate reader tests * update deprecated tests * update ngff tests * isort * update black target to 3.10 * lint * fix download paths * update docs references and theme * untrack autogenerated file * ignore execution time file * add github icon * update docstring * update docstring * show channel names and chunk size in info * print plate chunk size if verbose * fallback for pixel size * remove log level setting * do not filter logs and warnings in reader * avoid root logger * isort * set default logging level to INFO * format docstring * improve conversion messages * black * fix ome-tiff channel name indexing * fix ndtiff channel name indexing * update converter test * remove use of os.path in `reader` * expand _check_ndtiff checks * fix iteration * fix python 3.10 using `Path.glob(*/)` to get subdirs was added in 3.11 * bump zarr version to include resizing fix zarr-developers/zarr-python#1540 * fix cli default * set log level with an environment variable * fix unset * catch non-existent page * implement fallback for incomplete channel names workaround for the Dragonfly microscope where the multi-camera setup only has one channel name written * add debug logs * handle virtual frames * try reading pages from TiffFile directly * filter error logs about ImageJ metadata being broken this is a known MM limitation when writing OME-TIFFs * fix regex * remove use of os.path in `convert.py` * better channel indexing in `_get_summary_metadata` * style * safer NoneType check * private default axis names for NDTiff * update documentation to reflect new entry point * add repr to MM FOV and dataset types * rename mm_meta and expose summary metadata * add MicroManagerFOVMapping.root * add MicroManagerFOVMapping.zyx_scale * add warning log for failed position grid * fix grid layout * suppress hypothesis flakiness * different health check suppression --------- Co-authored-by: Ivan Ivanov <ivan.ivanov@czbiohub.org>
1 parent e4d418e commit 3ab89ba

40 files changed

Lines changed: 1546 additions & 2443 deletions

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
pip install black
3131
- name: Check code styling with Black
3232
run: |
33-
black --diff -S -t py39 iohub
34-
black --check -S -t py39 iohub
33+
black --diff -S -t py310 iohub
34+
black --check -S -t py310 iohub
3535
3636
lint:
3737
name: Lint Check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ instance/
8181
# Sphinx documentation
8282
docs/_build/
8383
docs/source/auto_examples/
84+
docs/source/sg_execution_times.rst
8485

8586
# PyBuilder
8687
target/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ and the [example scripts](https://github.com/czbiohub-sf/iohub/tree/main/example
100100
Read a directory containing a TIFF dataset:
101101

102102
```py
103-
from iohub import read_micromanager
103+
from iohub import read_images
104104

105-
reader = read_micromanager("/path/to/data/")
105+
reader = read_images("/path/to/data/")
106106
print(reader.shape)
107107
```
108108

docs/source/api/mm_converter.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Convert TIFF to OME-Zarr
1111

1212
.. autoclass:: TIFFConverter
1313
:members:
14+
:special-members: __call__
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
Read MMStack OME-TIFF
22
=====================
33

4-
.. currentmodule:: iohub.multipagetiff
4+
.. currentmodule:: iohub.mmstack
55

6-
.. autoclass:: MicromanagerOmeTiffReader
6+
.. autoclass:: MMStack
77
:members:
88
:inherited-members:
9+
10+
.. autoclass:: MMOmeTiffFOV
11+
:members:
12+
:inherited-members:

docs/source/api/mm_reader.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Read Micro-Manager datasets
2-
===========================
1+
Read multi-FOV datasets
2+
=======================
33

44
.. currentmodule:: iohub
55

6-
.. autofunction:: read_micromanager
6+
.. autofunction:: read_images

docs/source/api/mm_sequence_reader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Read MM TIFF sequence
22
=====================
33

4-
.. currentmodule:: iohub.singlepagetiff
4+
.. currentmodule:: iohub._deprecated.singlepagetiff
55

66
.. autoclass:: MicromanagerSequenceReader
77
:members:

docs/source/api/ndtiff.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Read NDTiff
33

44
.. currentmodule:: iohub.ndtiff
55

6-
.. autoclass:: NDTiffReader
6+
.. autoclass:: NDTiffDataset
77
:members:
88
:inherited-members:
9+
10+
.. autoclass:: NDTiffFOV
11+
:members:
12+
:inherited-members:

docs/source/api/ngff.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ OME-NGFF (OME-Zarr)
66
Convenience
77
-----------
88

9-
`open_ome_zarr`
10-
^^^^^^^^^^^^^^^
119
.. autofunction:: open_ome_zarr
1210

1311

@@ -16,25 +14,14 @@ NGFF Nodes
1614

1715
.. currentmodule:: iohub.ngff
1816

19-
20-
`NGFFNode`
21-
^^^^^^^^^^
22-
2317
.. autoclass:: NGFFNode
2418
:members:
2519

26-
`Position`
27-
^^^^^^^^^^
2820
.. autoclass:: Position
2921
:members:
3022

31-
32-
`TiledPosition`
33-
^^^^^^^^^^^^^^^
3423
.. autoclass:: TiledPosition
3524
:members:
3625

37-
`Plate`
38-
^^^^^^^
3926
.. autoclass:: Plate
4027
:members:

docs/source/api/upti.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Read PTI TIFF
22
=============
33

4-
.. currentmodule:: iohub.upti
4+
.. currentmodule:: iohub._deprecated.upti
55

66
.. autoclass:: UPTIReader
77
:members:

0 commit comments

Comments
 (0)