SPM Lab III Wednesday, August 17 2005 1-3PM BME 499/Biostat 642 ============================================================================ Name: ___________________________________ Group Number: ___________________________________ Dataset Used: ________ Goals of this Lab ============================================================================ After this lab you will... 1. Be able to apply previously determined spatial normalization parameters to newly created results, making way for a random effects analysis. 2. Be able to explore the results, understanding whether an observed result is due to a large signal as small variance, or both. 3. Run a group analysis using all 8 of the subjects scanned. The rest of the lab time (and Wednesday's and Thursday's lab) are dedicated to your project. Spatially Normalizing "Other" Images ============================================================================ Yesterday you should have normalized your het1spgr image into the standard MNI space. This created a het1spgr_sn.mat file, which contains the nonlinear transformations required to move het1spgr's world space to the MNI space. You now will apply those transformations to other files. You will transform two contrast images and a mean functional image into the MNI space. The contrast image will be used for random effects inference, the mean functional image will be used to precisely characterize each subject's signal voids. 1. Create a mean functional. While SPM99 had a 'Means...' button, SPM2 doesn't have such a facility. So instead, copy the beta_0003 grand mean image from your block design result. Carefully copy the beta_0003 image, giving the new image the name run_1_mean Important! To copying an analyze image you have to copy all two or three components! This means you have to copy beta_0003.img beta_0003.hdr beta_0003.mat (if it exists) 2. Identify all files to be spatially normalized What is the filename of your Faces-Houses contrast for your block design data? (It should be con_XXXX.img, where XXXX is the contrast number) __________________________________________________________________ Simiarlly, what is the filename of your Faces-Houses contrast for your *event* related data? (It should be con_XXXX.img, where XXXX is the contrast number) __________________________________________________________________ The name of your functional mean image is ____ run_1_mean ____ 3. Set NaN's to zero in images to be transformed. SPM's beta and con images have the value NaN, or Not-a-number, in the regions outside of the brain mask. This creates a problem when such images are interpolated. When NaN is interpolated with a non-NaN value, a NaN results. But this means that any brain regions adjacent to a NaN region will be turned into NaN itself! If NaN values are left alone, the brain will 'contract' after being spatially normalized. So we must use a fancy version of SPM's ImCalc to convert NaN's into zeros. Enter the following in the Matlab command window (or copy this from the version of this document on the course website) P = spm_get(1,'*.img'); Pz = [spm_str_manip(P,'r') 'z']; spm_imcalc_ui(P,Pz,'i1',{[],-1}); This code snippet will create a new version of the specified file, with the de-NaN'd file having a trailing 'z' added to its file name. Turn NaN's into zeros on your block contrast, ER contrast, and your run_1_mean image (remember, it used to be a beta image). 4. Press 'Normalize'. Select "Write Normalized Only..." Select the _sn.mat file created yesterday, and then select the three above images to "write normalized". After this is done, examine this images in Check Reg. In particular, pay attention to how the signal voids have mapped onto the MNI space. 5. Are there regions of functional data outside the MNI brain? If so, where? __________________________________________________________________ __________________________________________________________________ __________________________________________________________________ 6. Are there regions of the MNI brain where there is no functional data? If so, where? __________________________________________________________________ __________________________________________________________________ __________________________________________________________________ 7. As a final step, look for instructions on the board on how to put these files into a common space. Note: Only one person per group needs to copy the files to the common space. Before sending to the common space, to facilitate the group analysis, make copies of the following files to be sent to the common space wcon_XXXX.{hdr,img,mat} - Normalized block contrast wcon_XXXX.{hdr,img,mat} - Normalized event-related contrast whet1spgr - Normalized structural image run_1_mean - Normalized functional image *Please* rename the copies to make them easy to use for the group: wcon_Bk_G?.{hdr,img,mat} - Normalized block contrast wcon_ER_G?.{hdr,img,mat} - Normalized event-related contrast whet1spgr_G? - Normalized structural image run_1_mean_G? - Normalized functional image where 'G?' is your group number. Group Analysis ============================================================================ 1. Collect and organize the data. Create an empty directory for the anlaysis. Decide to work with the block or ER data. 2. Use check reg to verify that all 6 sets of images are in the atlas space. (For both spgr's and funcs) 3. Define and fit a one-sample t-test using the 6 contrasts images Start by clicking 'Basic Models', and the first option 'One-sample t test' "Select design type..." 'One Sample t'test' "Select images" Select the 6 wcon img's "GMsca: grand mean scaling..." (Grand mean scaling was silently performed on the fMRI data. None is needed on the contrast data.) "explicitly mask images?" "No" (If we had a separate mask image we wanted to apply to the data, we could specify it here.) "Global calculation..." "omit" (The contrast images have no need to be globally scaled [they'll have a global value near zero].) The design is now specified and a SPM.mat file created. Click 'Estimate' and specify the SPM.mat file to fit the model. In 'Results', the contrasts are *very* simple to define. The 'Faces-Houses' contrast is just '1', and the the 'Houses-Faces' contrast is just '-1'. Is there a significant group result? ________________________________________________________________ ________________________________________________________________ Is this similar to your individual subject's result? ________________________________________________________________ ________________________________________________________________ 4. To better understand the results of the group model, here are some hints on visualizing the un-thresholded results. These tips apply equally-well to intrasubject results. Visualization of results ============================================================================ The "glass brain" MIP viewer is a very crude way to visualize your results. While conveniently summarizing your 3D results in a fixed 2D picture, there is so much more to your data. As in Lab 1, use ImCalc to create a ResStd image. (I.e. Select the ResMS.img, and enter the output image name ResStd, and the equation sqrt(i1) ). Now, use Check Reg to view four images simultaneously I. wt1spgr_mean* ... For anatomical reference II. spmT_XXXX ... The statistic image of your Faces-Houses contrast III. con_XXXX ... The image filename of your F-P contrast IV. ResStd ... The standard deviation image * If this isn't already created for you, you can create wt1spgr_mean with P = spm_get(Inf,'*img','Select all wt1spgrs'); spm_imcalc_ui(P,'wt1spgr_mean','mean(X)',{1}) Now explore the statistic image. If necessary, adjust the contrast of each image with the 'Add color bar' feature of spm_orthviews. 0. Is there alot of structure in the standard deviation image? Can you see anatomical features? _______________________________________________________________ 1. Can you see any correspondences between regions of significance in the t image and structure in the standard deviation image? _______________________________________________________________ 2. Go to a region of large positive change. Is this due to a large effect (in the contrast) or a relative dip in the standard deviation _______________________________________________________________ Use an approach like this to really understand what is going on in your experimental effects. Of course, when you have to make a decision, or "statistical inference", you have to return to the "Results" part of SPM. This concludes the guided part of the lab. You can now start on your project. Goto http://www.umich.edu/~fmri/course/FinalProj.html and choose a project, but first check with Tom before starting, to make sure no one else is doing the same project. $Id: Lb_SPM3.txt,v 1.2 2005/08/19 01:57:35 nichols Exp $