A slab optical waveguide confines in one transverse dimension optical
signals propagating in two dimensions therein, and has a set of
diffractive elements collectively arranged so as to exhibit positional
variation in amplitude, optical separation, or spatial phase. The
diffractive elements are collectively arranged so as to apply a transfer
function to an input optical signal to produce an output optical signal.
The transfer function is determined at least in part by said positional
variation in amplitude, optical separation, or spatial phase. The
waveguide and diffractive elements are arranged so as to confine only one
of the input and output optical signals to propagate in the waveguide so
that the optical signal thus confined is successively incident on the
diffractive elements, while the other optical signal propagates
unconfined by the waveguide in a direction having a substantial component
along the confined dimension of the waveguide.