The influence of a two- or three-dimensional electron gas in the emitter of resonant tunnelling structures