Magnetic resonance imaging (MRI) is a painless test that produces detailed images of the brain along with the skull. An MRI machine uses radio waves and magnetic field for creating the images. The test is also known as head MRI or a cranial MRI. An MRI scan is different from an X-ray and CT scan. An MRI scan combines images to create a 3D picture of the internal structures. An MRI scan is more effective than other scans at detecting abnormalities in the small structures of the brain such as the brainstem and pituitary gland. Sometimes, to better visualize certain abnormalities and structures, a contrast agent is given through an intravenous line(IV).