medpy.filter.label.relabel_non_zero#
- medpy.filter.label.relabel_non_zero(label_image, start=1)[source]#
Relabel the regions of a label image. Re-processes the labels to make them consecutively and starting from start. Keeps all zero (0) labels, as they are considered background.
- Parameters:
- label_imagearray_like
A nD label map.
- startinteger
The id of the first label to assign
- Returns:
- relabel_mapndarray
The relabelled label map.
See also