Gravar-mail: Metric Learning for Image Registration