In myelography, doctors do a spinal tap so that they can inject a radiopaque contrast agent (dye) into the subarachnoid space (the channel between the layers of tissue that cover the brain and spinal cord). The dye makes structures easier to see on x-rays. Then x-rays are taken. Myelography has been largely replaced by magnetic resonance imaging (MRI), which produces more detailed images and is simpler and safer to do. Myelography with computed tomography (CT) is used when doctors need detailed images of the spinal cord or MRI is not available.