mango.image.label

mango.image.label(input, val, connectivity=6, dosort=True)

Generates image of labeled connected components.

Parameters:
  • input (mango.Dds) – Image to label (must have input.mtype == mtype("segmented")).
  • val (int) – The value in the input image for which connected component labels are generated.
  • connectivity (int) – Connectivity structuring elements type, only 6-neighbour or 26 neighbour connectivity.
  • dosort (bool) – Whether to sort the component labels. Sorting generates a label sequence which is related to the global voxel index of the labeled components. Sorting produces consistant labeling no matter the MPI layout of the input data.
Return type:

mango.Dds

Returns:

An image with connected components each having a unique label.

Previous topic

mango.image.intensity_mult_distance_spherical_histogram

Next topic

mango.image.eliminate_labels_by_size

This Page