thor.pp.load_nuclei

thor.pp.load_nuclei(nuclei_path=None, source_format='cellpose')[source]

Load nuclei segmentation result from a file.

Parameters:
  • nuclei_path (str) – Path to the nuclei segmentation result file.

  • source_format (str) – Format of the nuclei segmentation result file. Options: ‘cellprofiler’, ‘cellpose’, ‘mask_array_npz’.

Returns:

  • labels (numpy.ndarray) – Nuclei segmentation labels (numpy array: n_cells)

  • nuclei_centroids (numpy.ndarray) – Nuclei positions (numpy array: n_cells x 2)