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
In[1]:=1

✖
https://wolfram.com/xid/0dnfa6tyjxc665j08fmdb5b86ab-7ewob