Radiotherapeutic computed tomography with scanned photon beams