Generating synthetic CTs from magnetic resonance images using generative adversarial networks