This presentation will begin by detailing how domain knowledge can be effectively incorporated into neural network architectures for pairwise medical image registration. I will highlight how such integration improves the speed, accuracy, and data efficiency of the registration process, addressing the challenges posed by large and complex medical datasets. I will then explore model-driven groupwise registration techniques for atlas construction. The resulting atlas enables one-shot segmentation, where a single manual annotation of the template image can be accurately propagated to individual subjects through the learned deformations. Building on the estimated atlas geometry and deformations, I will further introduce a novel statistical shape modelling strategy that implicitly generates new anatomical heart shapes. This method maintains exact point-to-point correspondence and prevents mesh folding, while ensuring anatomical plausibility using diffeomorphic transformations.