Is the output label of largest_k ordered?
hhuang91 opened this issue · comments
Hi,
I'm wondering if the output label of largest_k is ordered?
For example, if I have
labels_out = cc3d.largest_k(labels_in, k=3, connectivity=6)
Does that mean (labels_out==3).sum() > (labels_out==2).sum() > (labels_out==1).sum()
,
or (labels_out==3).sum() < (labels_out==2).sum() < (labels_out==1).sum()
,
or there is no particular order?
I'm asking because I have seen cases where larger label has larger number of components, but also cases where larger number has very small number of components, sometime even 1.
Thank you!
Hi! No, there is no particular ordering on the output label. There may be some loose spatial ordering to it, but it's the result of the output of union-find and a renumbering scan over the volume.
Thank you for the clarification!