<div dir="ltr"><div><div><div><div>Hello everyone,<br><br>I am working through the minimum norm pipeline (<a href="http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate">http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate</a>) on functional data for multiple participants; for all but one of these participants I also have anatomical MRI. For the one participant for whom I couldn't get an MRI, I was hoping to use the freesurfer average surface (fsaverage), but I'm having some difficulty getting volume conduction models and sourcespaces from this brain aligned to CTF.<br>
<br></div><div>Basically, I'm able to read in the data and create a sourcespace and volume conduction model using the code below. These models seem to be aligned to MNI (see the axes on <a href="http://i.imgur.com/g0DPs8A.png">http://i.imgur.com/g0DPs8A.png</a>). To to re-align them to CTF, what I tried to do was manually do ft_volumerealign on the original anatomical MRI, and then apply that transformation matrix (which I assume specifies the transformation from MNI to CTF) to the sourcespace and volume conductor (in the third and fourth blocks of code below). But the resulting sourcespace and volume conductor are clearly not aligned to CTF (see the axes on <a href="http://i.imgur.com/MAjyDkL.png">http://i.imgur.com/MAjyDkL.png</a>), so I assume I am doing something wrong with the transformation matrix. I admit I do not fully understand how the transformation matrix is supposed to work, so if anyone has any feedback I would greatly appreciate it.<br>
<br>Thank you!<br>Steve<br><br></div><div><br></div><div>% Read the source space<br></div><div>bnd  = ft_read_headshape('/tools/freesurfer/subjects/fsaverage/bem/fsaverage-oct-6-src.fif', 'format', 'mne_source');<br>


sourcespace = ft_convert_units(bnd, 'mm');<br><br></div><div>% Read in the anatomical MRI, segment, and make volume conduction model<br></div><div>fsaverage = ft_read_mri('orig.mgz');<br>cfg           = [];<br>
cfg.coordsys  = 'spm';<br>cfg.output    = {'skullstrip' 'brain'};<br>seg = ft_volumesegment( cfg, fsaverage);<br>cfg = []<br>cfg.method = 'singleshell';<br>cfg.tissue = 'brain';<br>
vol = ft_prepare_headmodel( cfg, seg );<br><br></div><div>% Get a transformation matrix from MNI to CTF<br>cfg = [];<br>cfg.method = 'interactive';<br></div><div>seg_ctf = ft_volumerealign(cfg2, seg); % manually identify NAS, LAP, and RAP<br>
</div>T = seg_ctf.transform;<br><br></div><div>% Transform the sourcespace and vol<br></div>sourcespace_trans = ft_transform_geometry( T, sourcespace );<br></div><div>vol_trans = vol;<br></div>vol_trans.bnd = ft_transform_geometry( T, vol_trans.bnd );<br>
<br>% Plot the un-transformed vol and sourcespace (aligned to MNI)<br>
figure;hold on;<br>
ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5;<br>
ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight<br><br></div>% Plot the transformed vol and sourcespace<br><div>figure;hold on;<br>ft_plot_vol(vol_trans, 'facecolor', 'none');alpha 0.5;<br>
ft_plot_mesh(sourcespace_trans, 'edgecolor', 'none'); camlight<br><br><div><div><div><br><br>--<br>Stephen Politzer-Ahles<br>University of Kansas<br>Linguistics Department<br><a href="http://people.ku.edu/~sjpa/">http://people.ku.edu/~sjpa/</a></div>
</div></div></div></div>