Extract the largest connected component of the mask.
Parameters:
connectivity (int) – 4 or 8, the connectivity of the components. If 4, then only horizontal
and vertical connections are considered, if 8, then also diagonal connections are
considered.
inplace (bool) – whether to perform the operation in place or to return a new object
Returns:
An RLEMask object representing the largest connected component of this mask.