An optical apparatus comprises a planar optical waveguide having at least
two reflectors. The planar optical waveguide substantially confines in at
least one transverse spatial dimension optical signals propagating
therein, and the reflectors define an optical resonator that supports at
least one resonant optical cavity mode. At least one of the reflectors
comprises a set of diffractive elements arranged: so that an optical
signal in one of the resonant optical cavity modes is successively
incident on the diffractive elements; so as to exhibit a positional
variation in amplitude, optical separation, or spatial phase; and so as
to apply a transfer function to the optical signal successively incident
on the diffractive elements. The transfer function is determined at least
in part by said positional variation in amplitude, optical separation, or
spatial phase exhibited by the diffractive elements.