Nonlinear Fourier based spectral filtering