napari.types#

Classes

ArrayBase

alias of ndarray

FullLayerData

alias of tuple[Any, Mapping, Literal['graph', 'image', 'labels', 'points', 'shapes', 'surface', 'tracks', 'vectors']]

SampleDict

Functions

napari.types.image_reader_to_layerdata_reader(func: Callable[[str | Path | Sequence[str | Path]], ndarray | dask.array.Array | zarr.Array]) Callable[[str | Path | Sequence[str | Path]], list[tuple[Any] | tuple[Any, Mapping] | tuple[Any, Mapping, Literal['graph', 'image', 'labels', 'points', 'shapes', 'surface', 'tracks', 'vectors']]]][source]#

Convert a PathLike -> ArrayLike function to a PathLike -> LayerData.

Parameters:

func (Callable[[PathLike], ArrayLike]) – A function that accepts a string or list of strings, and returns an ArrayLike.

Returns:

reader_function – A function that accepts a string or list of strings, and returns data as a list of LayerData: List[Tuple[ArrayLike]]

Return type:

Callable[[PathLike], List[LayerData]]