Function Registration From A Bayesian Perspective