megafish.napari module

tile_2d(zarr_path, groups, pitch, colors, limits)[source]

Visualizes 2D tiled image data from a Zarr dataset using napari.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • groups (list of str) – List of Zarr group names to be visualized.

  • pitch (tuple of float) – Physical size of each pixel in micrometers (y, x).

  • colors (list of str) – List of colormap names for each image channel.

  • limits (list of tuple) – Contrast limits for each image channel in the format [(min, max), …].

Returns:

None. The function opens a napari viewer displaying the images.

registered(zarr_path, pitch, max_level, groups, colors, limits, genename_path=None)[source]

Visualizes multiscale registered image data from a Zarr dataset using napari, with optional gene name display.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • pitch (tuple of float) – Physical size of each pixel in micrometers (y, x).

  • max_level (int) – Maximum pyramid level to load for each group.

  • groups (list of str) – List of Zarr group names containing the image data to be visualized.

  • colors (list of str) – List of colormap names for each image channel.

  • limits (list of tuple) – Contrast limits for each image channel in the format [(min, max), …].

  • genename_path (str, optional) – Path to a CSV file containing gene names for each cycle. If provided, gene names will be displayed based on the current cycle slider value.

Returns:

None. The function opens a napari viewer displaying the images with multiscale support and optional annotations.

registered_is(zarr_path, pitch, max_level, groups, colors, limits, genename_path=None)[source]

Visualizes registered image data with image stitching from a Zarr dataset using napari, with optional gene name display.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • pitch (tuple of float) – Physical size of each pixel in micrometers (y, x).

  • max_level (int) – Maximum pyramid level to load for each group.

  • groups (list of str) – List of Zarr group names containing the image data to be visualized.

  • colors (list of str) – List of colormap names for each image channel.

  • limits (list of tuple) – Contrast limits for each image channel in the format [(min, max), …].

  • genename_path (str, optional) – Path to a CSV file containing gene names for each cycle. If provided, gene names will be displayed based on the current cycle slider value.

Returns:

None. The function opens a napari viewer displaying the images with multiscale support and optional annotations.

Notes

  • The function supports multiscale image data and displays different channels with specified settings.

  • If a gene name file is provided, gene names will update based on the current cycle index in the viewer.

segment(zarr_path, pitch, max_level, groups, colors, limits)[source]

Visualizes segmented and labeled image data from a Zarr dataset using napari, with support for multiscale images.

Parameters:
  • zarr_path (str) – Path to the Zarr file containing the image data.

  • pitch (tuple of float) – Physical size of each pixel in micrometers (y, x).

  • max_level (int) – Maximum pyramid level to load for each group.

  • groups (list of str) – List of Zarr group names containing the image data to be visualized.

  • colors (list of str) – List of colormap names for each image channel. Use “label” for segmented data.

  • limits (list of tuple) – Contrast limits for each image channel in the format [(min, max), …].

Returns:

None. The function opens a napari viewer displaying the images with multiscale support.