scallops.segmentation.watershed.segment_nuclei_watershed

scallops.segmentation.watershed.segment_nuclei_watershed(image, nuclei_channel=0, threshold=200, area_min=40, area_max=400, smooth=1.35, radius=15)

Segment nuclei using watershed algorithm.

Uses local mean filtering to find cell foreground from aligned but unfiltered data, then filters identified regions by mean intensity threshold and area ranges.

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

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

  • area_min (float) – Minimum area to be considered a nuclei

  • threshold (float) – Foreground regions with mean DAPI intensity greater than threshold are labeled as nuclei.

  • area_max (area_min,) – After individual nuclei are segmented from foreground using watershed algorithm, nuclei with area_min < area < area_max are retained.

  • smooth (float) – Size of gaussian kernel used to smooth the distance map to foreground prior to watershed.

  • radius (int) – Radius of disk used in local mean thresholding to identify foreground.

Returns:

Nuclei labels

Return type:

ndarray