Band pass filter only for pixels inside a mask

I don’t get the idea. Could you post an example of what you want precisely ?