<div dir="ltr"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:'Times New Roman';word-spacing:0px"><pre>
<i>Hello,</i><i><i> </i></i><span style="font-size:12pt;line-height:115%;font-family:"Times New Roman","serif""><br>      <br>       I am mohsen alimoradi, MSc student of artificial intelligence in Qazvin Azad University. </span><i><i>
<br>   </i></i><i>I am working on  the Biomag 2012 analysis competition.
</i><i><br>   I have downloaded a .zip file from <a href="ftp://ftp.fcdonders.nl/pub/biomag2012/" target="_blank">ftp://ftp.fcdonders.nl/pub/biomag2012/.</a>
</i><i> 
</i><i>   I have extracted the content and I am interested in the second objective,
</i><i>   the one related to long-term memory representations (folder data2).
</i><i> 
</i><i>   I was able to load the 2 mat files into Matlab workspace.
</i><i> 
</i><i>   I was also able to use FieldTrip functions on tutorial code.
</i><i> 
</i><i>   <font size="4"><b>How could I use FieldTrip on this data? If there are more ways, which one would be the fastest/easiest?
</b></font></i><i> 
</i><i>   Thanks a lot<br><br></i></pre></span></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 9, 2013 at 8:44 PM, Robin <span dir="ltr"><<a href="mailto:robince@gmail.com" target="_blank">robince@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p style="margin:1.2em 0px!important">I was wondering how to get the voxel positions (or origin and voxel size) for a fieltrip mri structure.</p>

<p style="margin:1.2em 0px!important">I have an anatomical scan which I have normalised to the T1 brain:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1.2em 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-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;white-space:pre-wrap;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background-color:rgb(248,248,255);background-repeat:initial initial">>> mrin

mrin = 

      anatomy: <span>[<span style="color:rgb(0,153,153)">181</span>x217x181 double]</span>
    transform: <span>[<span style="color:rgb(0,153,153)">4</span>x4 double]</span>
          dim: <span>[<span style="color:rgb(0,153,153)">181</span> <span style="color:rgb(0,153,153)">217</span> <span style="color:rgb(0,153,153)">181</span>]</span>
       params: <span>[<span style="color:rgb(0,153,153)">1</span>x1 struct]</span>
      initial: <span>[<span style="color:rgb(0,153,153)">4</span>x4 double]</span>
     coordsys: <span style="color:rgb(221,17,68)">'spm'</span>
          cfg: <span>[<span style="color:rgb(0,153,153)">1</span>x1 struct]</span></code></pre>
<p style="margin:1.2em 0px!important">I can I obtain the location of any voxel in MNI coordinates (mm or cm)? When loading a Nifti file (with load_nii) I can find origin and voxel_size with:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1.2em 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-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;white-space:pre-wrap;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background-color:rgb(248,248,255);background-repeat:initial initial">voxel_size = <span style="color:rgb(0,134,179)">abs</span>(<span>nii.</span><span>hdr.</span><span>dime.</span>pixdim(<span style="color:rgb(0,153,153)">2</span>:<span style="color:rgb(0,153,153)">4</span>));        <span style="color:rgb(153,153,136);font-style:italic">% vol in mm</span>
origin = <span style="color:rgb(0,134,179)">round</span>(<span style="color:rgb(0,134,179)">abs</span>(<span>nii.</span><span>hdr.</span><span>hist.</span>originator(<span style="color:rgb(0,153,153)">1</span>:<span style="color:rgb(0,153,153)">3</span>)));</code></pre>


<p style="margin:1.2em 0px!important">and then <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-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">posmm = (vox-origin) .* voxel_size</code>. Is there any way to do the same from the fieldtrip structure? I can't find the corresponding header information. </p>


<p style="margin:1.2em 0px!important">Thanks</p><span class="HOEnZb"><font color="#888888">
<p style="margin:1.2em 0px!important">Robin</p>
</font></span></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><br></div>