scallops.visualize.napari.experiment_napari

scallops.visualize.napari.experiment_napari(experiment, labels=None, title_attribute='common_src', viewer=None, **kwargs)

View an exp in Napari.

Napari is a versatile multi-dimensional image viewer, and this function facilitates the visualization of an entire exp, including different imaging channels and timepoints, using the Napari viewer.

Parameters:
  • experiment (Experiment) – Experiment to display

  • labels (Experiment | dict[str, ndarray | DataArray] | None) – Labels (e.g., from segmentation) that map image key to label array.

  • title_attribute (str) – Attribute to set as the window title

  • viewer (napari.Viewer) – An existing Napari viewer instance

  • kwargs – Keyword arguments to be passed to viewer.add_image

Returns:

Napari viewer

Example:

Return type:

napari.Viewer

from scallops.visualize.napari import expnapari
import scallops

# Load an exp
exp = scallops.io.read_experiment("path/to/exp")

# View the exp in Napari
napari_viewer = expnapari(exp)