We consider the template matching problem, in which one wants to find all good enough occurrences of a pattern template P from a larger image I. The current standard of template matching is based on cross correlation computed in Fourier domain, using the Fast Fourier Transform (FFT). This can be extended to rotations of the template by a suitable rotational sampling of the template. An alternative approach, pursued here, is to solve the problem in the spatial domain using so?called filtering algorithms. Such algorithms scan the image quickly and find all promising areas for a more accurate (but slower) examination such that no good enough occurrences of the template are lost. The paper shows that the filtering approach can be orders of magnitude faster than the FFT based method. Especially in the 3D case the FFT is intolerably slow.