<p dir="ltr">If you want to do beam former source localization, there is no need to freesurfer and you can extract the brain shape points from the segmented MRI using FieldTrip itself and you will not have this problem. </p>

<p dir="ltr">However, if you want to do minimum norm source localisation, you may do a realignment before applying free surfer, please see this</p>
<p dir="ltr"><a href="http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate">http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate</a></p>
<div class="gmail_quote">On Mar 16, 2013 4:23 PM, "Doshi, Chiran" <<a href="mailto:Chiran.Doshi@childrens.harvard.edu">Chiran.Doshi@childrens.harvard.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hi Hamid,
<div>Thanks for the reply. I see what you mean.</div>
<div>When I import the T1, there is a mri.transform already present in it. This is generated by the freesurfer. mri.tranform gets changed when I do the ft_volumerealign, (following right hand system) I mark rpa as r, lpa as l , nas as n and z in the positive
 z direction. I have vitamin pills at the fiducials ( some also at the forehead) that would help in marking the points.</div>
<div><br>
</div>
<div>I cannot figure out where am I messing up. Also I am using the src file in MNE and I do not have this issue.<br>
<div><br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div><font>
<div>Chiran Doshi, MS<br>
MEG system technologist<br>
Department of Neurology<br>
Boston Childrens Hospital<br>
Phone: 781-216-11<font>36</font><br>
Fax: 781-216-1172<br>
<br>
</div>
</font></div>
</div>
</div>
</div>
</div>
</div>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000"><b>From:</b> <a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a>] on behalf of Hamid Mohseni [<a href="mailto:hamid.mohseni@eng.ox.ac.uk" target="_blank">hamid.mohseni@eng.ox.ac.uk</a>]<br>

<b>Sent:</b> Saturday, March 16, 2013 11:28 AM<br>
<b>To:</b> FieldTrip discussion list<br>
<b>Subject:</b> Re: [FieldTrip] Issue aligning volume conduction model with source model<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>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><br>
</div>
<div>Thanks</div>
<div><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" target="_blank">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: <a href="tel:%2B44%20%280%29%201865%202%2083826" value="+441865283826" target="_blank">+44 (0) 1865 2 83826</a><br>
</div>
</div>
</div>
</div>
</div>
</div>

<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>