<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Fatameh,<br>
    <br>
    - In the LORETA program, you go to main utilities > Format
    converter. <br>
    - There you select: input binary file (sLORETA) <br>
    - It does not matter which format for output you choose, I coded it
    robust, it'll figure it out. As it says, rows are time points,
    columns are the volume-gridpoints (called voxels)<br>
    - After using loreta2fieldtrip the data is in normal FieldTrip
    volume format, see here: <a
      href="http://fieldtrip.fcdonders.nl/reference/ft_datatype_volume">http://fieldtrip.fcdonders.nl/reference/ft_datatype_volume</a><br>
    <br>
    To get familiar with FieldTrip source plotting etc, see the
    tutorials, for instance: <a
      href="http://fieldtrip.fcdonders.nl/tutorial/plotting">http://fieldtrip.fcdonders.nl/tutorial/plotting</a><br>
    - The following steps are:<br>
    1) create a template: template = ft_read_mri([cur_path_FT,
    '\external\spm8\templates\T1.nii']);<br>
    2) interpolate your volume on the MNI template: [interp_mean] =
    ft_sourceinterpolate(cfg, GA_mean, template);<br>
    3) plot it using ft_sourceplot<br>
    <br>
    Hope it helps,<br>
    Ingrid<br>
    <br>
    <div class="moz-cite-prefix">On 5/31/2013 8:56 AM, Fatemeh Ebrahimi
      nia wrote:<br>
    </div>
    <blockquote
      cite="mid:1370015815.5183.YahooMailNeo@web122402.mail.ne1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff; font-family:arial,
        helvetica, sans-serif;font-size:10pt">
        <div><span>Dear respondent,</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
          arial, helvetica, sans-serif; background-color: transparent;
          font-style: normal; "><span><br>
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
          arial, helvetica, sans-serif; background-color: transparent;
          font-style: normal; "><span>Thank you for your advices.</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
          arial, helvetica, sans-serif; background-color: transparent;
          font-style: normal; "><span>I have used the function that you
            have updated. It works out. Can you give me information </span>about
          the output structure (What do the matrixes refer to?) or
          advise a reference to study about that please? </div>
        <div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
          arial, helvetica, sans-serif; background-color: transparent;
          font-style: normal; "><span><br>
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
          arial, helvetica, sans-serif; background-color: transparent;
          font-style: normal; "><span>Best,</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
          arial, helvetica, sans-serif; background-color: transparent;
          font-style: normal; "><span>Fatemeh</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 13px; font-family:
          arial, helvetica, sans-serif; background-color: transparent;
          font-style: normal; "><span><br>
          </span></div>
        <div><br>
        </div>
        <div style="font-size: 10pt; font-family: arial, helvetica,
          sans-serif; ">
          <div style="font-size: 12pt; font-family: 'times new roman',
            'new york', times, serif; ">
            <div dir="ltr">
              <hr size="1"> <font size="2" face="Arial"> <b><span
                    style="font-weight:bold;">From:</span></b> Ingrid
                Nieuwenhuis <a class="moz-txt-link-rfc2396E" href="mailto:inieuwenhuis@berkeley.edu"><inieuwenhuis@berkeley.edu></a><br>
                <b><span style="font-weight: bold;">To:</span></b>
                <a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a> <br>
                <b><span style="font-weight: bold;">Sent:</span></b>
                Thursday, May 30, 2013 10:30 AM<br>
                <b><span style="font-weight: bold;">Subject:</span></b>
                Re: [FieldTrip] loreta2fieldtrip function error<br>
              </font> </div>
            <div class="y_msg_container"><br>
              <div id="yiv2724014002">
                <div> Hi Fatemeh,<br>
                  <br>
                  I had the same error recently when I did the same. I
                  filed the bug, see <a moz-do-not-send="true"
                    rel="nofollow" target="_blank"
                    href="http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144">http://bugzilla.fcdonders.nl/show_bug.cgi?id=2144</a><br>
                  <br>
                  I did create a work around. In the LORETA program, you
                  can export the source data as a text file. You can
                  read that text file in with loreta2fieldtrip.m. It's a
                  bit of a patch, but it worked for me. <br>
                  <br>
                  Hope this helps,<br>
                  Ingrid<br>
                  <br>
                  <div class="yiv2724014002moz-cite-prefix">On 5/30/2013
                    10:14 AM, Fatemeh Ebrahimi nia wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div style="color: rgb(0, 0, 0); background-color:
                      rgb(255, 255, 255); font-size: 10pt; font-family:
                      arial, helvetica, sans-serif; ">
                      <div style="font-size: 10pt; font-family: arial,
                        helvetica, sans-serif; ">Hi dear all,</div>
                      <div style="font-size: 10pt; font-family: arial,
                        helvetica, sans-serif; "><br>
                      </div>
                      <div><font class="yiv2724014002Apple-style-span"
                          size="2" face="arial, helvetica, sans-serif">I
                          am analyzing EEG data. I have computed
                          sLORETA </font><span
                          class="yiv2724014002Apple-style-span"
                          style="font-size: 13px; font-family: arial,
                          helvetica, sans-serif; ">(.slor) </span><span
                          class="yiv2724014002Apple-style-span"
                          style="font-size: 13px; font-family: arial,
                          helvetica, sans-serif; ">from ERP data. Now I
                          want to read and convert LORETA source
                          reconstruction into a</span></div>
                      <div><font class="yiv2724014002Apple-style-span"
                          size="2" face="arial, helvetica, sans-serif">MATLAB
                          data structure using "loreta2fieldtrip"
                          function, But I have gotten the bellow error.</font></div>
                      <div style="color: rgb(0, 0, 0); font-size: 13px;
                        background-color: transparent; font-style:
                        normal; font-family: arial, helvetica,
                        sans-serif; "><font
                          class="yiv2724014002Apple-style-span" size="2"
                          face="arial, helvetica, sans-serif"><br>
                        </font></div>
                      <div style="background-color:transparent;"><font
                          class="yiv2724014002Apple-style-span" size="2"
                          face="arial, helvetica, sans-serif">**** Error
                          using fread<br>
                        </font></div>
                      <div style="background-color:transparent;"><font
                          class="yiv2724014002Apple-style-span" size="2"
                          face="arial, helvetica, sans-serif">Invalid
                          precision.</font></div>
                      <div style="background-color:transparent;"><font
                          class="yiv2724014002Apple-style-span" size="2"
                          face="arial, helvetica, sans-serif">Error in
                          loreta2fieldtrip (line 85)</font></div>
                      <div style="background-color:transparent;"><font
                          class="yiv2724014002Apple-style-span" size="2"
                          face="arial, helvetica, sans-serif">activity =
                          fread(fid, [voxnumber Ntime], 'float =
                          >single'); ***</font></div>
                      <div style="color: rgb(0, 0, 0); font-size: 13px;
                        background-color: transparent; font-style:
                        normal; font-family: arial, helvetica,
                        sans-serif; "><font
                          class="yiv2724014002Apple-style-span" size="2"
                          face="arial, helvetica, sans-serif"><br>
                        </font></div>
                      <div style="color: rgb(0, 0, 0); font-size: 13px;
                        background-color: transparent; font-style:
                        normal; font-family: arial, helvetica,
                        sans-serif; "><font
                          class="yiv2724014002Apple-style-span" size="2"
                          face="arial, helvetica, sans-serif">Can
                          someone give me a help?<br>
                        </font></div>
                      <div style="color: rgb(0, 0, 0); background-color:
                        transparent; font-style: normal; font-family:
                        arial, helvetica, sans-serif; "><font
                          class="yiv2724014002Apple-style-span" size="2"><br>
                        </font></div>
                      <div style="color: rgb(0, 0, 0); font-size: 13px;
                        background-color: transparent; font-style:
                        normal; font-family: arial, helvetica,
                        sans-serif; "><font
                          class="yiv2724014002Apple-style-span" size="2">Best

                          regards,</font></div>
                      <div style="color: rgb(0, 0, 0); font-size: 13px;
                        background-color: transparent; font-style:
                        normal; font-family: arial, helvetica,
                        sans-serif; "><font
                          class="yiv2724014002Apple-style-span" size="2">Fatemeh</font></div>
                      <div><br>
                      </div>
                    </div>
                    <br>
                    <fieldset class="yiv2724014002mimeAttachmentHeader"></fieldset>
                    <br>
                    <pre>_______________________________________________
fieldtrip mailing list
<a moz-do-not-send="true" rel="nofollow" class="yiv2724014002moz-txt-link-abbreviated" ymailto="mailto:fieldtrip@donders.ru.nl" target="_blank" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a moz-do-not-send="true" rel="nofollow" class="yiv2724014002moz-txt-link-freetext" target="_blank" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
                  </blockquote>
                  <br>
                  <pre class="yiv2724014002moz-signature">-- 
Ingrid Nieuwenhuis PhD
Postdoctoral Fellow
Sleep and Neuroimaging Laboratory
Department of Psychology
University of California, Berkeley
California 94720-1650
Tolman Hall, room 5305 </pre>
                </div>
              </div>
              <br>
              _______________________________________________<br>
              fieldtrip mailing list<br>
              <a moz-do-not-send="true"
                ymailto="mailto:fieldtrip@donders.ru.nl"
                href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
              <a moz-do-not-send="true"
                href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip"
                target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
              <br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ingrid Nieuwenhuis PhD
Postdoctoral Fellow
Sleep and Neuroimaging Laboratory
Department of Psychology
University of California, Berkeley
California 94720-1650
Tolman Hall, room 5305 </pre>
  </body>
</html>