  Robust segmentation is critical for deriving quantitative measures from
large-scale, multi-center, and longitudinal medical scans. Manually annotating
medical scans, however, is expensive and labor-intensive and may not always be
available in every domain. Unsupervised domain adaptation (UDA) is a
well-studied technique that alleviates this label-scarcity problem by
leveraging available labels from another domain. In this study, we introduce
Masked Autoencoding and Pseudo-Labeling Segmentation (MAPSeg), a
$\textbf{unified}$ UDA framework with great versatility and superior
performance for heterogeneous and volumetric medical image segmentation. To the
best of our knowledge, this is the first study that systematically reviews and
develops a framework to tackle four different domain shifts in medical image
segmentation. More importantly, MAPSeg is the first framework that can be
applied to $\textbf{centralized}$, $\textbf{federated}$, and
$\textbf{test-time}$ UDA while maintaining comparable performance. We compare
MAPSeg with previous state-of-the-art methods on a private infant brain MRI
dataset and a public cardiac CT-MRI dataset, and MAPSeg outperforms others by a
large margin (10.5 Dice improvement on the private MRI dataset and 5.7 on the
public CT-MRI dataset). MAPSeg poses great practical value and can be applied
to real-world problems. GitHub: https://github.com/XuzheZ/MAPSeg/.
