  We present a versatile numerical algorithm for computing resonances of open
dielectric cavities. The emphasis is on the generality of the system's
configuration, i.e. the geometry of the (main) cavity (and possible inclusions)
and the internal and external dielectric media (homogeneous and inhomogeneous).
The method is based on a scattering formalism to obtain the position and width
of the (quasi)-eigenmodes. The core of the method lies in the scattering
S-matrix and its associated delay Q-matrix which contain all the relevant
information of the corresponding scattering experiment. For instance, the
electromagnetic near- and far-fields are readily extracted. The flexibility of
the propagation method is displayed for a selected system.
