Evaluation of patient dose using a virtual CT scanner: Applications to 4DCT simulation and Kilovoltage cone-beam imaging