Integrated optical filters for communications and sensing