Hello,
The value of a kernel voxel is the value of the smoothing function at that point ( taking the centre of the kernel to be the centre of the smoothing function ). The kernel voxels are assumed to line-up with the image voxels, e.g. the result of the smoothing is the voxelwise convolution of the kernel with the image data at each point.
To generate your own kernel you need to first decide on its extent - e.g. how many voxels in each direction, this should be an odd number so the kernel is symmetric around the centre voxel. Then, taking the voxel sizes as being the same as the input data ( here 2mm ) calculate the value of the smoothing kernel at each voxel. You are convolving three smoothing functions with different sigmas together ( x, y and z ) this could be done using e.g. MATLAB or python to loop over the co-ordinates and populate an image with the smoothing values.
Hope this helps,
Kind Regards
Matthew
> Hi Mark and Stefano,
>
> I'm also interested in performing anisotropic smoothing; would you mind providing some more details on this?
>
> Per your last post, "you can apply an anisotropic smoothing by creating a custom kernel file. This needs to be a nifti image and will be fairly small (the size of the non-zero kernel) and filled with whatever values you wish it to have). We recommend that it has the same voxel size as the image you will apply it to."
>
> 1) Do the intensity values of the nifti kernel file matter, or just need to be >0?
>
> 2) I'm using 2mm isotropic functional data and want to do smoothing at intervals <2mm, e.g. FWHM=1.5mm smoothing in the X, 3mm in the Y, and 4.5mm in the Z. Is this possible?
>
> 3) Related to 3, how can I make the relevant kernel file the desired size while still using the same voxel size as the target data? It seems like this nifti would need to be composed either of a single 1.5x3x4.5mm voxel or of multiple smaller voxels (e.g. 1x2x3 @ 1.5mm isotropic).
>
> Many thanks,
> -Ely
|