Dear NZuo,
I am not sure if I understand your question. I think the 6 appears because outside of -x:x (x = round(6*s1(1))) the Gaussian filter effectively does not change anything, and when limiting the domain, the computation becomes quicker. The value 6 is probably arbitrary. Regarding the box size, I think it does depend on FWHM:
% s - [sx sy sz] Gaussian filter width {FWHM} in mm (or edges)
s = s./VOX; % voxel anisotropy
s1 = s/sqrt(8*log(2)); % FWHM -> Gaussian parameter
x = round(6*s1(1)); x = -x:x; x = spm_smoothkern(s(1),x,1); x = x/sum(x);
so it is not set by default (unless you do not change FWHM from the default value of 8mm).
Best,
Wiktor Olszowy
|