Noise reduction for X-ray based imaging