Bayesian Framework for Image Registration Using Eigenfunctions