[FieldTrip] Issue aligning volume conduction model with source model
Doshi, Chiran
Chiran.Doshi at childrens.harvard.edu
Fri Mar 15 23:07:37 CET 2013
Hello FieldTrip users,
I am having trouble aligning volume conduction model with source model
The link to the data is https://www.dropbox.com/sh/7ejsvewemci8ixe/RpfP3F5ROi
Here are the steps I followed
% Read mri
mri = ft_read_mri('T1.mgz');
% Determine coordinate system. Neuromag selected +x as r, +y as a, +z as s and origin as i. At the end mri.coordsys was equal to 'neuromag'
mri = ft_determine_coordsys(mri);
% Align volume. Selected l, r, l and z in + z direction
cfg=[];
cfg.coordsys='neuromag';
mri = ft_volumerealign(cfg,mri);
%Volume segment
cfg=[];
cfg.coordsys='neuromag';
cfg.output = {'brain' 'scalp' 'skull' 'tpm'};
seg = ft_volumesegment(cfg, mri);
% Prepare head model. The model aligns well with sensors
cfg=[];
cfg.coordsys='neuromag';
cfg.method = 'singleshell';
vol = ft_prepare_headmodel(cfg, seg);
% compute sourcespace
bnd = ft_read_headshape('ID_000000-ico-5-src.fif','format','mne_source','unit','mm');
T = mri.transform*inv(mri.transformorig);
sourcespace = ft_transform_geometry(T, bnd);
% Plot
figure;hold on;
ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight
ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5;
These surfaces do not align. Any ideas?
Chiran Doshi, MS
MEG system technologist
Department of Neurology
Boston Childrens Hospital
Phone: 781-216-1136
Fax: 781-216-1172
More information about the fieldtrip
mailing list