Scanning near-field optical microscopy: transfer function and resolution limit