QMRITools`
QMRITools`

SelectMaskComponents

SelectMaskComponents[mask]

selects the largest connected component in the mask.

SelectMaskComponents[mask,n]

selects the n largest connected components in the mask.

Examples