In order to improve image quality, a technique for obtaining information for eliminating distortions of the k-space in the readout direction and the phase encoding direction caused by the waveform distortion of the gradient magnetic field pulse is provided. A pulse sequence for the main scan is used to repeatedly measure echoes with changing the time integral value of the dephasing pulse for the readout gradient magnetic field. In the above measurement, the phase encoding pulse is not made zero, but two-dimensional data are measured in the same manner as that of the main scan. By using the measured two-dimensional data, correction information for eliminating distortions of the k-space in the readout direction and the phase encoding direction caused by the waveform distortion of the gradient magnetic field pulse is calculated in each of the readout direction and the phase encoding direction.