Smoothing HOWTO

How-Tos - Smoothing

How do I...

Smooth in SPM?

Easiest thing there is to do in SPM, actually. Which is nice.

Fire up SPM. Hit "Smooth" in the main interface.

smoothing (FWHM in mm)? Enter in your kernel size. See SmoothingFaq, #5 if you don't know what it should be.

Select scans: Select all of your functional images for the subject. If you like, you can select all of the functional images for all of your subjects all at once. Smoothing doesn't look at how many scans you have or care about whether they're all from the same subject or session; smoothing is done on a totally image-by-image basis, with no interaction whatsoever between scans, and it's done identically for all sessions and subjects. So you can choose as many or as few functional scans as you like.

Smoothing is a relatively fast process, taking a fraction of a second per image. It produces s*.img files as output, in the same directory as the original files.

Figure out what my smoothing kernel should be?

See SmoothingFaq, question #5.

Figure out what my smoothing kernel was?

In SPM, at least, this isn't too tricky. The smoothing algorithm leaves a description in the header file of the image which you can view with SPM's "Display" function. So fire up SPM and hit "Display." Choose one of your s*.img files - even if you've done more processing on the images after smoothing, the s*.img is the one that's most likely to have the smoothing message. In the right-hand panel, below the line that reads "Intensity" and above the line that reads "Vox size," there should be a message that looks something like "spm - 3D normalized - conv(6,6,6)." Non-normalized data won't have that bit about normalization, but the message should end in "conv(something, something, something)." That "something" is your smoothing kernel, in mm. The example above had a 6mm smoothing kernel used on it.

Do something tricky, like multifiltering?

Well, "something tricky" is a little generic. But if you actually want to do multifiltering, here's a sketch of the analysis path:

Do your preprocessing up through smoothing as usual. Before you smooth, make a separate copy of your whole functional image directory. Label one "functional_smoothed." Smooth the images in the functional_smoothed directory as above. Create two separate results directories, "results" and "results_smoothed."

Create an identical design matrix and model in each results directory - one specifying the non-smoothed functionals, one specifying the smoothed functionals. Estimate both models.

Finally, create a new results directory, called "results_multifiltered." Copy the entire contents of one of the other results directories into this one (doesn't matter which one is the source), then delete all the beta*.img files from the multifiltered results directory.

Cd into the multifiltered results directory and start SPM. Hit "ImCalc". Choose the beta_0001.img from the results directory and the beta_0001.img from the results_smoothed directory. As output filename, put beta_0001.img - it's crucial the filename remains the same. For evaluated function, type (i1 + i2) ./ 2. This will create a new beta_0001.img in the results_multifiltered directory that is the average of the smoothed and unsmoothed results. Repeat these steps for each beta image. (You could also perform the averaging on the contrast images, which would be fewer images... but then every time you made a new contrast, you would have to make it first for the regular results and smoothed results, then repeat the averaging step. If you do this, you need to average both the con_.img files and the spmT_.img files.)

Now hit "Results" and go to the SPM.mat in the multifiltered directory. It should see the beta images in its current directory fine (the filenames are stored without paths for beta* and con* images), and you should be able to make contrasts that are multifiltered. Compare them to the same contrast you make in the results and results_smoothed directories, and see how they stack up!

Smooth my contrast images (or other non-functional images, or ROIs)?

Same way you smooth your functional images. Go to SPM, hit "Smooth" on the main interface, enter in a kernel value, and choose the images you like. The smoothing algorithm will produce s*.img files in the same directory, just as with functionals.

Figuring out kernels for non-functional images isn't too tricky; just use the same kernel you used on your functionals. If you didn't smooth your functionals, use the kernel you would have used or that seems appropriate for the size of activation you're hoping to detect. See SmoothingFaq, question #5 for help.