Skip to content

Commit 79375ce

Browse files
authored
Update README after recent multiscale, remote, zarr changes (#58)
1 parent c90742d commit 79375ce

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@
1212
**A generalized image format reader for napari built on top of [bioio]**
1313

1414
`ndevio` provides flexible, metadata-aware image I/O for images in napari.
15-
Originally developed as part of napari-ndev, `ndevio` has since been separated into its own plugin as part of the [ndev-kit] and is intended to be a feature-rich and easier to maintain spiritual successor to [napari-aicsimageio].
15+
Originally developed as part of napari-ndev (as a spiritual successor to [napari-aicsimageio]), `ndevio` has since been separated into its own plugin as part of the [ndev-kit] and is intended to be a feature-rich, metadata-aware image reader for a variety of formats in napari, with a focus on microscopy images.
1616

1717
----------------------------------
1818

1919
## Features
2020

2121
- **Extensive format support** via [bioio] and its plugin system — read OME-TIFF, OME-Zarr, common image and movie formats, proprietary formats (CZI, LIF, ND2), and many more (with bioformats)!
2222
- **Multi-scene handling** — interactive widget for selecting between scenes/positions in multi-scene files
23+
- **Thorough metadata extraction** — extract and apply scale, units, axis labels, metadata (inc. OME) to napari layers
24+
- **Remote file support** — compatible Bioio readers,such as [bioio-ome-zarr], can read from remote filesystems (HTTP, S3, etc.) with dask-backed loading
25+
- **Native multiscale support** — automatically read and display multiscale images when supported by the reader. For best experience, turn on the asynchronous rendering experimental setting in napari.
2326
- **Configurable behavior** via [ndev-settings] — customize reader priority, multi-scene handling, and more
2427
- **Smart plugin installation** — automatic suggestions to install missing bioio reader plugins
2528
- **Programmatic API**`nImage` class for napari-ready metadata extraction
@@ -56,7 +59,9 @@ To contibute to ndevio or experiment with the latest features, see [Contributing
5659
If your image format is not supported by the default readers, then you will get a warning and (by default in napari) a widget to install the suggested reader.
5760
If you know of your additional proprietary formats, install the appropriate bioio reader.
5861
See the [bioio documentation](https://bioio-devs.github.io/bioio/) for the full list of available readers.
59-
**Note**: The use of `bioio-bioformats` has not been fully tested and may have issues. Please [file an issue] if you encounter problems.
62+
**Note**: The use of `bioio-bioformats` requires an automatic, initial download of required Java files, this takes some time. Most native format readers do a better job reading metadata compared to `bioio-bioformats`.
63+
64+
Please [file an issue] if you encounter problems with image reading!
6065

6166
## Usage
6267

@@ -111,14 +116,15 @@ from napari import Viewer
111116
img = nImage("path/to/image.czi")
112117

113118
# Because nImage subclasses BioImage, all BioImage methods are available
114-
img.dims # e.g., <Dimensions [T: 15, C: 4, Z: 1, Y: 256, X: 256]>
119+
print(img.dims) # e.g., <Dimensions [T: 15, C: 4, Z: 1, Y: 256, X: 256]>
115120

116121
# Access napari-ready properties, note that channel and singleton dimensions are dropped
117-
img.layer_data.shape # e.g. (15, 4, 256, 256) - still includes channel dimbecause it has not yet been converted to a list of LayerDataTuples
118-
img.layer_scale # e.g., (1.0, 0.2, 0.2) - time interval + physical scale per dimension, napari ready
119-
img.layer_axis_labels # e.g., ('T', 'Y', 'X')
120-
img.layer_units # e.g., ('s', 'µm', 'µm')
121-
img.layer_metadata # e.g., a dictionary containing the 1) full BioImage object, 2) raw_image metadata and 3) OME metadata (if parsed) - accessible via `viewer.layers[n].metadata`
122+
print(img.reference_xarray) # e.g., xarray.DataArray with dims (T, Y, X) and shape (15, 256, 256)
123+
print(img.layer_data[0]) # e.g. the highest resolution array; a list is returned for multiscale image support
124+
print(img.layer_scale) # e.g., (1.0, 0.2, 0.2) - time interval + physical scale per dimension, napari ready
125+
print(img.layer_axis_labels) # e.g., ('T', 'Y', 'X')
126+
print(img.layer_units) # e.g., ('s', 'µm', 'µm')
127+
print(img.layer_metadata) # e.g., a dictionary containing the 1) full BioImage object, 2) raw_image metadata and 3) OME metadata (if parsed) - accessible via `viewer.layers[n].metadata`
122128

123129
# A convenience method to get napari LayerDataTuples with nImage metadata for napari
124130
viewer = Viewer()
@@ -155,6 +161,7 @@ Images are loaded **in-memory** or **lazily** (via dask) automatically based on:
155161

156162
- File size < 4 GB **AND**
157163
- File size < 30% of available RAM
164+
- Remote files (e.g., S3, HTTP) and multiscale are always loaded lazily
158165

159166
### Multi-channel Images
160167

@@ -208,3 +215,4 @@ If you encounter any problems, please [file an issue] along with a detailed desc
208215
[nbatch]: https://github.com/ndev-kit/nbatch
209216
[uv]: https://docs.astral.sh/uv/
210217
[ndev-kit]: https://github.com/ndev-kit
218+
[bioio-ome-zarr]: https://github.com/bioio-devs/bioio-ome-zarr

0 commit comments

Comments
 (0)