A wide range of medical applications in clinic and research exploit images acquired by fast magnetic resonance imaging (MRI) sequences such as echo-planar imaging (EPI), e.g. functional MRI (fMRI) and diffusion tensor MRI (DT-MRI). Since the underlying assumption of homogeneous static fields fails to hold in practical applications, images acquired by those sequences suffer from distortions in both geometry and intensity. In the present paper we propose a new variational image registration approach to correct those EPI distortions. To this end we acquire two reference EPI images without diffusion sensitizing and with inverted phase encoding gradients in order to calculate a rectified image. The idea is to apply a specialized registration scheme which on the one hand mimics the elastic behavior of the underlying tissue and on the other hand compensates for the characteristical direction dependent image distortions. In addition the proposed scheme automatically corrects for intensity distortions. This is done by evoking a problem dependent distance measure incorporated into a variational setting. Unlike existing approaches we adjust not only the image volumes but also the phase encoding direction after correcting for patients head-movements between the acquisitions. Finally, we present first successful results of the new algorithm for the registration of DT-MRI datasets.