Planar waveguide refractive-index profiling using modal intensity distributions.