In magnetic resonance imaging, the magnetic field is made spatially dependent through the application of magnetic field gradients. The initial step in MRI is the localization of the RF excitation to a region of space, which is accomplished through the use of frequency‐selective excitation in conjunction with a gradient known as the slice selection gradient. The slice orientation is determined by the particular physical gradient or gradients defined as the logical slice selection gradient. The signal detection portion of the MRI measurement is known as Readout or Frequency Encoding. The readout process differentiates MRI from MR spectroscopy, the other type of MR experiment. The principle of phase encoding is based on the fact that the proton precession is periodic in nature. In order to accomplish efficient data collection with minimal computer processing, most MRI techniques use some form of repetitive execution, which is achieved using computer instructions known as loops.