<div dir="ltr">Hi,<div><br></div><div style>I THINK there is a problem with your mri.transform matrix. Basically, without any pre-processing, when you apply this transformation to the headshape points '<span style="font-family:arial,sans-serif;font-size:13px">bnd'</span>, it should match the original mri. I checked that and apparently it dosen't happen. How did you obtain this transformation?</div>
<div style><br></div><div style>Thanks</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 15 March 2013 22:07, Doshi, Chiran <span dir="ltr"><<a href="mailto:Chiran.Doshi@childrens.harvard.edu" target="_blank">Chiran.Doshi@childrens.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello FieldTrip users,<br>
<br>
I am having trouble aligning volume conduction model with source model<br>
<br>
The link to the data is <a href="https://www.dropbox.com/sh/7ejsvewemci8ixe/RpfP3F5ROi" target="_blank">https://www.dropbox.com/sh/7ejsvewemci8ixe/RpfP3F5ROi</a><br>
<br>
Here are the steps I followed<br>
<br>
% Read mri<br>
mri = ft_read_mri('T1.mgz');<br>
<br>
% 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'<br>
mri = ft_determine_coordsys(mri);<br>
<br>
% Align volume. Selected l, r, l and z in + z direction<br>
cfg=[];<br>
cfg.coordsys='neuromag';<br>
mri = ft_volumerealign(cfg,mri);<br>
<br>
%Volume segment<br>
cfg=[];<br>
cfg.coordsys='neuromag';<br>
cfg.output = {'brain' 'scalp' 'skull' 'tpm'};<br>
seg = ft_volumesegment(cfg, mri);<br>
<br>
% Prepare head model. The model aligns well with sensors<br>
cfg=[];<br>
cfg.coordsys='neuromag';<br>
cfg.method    = 'singleshell';<br>
vol = ft_prepare_headmodel(cfg, seg);<br>
<br>
% compute sourcespace<br>
bnd = ft_read_headshape('ID_000000-ico-5-src.fif','format','mne_source','unit','mm');<br>
T   = mri.transform*inv(mri.transformorig);<br>
sourcespace = ft_transform_geometry(T, bnd);<br>
<br>
% Plot<br>
figure;hold on;<br>
ft_plot_mesh(sourcespace, 'edgecolor', 'none'); camlight<br>
ft_plot_vol(vol, 'facecolor', 'none');alpha 0.5;<br>
<br>
<br>
<br>
These surfaces do not align. Any ideas?<br>
<br>
<br>
<br>
Chiran Doshi, MS<br>
MEG system technologist<br>
Department of Neurology<br>
Boston Childrens Hospital<br>
Phone: 781-216-1136<br>
Fax: 781-216-1172<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Hamid R. Mohseni, PhD<br>Post-Doctoral Research Assistant<br>Institute of Biomedical Engineering<br>University of Oxford, OX3 7DQ, UK<br>Tel: +44 (0) 1865 2 83826<br>

</div>