During a CT scan, the patient lies on a bed that slowly moves through the gantry while the x-ray tube rotates around the patient, shooting narrow beams of x-rays through the body. Instead of film, CT scanners use special digital x-ray detectors, which are located directly opposite the x-ray source.