Custom image filter

I’d like to make a custom image filter. I did see the gauss filter. Similar to imfilter in matlab. I’d like to define my H matrix. I didn’t find anything on a search. Can I do this with vtk?

Here is the link to imfilter:
https://www.mathworks.com/help/images/ref/imfilter.html;jsessionid=d5b98bc13677ce99e38975b6f9cd