Add spatial filter code using matrix multiplies.