In myelography, doctors do a spinal tap so that they can inject a radiopaque contrast agent into the subarachnoid space (the channel between the layers of tissue that cover the brain and spinal cord). The contrast agent makes structures easier to see on x-rays. Then x-rays are taken.
Myelography has been largely replaced by magnetic resonance imaging (MRI), which usually 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 and MRI is not available.