  Simulation of x-ray projection images plays an important role in cone beam CT
(CBCT) related research projects. A projection image contains primary signal,
scatter signal, and noise. It is computationally demanding to perform accurate
and realistic computations for all of these components. In this work, we
develop a package on GPU, called gDRR, for the accurate and efficient
computations of x-ray projection images in CBCT under clinically realistic
conditions. The primary signal is computed by a tri-linear ray-tracing
algorithm. A Monte Carlo (MC) simulation is then performed, yielding the
primary signal and the scatter signal, both with noise. A denoising process is
applied to obtain a smooth scatter signal. The noise component is then obtained
by combining the difference between the MC primary and the ray-tracing primary
signals, and the difference between the MC simulated scatter and the denoised
scatter signals. Finally, a calibration step converts the calculated noise
signal into a realistic one by scaling its amplitude. For a typical CBCT
projection with a poly-energetic spectrum, the calculation time for the primary
signal is 1.2~2.3 sec, while the MC simulations take 28.1~95.3 sec. Computation
time for all other steps is negligible. The ray-tracing primary signal matches
well with the primary part of the MC simulation result. The MC simulated
scatter signal using gDRR is in agreement with EGSnrc results with a relative
difference of 3.8%. A noise calibration process is conducted to calibrate gDRR
against a real CBCT scanner. The calculated projections are accurate and
realistic, such that beam-hardening artifacts and scatter artifacts can be
reproduced using the simulated projections. The noise amplitudes in the CBCT
images reconstructed from the simulated projections also agree with those in
the measured images at corresponding mAs levels.
