Sunday, January 10, 2016

SPM Smoothing: A Reader Writes

The angry red pustule of the Gaussian normal distribution
I love questions, because questions get answers. One question you may be asking is, "Why are my smoothness estimates in SPM so whack?" To which the obvious response is, "How much whack are we talking about here? Whiggidy-whack, or just the regular kind?" Details matter.

If the former, then the following code snippet may help. In the absence of a gold standard for calculating smoothness estimates, often we have to resort to our own ingenuity and cunning, by which I mean: Copy what other people are doing. One alert reader, Tamara, noticed that the standard SPM function for estimating smoothness, spm_est_smoothness, is so whack that all the other SPM functions want nothing to do with it. Which is kind of the goal of life, when you think about it - to not be that guy everyone else wants to avoid.

In any case, if you are having issues with it, the following code may help. I've also included the rest of the email, just to make you aware that I can and will publish your correspondence without your consent.


Hi Andy, I never figured out why spm_est_smoothness is not working, although other people have had the same issue with getting estimates in the thousands.  Ultimately, I ended up using this simple code to estimate each individual's smoothness, and then averaged across subjects.  Jim Lee posted this on the SPM listserv along with this note:  
The smoothness estimates in SPM.xVol.FWHM are in units of VOXELS, so you need to multiply by the voxel dimensions to get them in mm. Something like this:
load SPM.mat; M = SPM.xVol.M; VOX = sqrt(diag(M(1:3,1:3)'*M(1:3,1:3)))'; FWHM = SPM.xVol.FWHM; FWHMmm= FWHM.*VOX; disp(FWHMmm);

Thanks again for your help!!

9 comments:

  1. I find really nice the fact that you take the time to answer people questions, I have one, maybe it is so silly, but it is actually driving me crazy and I haven't been able to figure that out, an explanation from an expert will be really appreciated. The question is, in imaging itself, what is the difference between fMRI and MRI? I'm not talking about concepts itself, instead it is related to the process that SPM and FSL (and all those tools) do, what is the difference among the processes, the defaults, and so on.

    The doubt came because I see that SPM has distinction between fMRI, PET and EEG, however, what about MRI? should it be processed under fMRi? what would be the difference? Like I said, maybe it is a silly question, but I really need to clear it out to move forward.

    I'm sorry for the long message, I wanted to ask on a private one, but not sure how to do it.

    Thanks!!

    ReplyDelete
    Replies
    1. Hey there,

      That's not a silly question at all - distinctions matter. I remember when I started learning fMRI I was afraid to ask what a beta weight was, because everybody else seemed to know what it was; I didn't want to appear stupid. Later on I figured it out, and I also realized that those same people didn't know it as well as I thought they did. I have cursed their names ever since.

      Regarding your question: when you talk about MRI analysis, are you referring to some kind of structural analysis? By that I mean something like volumetric analysis - calculating differences in white or gray matter volume, for example . Those are the types of analyses that would be done with MRI (or T1-weighted) data. Or are you referring to something different?

      If you want, give me an example of the type of analysis that you want to do. We'll figure it out.


      -Andy

      Delete
    2. hi Andy! thanks for your reply and attention. Y, it is indeed structural MRI, I'm interested in the shape and anatomical features of the brain, no functional at all. This is for studies regarding lesions or any other difference in brain structure that can help in the identification of the epileptogenic zone in epileptic patients, all the data are structural MRI.

      And I totally get that, everyone else seems an expert in the field when you're starting, but soon that impression fades away, not that they're not experts, it's just that you remember all of us are human, hence we don't know everything and we can make mistakes, and that's why I'm approaching you, you seem to know very well and you look kind (and maybe the distance helps).

      Thanks again!!

      Perla

      Delete
    3. Hi Perla,

      I am only familiar with using FreeSurfer for volumetric analyses - i.e., calculating differences in grey matter volume and cortical thickness. While FreeSurfer can identify the location and size of white matter lesions, I'm not sure whether it can be used for identifying epileptogenic zones. I would ask the FreeSurfer developers about that.

      Best,

      -Andy

      Delete
    4. Thank you,Andy,
      My concern is, I know that SPM has been used to assess the volumetric characteristics of the brain by using structural MRI scans, but I'm still not sure about the process they followed since SPM is split into fMRI,PET and EEG. It might look like the common sense would say fMRI, but I shouldn't assume but do the stuff with confidence.

      However, thanks for your answer :) I'll keep digging into more documentation on this matter.

      Delete
    5. Maybe a little late to reply but usually it's the module VBM (now renamed to CAT12) that is used for MRI structural-only analysis, also called morphometric analysis. Basically, it's similar to the SPM fMRI pipeline, but there is no functional coregistration and the segmentation is done by VBM/CAT instead of SPM's. I guess you could also use SPM's segmentation but I never heard about anyone doing that (but I'm quite new to this kind of analysis so I don't really know :) ).

      So if you or someone you know has an SPM fMRI preprocessing pipeline, you can probably reuse that and just remove the functional coregistration step (and of course you need to adapt the other steps to just use structural images), and use VBM/CAT segmentation instead of SPM (if you try SPM's segmentation, let me know how it works out for you!).

      Delete
    6. Also note that VBM/CAT is a toolbox for SPM, so this might be why you heard that you could use SPM to do morphometric analyses (people tend to confuse SPM and the third-party toolboxes :) ).

      Delete
    7. Another note: VBM/CAT is a toolbox implementing an approach to analyze the changes in tissues density, usually on the grey matter segmented image.

      Delete
    8. And finally, yes you should use spm fmri interface when you use VBM. For CAT12 I don't know, I think they got their own interface now, so you should maybe use that instead. But most litterature you will find will be about VBM8 (which is the older version).

      Delete