<div dir="ltr">Hi,<div><br></div><div style>I had this problem before, and I think it is something with freesurfer: If you plot the original MRI and its segmented volume in freesurfer, you may see that they are not in the same coordinate. I think the best way is to ask freesurfer people, we probably missing a small thing here.</div>
<div style><br></div><div style>Thanks</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 19 March 2013 14:49, 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">Hi,<br>
So I tried form the beginning and it fixed the issue. Any ideas why this might be hapenning in the first place?<br>
The problem is I already have a freesurfer database with reconstructed surfaces. If there is any fix like a missing transformation that I can compute so I do not have to recon-all again for all subjects.<br>
<div class="im"><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>
</div>________________________________________<br>
From: <a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>] on behalf of Doshi, Chiran [<a href="mailto:Chiran.Doshi@childrens.harvard.edu">Chiran.Doshi@childrens.harvard.edu</a>]<br>

Sent: Monday, March 18, 2013 9:49 AM<br>
<div class="im">To: FieldTrip discussion list<br>
Subject: Re: [FieldTrip] Issue aligning volume conduction model with    source  model<br>
<br>
</div>Thanks for the help,<br>
I will try again from the beginning. I will let know if I am able to get the fix the issue.<br>
<div class="im"><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>
</div>________________________________________<br>
<div class="im">From: <a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a> [<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>] on behalf of Hamid Mohseni [<a href="mailto:hamid.mohseni@eng.ox.ac.uk">hamid.mohseni@eng.ox.ac.uk</a>]<br>

</div>Sent: Saturday, March 16, 2013 12:47 PM<br>
<div class="im">To: FieldTrip discussion list<br>
Subject: Re: [FieldTrip] Issue aligning volume conduction model with source     model<br>
<br>
</div><div class="im">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.<br>

<br>
However, if you want to do minimum norm source localisation, you may do a realignment before applying free surfer, please see this<br>
<br>
<a href="http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate" target="_blank">http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate</a><br>
<br>
</div><div class="im">On Mar 16, 2013 4:23 PM, "Doshi, Chiran" <<a href="mailto:Chiran.Doshi@childrens.harvard.edu">Chiran.Doshi@childrens.harvard.edu</a><mailto:<a href="mailto:Chiran.Doshi@childrens.harvard.edu">Chiran.Doshi@childrens.harvard.edu</a>>> wrote:<br>

Hi Hamid,<br>
Thanks for the reply. I see what you mean.<br>
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.<br>

<br>
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>
<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>
</div>From: <a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><mailto:<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>> [<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><mailto:<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>>] on behalf of Hamid Mohseni [<a href="mailto:hamid.mohseni@eng.ox.ac.uk">hamid.mohseni@eng.ox.ac.uk</a><mailto:<a href="mailto:hamid.mohseni@eng.ox.ac.uk">hamid.mohseni@eng.ox.ac.uk</a>>]<br>

<div class="im">Sent: Saturday, March 16, 2013 11:28 AM<br>
To: FieldTrip discussion list<br>
Subject: Re: [FieldTrip] Issue aligning volume conduction model with source model<br>
<br>
Hi,<br>
<br>
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 'bnd', it should match the original mri. I checked that and apparently it dosen't happen. How did you obtain this transformation?<br>

<br>
Thanks<br>
<br>
<br>
<br>
</div><div><div class="h5">On 15 March 2013 22:07, Doshi, Chiran <<a href="mailto:Chiran.Doshi@childrens.harvard.edu">Chiran.Doshi@childrens.harvard.edu</a><mailto:<a href="mailto:Chiran.Doshi@childrens.harvard.edu">Chiran.Doshi@childrens.harvard.edu</a>>> wrote:<br>

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>
</div></div><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><mailto:<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>><br>
<div class="im"><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
<br>
<br>
--<br>
Hamid R. Mohseni, PhD<br>
Post-Doctoral Research Assistant<br>
Institute of Biomedical Engineering<br>
University of Oxford, OX3 7DQ, UK<br>
</div>Tel: <a href="tel:%2B44%20%280%29%201865%202%2083826" value="+441865283826">+44 (0) 1865 2 83826</a><tel:%2B44%20%280%29%201865%202%2083826><br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><mailto:<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>
<div class="HOEnZb"><div class="h5"><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>
_______________________________________________<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>
</div></div></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>