Wavefront picking for 3 D tomography and full-waveform inversion