Robust Registration of Medical Images in the Presence of Spatially-Varying Noise