[FieldTrip] Using fsaverage in the minimum norm pipeline?

Stephen Politzer-Ahles politzerahless at gmail.com
Fri Jun 21 20:42:32 CEST 2013

Hello everyone,

I am working through the minimum norm pipeline (
http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate) 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.

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 http://i.imgur.com/g0DPs8A.png). 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 http://i.imgur.com/MAjyDkL.png), 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.

Thank you!

% Read the source space
bnd  =
'format', 'mne_source');
sourcespace = ft_convert_units(bnd, 'mm');

% Read in the anatomical MRI, segment, and make volume conduction model
fsaverage = ft_read_mri('orig.mgz');
cfg           = [];
cfg.coordsys  = 'spm';
cfg.output    = {'skullstrip' 'brain'};
seg = ft_volumesegment( cfg, fsaverage);
cfg = []
cfg.method = 'singleshell';
cfg.tissue = 'brain';
vol = ft_prepare_headmodel( cfg, seg );

% Get a transformation matrix from MNI to CTF
cfg = [];
cfg.method = 'interactive';
seg_ctf = ft_volumerealign(cfg2, seg); % manually identify NAS, LAP, and RAP
T = seg_ctf.transform;

% Transform the sourcespace and vol
sourcespace_trans = ft_transform_geometry( T, sourcespace );
vol_trans = vol;
vol_trans.bnd = ft_transform_geometry( T, vol_trans.bnd );

% Plot the un-transformed vol and sourcespace (aligned to MNI)
figure;hold on;
ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5;
ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight

% Plot the transformed vol and sourcespace
figure;hold on;
ft_plot_vol(vol_trans, 'facecolor', 'none');alpha 0.5;
ft_plot_mesh(sourcespace_trans, 'edgecolor', 'none'); camlight

Stephen Politzer-Ahles
University of Kansas
Linguistics Department
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130621/9cfca25f/attachment-0001.html>

More information about the fieldtrip mailing list