MIDIS: quantifying the active galactic nucleus component of X-ray-detected galaxies