<p dir="ltr">Ah, I just saw that your problem might be with the origin of the anatomical space. Have you tried to see what happens if you set its origin to the anterior commissure before giving it in input to field trip?</p>

<div class="gmail_quote">On May 2, 2013 8:05 AM, "Robin" <<a href="mailto:robince@gmail.com">robince@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.2;color:rgb(34,34,34);font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;border:medium none">
<p style="margin:1em 0px">Running the full Freesurfer reconstruction pipeline (without the hybrid skull stripping and Talaraich alignment on the fieldtrip side) appears to have been successful.</p>
<p style="margin:1em 0px">However, when I try to continue with the tutorial I find that my volume and source grid don't line up (even before any issues converting to sensor space):</p>
<p style="margin:1em 0px">Figure:  <a style="color:rgb(51,51,238);text-decoration:none" href="http://imgur.com/uo9uPUc" target="_blank">http://imgur.com/uo9uPUc</a> (code below)</p>
<p style="margin:1em 0px">Does anyone have any idea what could be wrong?</p>
<p style="margin:1em 0px">What coordinate system is the sub-oct-6-src.fif file in (created by MNE suite)?<br>If it is in talairach coordinates, how do I load the Talairach aligned image from the Freesurfer pipeline? (is it orig.mgz? I also tried nu.mgz)</p>


<p style="margin:1em 0px">Do I need to manually include the transform from transform/talairach.xfm? To include that can I use it directly as mri.transform in fieldtrip or do I need to multiply it by the existing mri.transform which is there when loading the raw anatomy scan (.img)? Come to think of it what does that transform represent?</p>


<p style="margin:1em 0px">Sorry if these are not fieldtrip questions but I am trying to follow the fieldtrip MNE tutorial so I was hoping someone might know. </p>
<p style="margin:1em 0px">Thanks</p>
<p style="margin:1em 0px">Robin</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px 3px 3px 3px;display:inline;white-space:pre-wrap;border-radius:3px 3px 3px 3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:none repeat scroll 0% 0% rgb(248,248,255)"><span style="color:rgb(153,153,136);font-style:italic">% load freesurfer image</span>
mri_fs_tal = ft_read_mri(fullfile(fs_dir, <span>sub.</span>code, <span style="color:rgb(221,17,68)">'mri'</span>, <span style="color:rgb(221,17,68)">'orig.mgz'</span>));
mri_fs_tal = ft_convert_units(mri_fs_tal, <span style="color:rgb(221,17,68)">'cm'</span>);

<span style="color:rgb(153,153,136);font-style:italic">% load MNE grid</span>
<span style="color:rgb(153,153,136);font-style:italic">% computed with mne_setup_source_space --ico -6</span>
bnd = ft_read_headshape(fullfile(fs_dir, <span>sub.</span>code, <span style="color:rgb(221,17,68)">'bem'</span>, <span>[sub.code <span style="color:rgb(221,17,68)">'-oct-6-src.fif'</span>]</span>), <span style="color:rgb(221,17,68)">'format'</span>, <span style="color:rgb(221,17,68)">'mne_source'</span>);
sourcespace = ft_convert_units(bnd, <span style="color:rgb(221,17,68)">'cm'</span>);

<span style="color:rgb(153,153,136);font-style:italic">% Volume conduction model</span>
cfg = <span>[]</span>;
<span>cfg.</span>coordsys = <span style="color:rgb(221,17,68)">'spm'</span>;
<span>cfg.</span>output = <span>{<span style="color:rgb(221,17,68)">'brain'</span>}</span>;
seg = ft_volumesegment(cfg, mri_fs_tal);
cfg = <span>[]</span>;
<span>cfg.</span>method = <span style="color:rgb(221,17,68)">'singleshell'</span>;
vol = ft_prepare_headmodel(cfg, seg);

<span style="color:rgb(153,153,136);font-style:italic">% Check volume conduction</span>
figure; hold on
ft_plot_vol(vol, <span style="color:rgb(221,17,68)">'facecolor'</span>, <span style="color:rgb(221,17,68)">'none'</span>); alpha <span style="color:rgb(0,153,153)">0.5</span>;
ft_plot_mesh(sourcespace, <span style="color:rgb(221,17,68)">'edgecolor'</span>, <span style="color:rgb(221,17,68)">'none'</span>); camlight</code></pre>
<p style="margin:1em 0px">On Wed, May 1, 2013 at 5:41 PM, Robin <a style="color:rgb(51,51,238);text-decoration:none" href="mailto:robince@gmail.com" target="_blank">robince@gmail.com</a> wrote:</p>
<blockquote style="margin:1em 0px;border-left:4px solid rgb(221,221,221);padding:0px 1em;color:rgb(119,119,119);quotes:none">
<p style="margin:1em 0px">I am trying to run through the MNE tutorial here:</p>
<p style="margin:1em 0px"><a style="color:rgb(51,51,238);text-decoration:none" href="http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate" target="_blank">http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate</a></p>

<p style="margin:1em 0px">Unfortunately after the volumetric processing in freesurfer my<br>intermediate result looks wrong.</p>
<p style="margin:1em 0px">I have followed the steps (including interactive alignment to<br>Talairach) according to the tutorial. I wondered if anyone has any<br>idea what could be wrong, or could point to some more possible<br>

diagnostic commands to run?</p>
<p style="margin:1em 0px">The original Subject01.mgz file seems to have been saved correctly.<br>But if I load the orig.mgz created with:<br>mri_convert -c -oc 0 0 0 Subject01masked.mgz orig.mgz<br>and plot it with ft_sourceplot it has the same offset and upside down<br>

position as the final incorrectly segments freesurfer image. Could<br>this indicate a problem?</p>
<p style="margin:1em 0px">Thanks for any help,</p>
<p style="margin:1em 0px">Cheers</p>
<p style="margin:1em 0px">Robin</p>
</blockquote>
</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>