MRI uses strong magnetic fields and radio waves to produce detailed images of the inside of the body. It was pioneered in the 1970s, with the first whole-body MRI scan of a human performed in 1977. Different pulse sequences, like spin echo and gradient echo, can be used to produce T1-weighted, T2-weighted, or proton density-weighted images. Contrast in MRI depends on the relaxation properties of tissues, described by T1 and T2 times. Spatial encoding allows the signal from individual voxels to be localized into images using techniques like slice selection, phase encoding, and frequency encoding.