X-ray therapy EPI artifact reduction and control of imaging is provided. Scanning
of images is synchronized with the pulse rate of the x-rays. The scanning period
is longer than the pulse rate period, so artifacts are generated within the resulting
images. Due to the synchronization, the pulse variation artifacts are aligned across
multiple images. The synchronization and resulting alignment of linear artifacts
allows for gain correction as a function of lines within the image. Such gain correction
reduces or removes non-linearities associated with pulse rate variation.