Gauss3: fix bug in computation of temporary image dimensions.
Gauss3: added static method with numThreads parameter and method to compute halfkernel sizes.