A Deformable Grid Approach for Bayesian Image Registration