scallops.segmentation.stardist.segment_nuclei_stardist

scallops.segmentation.stardist.segment_nuclei_stardist(image, nuclei_channel=0, pmin=3, pmax=99.8, clip=False, chunks=(4096, 4096), depth=None, **kwargs)

Segment nuclei using StarDist.

Parameters:
  • image (DataArray) – Input image with the dimensions (t, c, z, y, x).

  • nuclei_channel (int) – Index of the nuclei channel (typically DAPI).

  • pmin (float) – Minimum percentile for image normalization.

  • pmax (float) – Maximum percentile for image normalization.

  • clip (bool) – Whether to clip normalized values.

  • chunks (tuple[int, int] | None) – Chunk size to perform segmentation using overlapping chunks.

  • depth (int | None) – The number of elements that each block should share with its neighbors when using dask

  • kwargs (Any) – Additional keyword arguments to pass to StarDist predict_instances.

Returns:

Nuclei labels as a NumPy array.

Return type:

ndarray