napari viewer plugin
Open an OME-ZARR image and overlay the labels produced by
tile_process as a napari Labels layer in a single
call. Requires the optional napari extra (pip install "patchworks[napari]").
patchworks.plugins.napari.view_in_napari(image: Union[da.Array, str, Path], labels: Union[da.Array, str, Path, None] = None, *, channel: int | None = 0, labels_component: str = 'labels', image_name: str = 'image', labels_name: str = 'labels', show: bool = True, **add_image_kwargs: Any)
Open image in napari and overlay labels as a Labels layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
image
|
(Array, str or Path)
|
OME-ZARR store (multi-scale aware), any bioio-readable file, or an in-memory array. |
required |
labels
|
(Array, str, Path or None)
|
Label array to overlay. A plain |
None
|
channel
|
int or None
|
Channel to display from the image ( |
0
|
labels_component
|
str
|
Array name inside a plain-zarr label store (default |
'labels'
|
image_name
|
str
|
Layer names shown in napari. |
'image'
|
labels_name
|
str
|
Layer names shown in napari. |
'image'
|
show
|
bool
|
Start the napari event loop (blocking). Set |
True
|
**add_image_kwargs
|
Any
|
Extra keyword arguments forwarded to |
{}
|
Returns:
| Type | Description |
|---|---|
Viewer
|
The viewer instance (useful when |
Examples: