Skip to content

anybioimage

Interactive bioimage viewer widget for Jupyter and marimo notebooks. Built on anywidget.

Key features

  • 5D image support — Time, Channel, Z-stack, Y, X with interactive sliders
  • Multi-channel composites — Per-channel color, LUT, and visibility controls
  • OME-Zarr — Lazy loading for large images; multi-resolution tile rendering
  • HCS plates — Navigate OME-Zarr HCS plates by well and FOV
  • Mask overlays — Multiple labeled layers with color, opacity, and contour options
  • Annotation tools — Draw rectangles, polygons, and points; export as DataFrames
  • SAM integration — Segment Anything Model triggered by rectangle or point annotations

Installation

uv pip install anybioimage

# With BioImage file support and contour rendering (recommended)
uv pip install "anybioimage[all]"

# Including SAM (requires PyTorch, Python 3.10–3.12)
uv pip install "anybioimage[complete]"

Minimal example

from anybioimage import BioImageViewer
from bioio import BioImage

viewer = BioImageViewer()
viewer.set_image(BioImage("image.zarr"))
viewer
import marimo as mo
from anybioimage import BioImageViewer
from bioio import BioImage

viewer = BioImageViewer()
viewer.set_image(BioImage("image.zarr"))
mo.ui.anywidget(viewer)
import numpy as np
from anybioimage import BioImageViewer

data = np.random.randint(0, 255, (3, 512, 512), dtype=np.uint8)  # CYX
viewer = BioImageViewer()
viewer.set_image(data)
viewer