SPM Lab II Tuesday, August 16 2002 1-3PM BME 499/Biostat 642 ============================================================================ Name: ___________________________________ Group Number: ___________________________________ Dataset Used: ________ Goals of this Lab ============================================================================ After this lab you will... 1. Be able to perform coregistration between the low resolution and high resolution structural images. You will understand the implications for a image to be the "Object" vs the "Target" in terms of the "world space" of each image. 2. Be able to perform spatial normalization, check its success, and apply the transformation to a contrast image. Coregistration ============================================================================ SPM's "Coregister" facility is used for registering different types of images from the same subject (it is a "intermodality, intrasubject" registration). To use it you must specify a "Target" or reference image, which does not move, and an "Object" image, which is moved to match the target. Recall that the rigid body transformation is recorded in the .mat file of the object image. Hence, it is not necessary to write out the transformed image (the Object transformed into the space of the Target), though it is sometimes convenient to do so. Before coregistering the low- and high- resolution structural images we need to (I) make sure the two images are in the same orientation and not too far from one another, and (II) correct for intensity inhomogeneities in the high-resolution SPGR image. 0. First see how close the het1overlay and het1spgr images are to start with. What button do you use to view more than one image? _______________________________________________________________ Multiple images are displayed in the space of the first image. If they are not previously registered this simply means that their origins are lined up. Neither image has had their origin set. What is the default origin? (Not a specific voxel x,y,z, but ...) _______________________________________________________________ 1. If the images were very out of register we could try to get the images closer by manually setting the origin to the Anterior Commissure (AC). A. On the board will be a diagram of how to find the AC on the midsagittal plane. Sketch it here B. Now use the Display button view the het1overlay image and locate the location, as best possible of the AC. You should be able to see it on the axial slice. Hint: Once you are close, it helps to "zoom in". In the display facility, click on the "Full Volume" pop-up menu; select "80x80x80 mm" What is the location of het1overlay's AC in voxels? _________ __________ ___________ Voxels C. Use the Display button view the t1spgr image and locate the location, as best possible of the AC. What is the location of t1spgr's AC in voxels? _________ __________ ___________ Voxels _________ __________ ___________ mm ? D. At this point we *could* set each image's origin using "Reorient images..." button in display but we won't. But just for reference... How to change the origin To change the origin, take the AC location in mm and *multiply* by -1. Enter these three values in the first three boxes on the left ("right {mm}", "forward {mm}", "up {mm}"). Click the bar below the title "Crosshair Position". This brings you to the origin, 0,0,0 mm's. Check that this origin is correct. If it isn't, change the shift values and move the cursor to the origin. Repeate as needed. When the origin is placed appropriately (i.e. when the crosshair position reads 0,0,0 voxels, and the crosshair lies over the AC), click "Reorient images...". Select the set of images (any number!) in the same space whose origin you want to change. We're not changing the origin for two reasons. First, the images *should* already quite close, but there's a more important reason. By setting the origin on the Target image (het1overlay), we change its "world space"; specifically, the origin of its world space moves from the center of the volume to the AC. Hence it will no longer have the same world space as the functional data *unless* we identically change the origin on all the functional data and any results (beta*, con*, spm_T* etc) we already created. To summarize, if the images are way off, we can set the origin manually to help the Coregistration. But if we change the origin of the image representing the functional space, we have to similarly change the origin on all functional images. 2. Two processing steps have been performed to the structural images. They have had been scalp-edited and corrected for inhomogenity. The t1 images have signal from the scalp and head. Since this extraneous information can throw off subsequent processing steps the image is scalped edited with FSL's BET software. The resulting images are prefixed with an 'e'. Compare 't1spgr.img' to 'et1spgr.img'. Check the quality of the scalpping. Are there any brain regions accidently 'scooped-out'? Where? ____________________________________________________________ Are there any nonbrain tissues that should have been excluded? Where are they? (Hint: Check the sagittal sinus). ____________________________________________________________ Anatomical images obtained with high-field magnets (>2T), tend to be brighter in the center of the field of view than at the edge. This inhomogenity can throw-off subsequent processing steps, espcially segmentation. The T1 'e'-images have been corrected for inhomogeneity with a script by Gary Glover and Kalina Kristoff; they resulting images are prefixed with an 'h'. Compare 'et1spgr.img' to 'het1spgr.img'. Can you see the greater intensity in the center of the et1spgr image? Does the het1spgr image look better? (Use window controls to make the images look similar over all. 3. Coregister! You will now "Coregister" the high resolution, het1spgr image to the het1overlay image. The het1overlay image has the same space as the functionals, and hence this coregistration will set het1spgr's world space to correspond to the functionals. A. What is your "Target" image? _________________________________________________________ B. What is your "Object" image? _________________________________________________________ (Stop! Ask if this is right before you continue.) C. Click on the Coregister button. You only have one subject and you want to "Coregister & Reslice". You will be asked for the modality of "Target" and "Object" image. What is modality of each? (Circle one) Target Modality: PET T1 MRI T2 MRI PD MRI EPI Transm SPECT Object Modality: PET T1 MRI T2 MRI PD MRI EPI Transm SPECT Select the Target and Object images you identified above. It asks for "Other images". This would be useful if we had other images that were acquired in the same space as the SPGR. We don't, so just click 'Done'. Now it will perform the coregistration. The transformation parameters are written in the .mat file of the object image het1spgr.img; this sets the world space of het1spgr to match that of het1overlay. Since we asked it to "Reslice", it will also create a rhet1spgr.img, an image with the same dimensions and world space as het1overlay. D. Note changes in world spaces. "Display" het1overlay.img and use the "World Space"/"Voxel Space" pop-up button to change between the two spaces. Does the image move as you flip between the two spaces? _____________________________________________________________ "Display" het1spgr.img and do the same again. Does the image move as you flip between the two spaces? _____________________________________________________________ Why does one move and the other doesn't? _____________________________________________________________ _____________________________________________________________ D. Check the success of the Coregistration. Use check reg to check the registration. Check the points mentioned in the last lab: i. Frontal pole ii. Occipital (posterior) pole iii. Left & Right sides (e.g. superior temporal gyrus) iv. Corpus collosum: (1) Most anterior, (2) most superior and (3) most posterior extent. Also try tracing sulci. Has the coregistration succeeded? _____________________________________________________________ _____________________________________________________________ Spatial Normalization ============================================================================ Spatial Normalization is SPMese for intersubject registration. It is essential for performing intersubject analyses or, for intrasubject analyses, determining Talairach/MNI coordinates of activation foci. While the "Normalize" button can accept any kind of image (T1, T2, etc), to register your subject into the standard atlas space, it is important to use the highest resolution structural data. 1. For us, that is which image: _________________________________________________ (Check your answer before continuing on!) Spatial normalization (or, with a British accent, normalisation) takes three types of images (i) "Source images" These are the high resolution anatomical images from which the spatial transformation is determined. Typically you only specify *one* such image per subject. (ii) "Images to write normalised" These are other images *with* *the* *same* *world* *space* as image (i) above. Typical examples would be statistic or contrast images, or whole set of ra* functional images. (iii) "Template image(s)" Images that define the standard atlas space. You get to choose from images that match the type (or "modality") of the image in (i). It produces a "*_sn3d.mat" file, which records the nonlinear transformation *from* the *world* *space* of image (i) *to* the atlas space. 2. Now that we have coregistered, what does the world space of het1spgr correspond to? __________________________________________________________ 3. Thus if we spatially normalize het1spgr the resulting _sn3d.mat file will not just be good for het1spgr, but for... __________________________________________________________ Click 'Normalize' to start the spatial normalization process. Select 'Determine Parameters Only'. For "Template images", select T1.img. This image is an average of 152 subject's T1 images, from the MNI/ICBM, smoothed with an 8mm filter. (ICBM=International Consortium for Brain Mapping). For "Source image, subj 1", select het1spgr.img For now, we are only doing 1 subject; so when it asks for "Source image, subj 2", just click 'done'. After a short while it will finish. This will create a _sn3d.mat and reslice the "source", creating a whet1spgr.img. Check the success of the registration, comparing the normalized image (whet1spgr.img) to the unsmoothed version of the template image, that is avg152T1.img in the spm99/canonical directory. 4. Using the landmarks suggested above, has the spatial normalization succeeded? _______________________________________________________________ _______________________________________________________________ Analyzing Event-Related Data ========================================================================= First! Create a new directory, like G?ER (except replace ? with your group number). Copy the onset data to those directories. Load these event timing data (here, for group 2; change 2 to your group number) FaceOns = load('G2ER_F.dat'); HousOns = load('G2ER_H.dat'); Look at them with this matlab command (type carefully!) figure plot(FaceOns, .9*ones(size(FaceOns)),'v',... HousOns,-.9*ones(size(HousOns)),'^') Do they look random? Note how you never have two events at the same time. First, smooth the data. Click the 'Smooth' button and select all of the run_2 ra*vol.img you will analyze. As yesterday, use a 8mm isotropic smoothing. This creates sra*vol.img's. Now specify a model. Briefly... "Interscan Interval {secs}" 2 (This is the TR) "scans per session:" 192 "specify design in" Scans "Select basis set..." 'hrf' "model interactions (Volterra)" 'no' (You'll always say 'no' here) "Number of conditions" 2 "name for condition/trial 1" Faces "vector of onsets - Faces" FacesOns (Crucially, this depends on you having defined a 'FacesOns' variable in the Matlab workspace before starting.) "duration[s] (events = 0) 0 (Since these are events, we specify zero duration). "parametric modulation" 'none' "name for condition/trial 1" Houses "vector of onsets - Faces" HousOns (Again, this will fail if 'HousOns' isn't defined.) "duration[s] (events = 0) 0 (Since these are events, we specify zero duration). "parametric modulation" 'none' Other regressors "user specified" 0 SPM has just saved a SPM.mat file with all of the specifications you just gave it. 2. Second, review the model. In the lower-left window, select 'Explore fMRI design' -> 'Session 1' -> 'Faces' Does this look different from the block design? How is the power spectrum different? _________________________________________________________________ _________________________________________________________________ 3. Assign data to this design Click 'fMRI and select the 'data' option. A file selection dialog will appear: 'Select SPM.mat' "Select scans for session 1" Select the scans in your study (run_2, event-related design) "remove Global effects" 'Scale' (Global scaling accounts for random, image-wide fluctuations) "High Pass filter" Specify "cutoff period (sec)" 128 (All drifts with sinusoidal periodicity of 128 seconds or greater will be modeled.) "Correct for serial correlations?" 'AR(1)' After a pause, SPM has will update you SPM.mat file with the information just supplied. The delay is because SPM must compute the global average for each image. Create contrasts and examine the results. Compare to the block results. Does it seem like the event-related design more or less sensitive? $Id: Lb_SPM2.txt,v 1.1 2004/08/17 12:23:11 nichols Exp $