<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style><style type="text/css"></style><style type="text/css"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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 class="BodyFragment"><font size="2">
<div class="PlainText">Chiran Doshi, MS<br>
MEG system technologist<br>
Department of Neurology<br>
Boston Childrens Hospital<br>
Phone: 781-216-11<font size="2">36</font><br>
Fax: 781-216-1172<br>
<br>
</div>
</font></div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF806781" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> fieldtrip-bounces@science.ru.nl [fieldtrip-bounces@science.ru.nl] on behalf of Hamid Mohseni [hamid.mohseni@eng.ox.ac.uk]<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 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" 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: +44 (0) 1865 2 83826<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>