<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#333300">
    Hi Jan-Mathijs,<br>
    <br>
    Thanks for the suggestion.<br>
    I tried again with another data set and specified the stat.pos =
    grid.pos; stat.inside = grid.inside etc.<br>
    And I still get the same issue... the anatomy is not added even when
    ft_sourceinterpolate was called.<br>
    I can get the stats plotted (weirdly) e.g. screenshot (I hope it
    gets through the mail) without the brain anatomy.<br>
    <br>
    I am not sure what I might be doing wrongly.<br>
    <br>
    Best,<br>
    May<br>
    <br>
    <br>
    <blockquote type="cite"><img
        src="cid:part1.09050909.08050701@glasgow.ac.uk" alt=""></blockquote>
    <br>
    <br>
    <div class="moz-cite-prefix">On 09/05/2015 11:00,
      <a class="moz-txt-link-abbreviated" href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a> wrote:<br>
    </div>
    <blockquote
      cite="mid:mailman.8.1431165601.17173.fieldtrip@science.ru.nl"
      type="cite">
      <table class="header-part1" border="0" cellpadding="0"
        cellspacing="0" width="100%">
        <tbody>
          <tr>
            <td>
              <div class="headerdisplayname" style="display:inline;">Subject:
              </div>
              Re: [FieldTrip] Issues with ft_sourceinterpolate --
              missing anatomy</td>
          </tr>
          <tr>
            <td>
              <div class="headerdisplayname" style="display:inline;">From:
              </div>
              "Schoffelen, J.M. (Jan Mathijs)"
              <a class="moz-txt-link-rfc2396E" href="mailto:jan.schoffelen@donders.ru.nl"><jan.schoffelen@donders.ru.nl></a></td>
          </tr>
          <tr>
            <td>
              <div class="headerdisplayname" style="display:inline;">Date:
              </div>
              08/05/2015 12:38</td>
          </tr>
        </tbody>
      </table>
      <table class="header-part2" border="0" cellpadding="0"
        cellspacing="0" width="100%">
        <tbody>
          <tr>
            <td>
              <div class="headerdisplayname" style="display:inline;">To:
              </div>
              FieldTrip discussion list <a class="moz-txt-link-rfc2396E" href="mailto:fieldtrip@science.ru.nl"><fieldtrip@science.ru.nl></a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <div class="moz-text-html" lang="x-unicode">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        May,
        <div><br>
        </div>
        <div>Have you ensured that the stat.pos field contains the
          dipole positions, coregistered to the template brain?</div>
        <div><br>
        </div>
        <div>Best,</div>
        <div>Jan-Mathijs</div>
        <div><br>
          <div>
            <div>On May 8, 2015, at 1:22 PM, Heng-Ru May Tan <<a
                moz-do-not-send="true"
                href="mailto:Heng-RuMay.Tan@glasgow.ac.uk">Heng-RuMay.Tan@glasgow.ac.uk</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <blockquote type="cite">
              <div bgcolor="#FFFFFF" text="#333300">Hi Fieldtrippers<br>
                <br>
                [The previous email didn't display properly so resending
                this again.]<br>
                <br>
                I am having trouble running ft_sourceinterpolate... I
                didn't seem to have this issue before. =(<br>
                The anatomy seems to be missing and so when I
                subsequently call ft_sourceplot, the brain anatomy is
                not 'available' for plotting.<br>
                Here are some example of the things I tried and the
                errors in hope that someone might be able help!<br>
                <br>
                Many thanks in advance,<br>
                May<br>
                <br>
                -- this is a stat structure used:<br>
                <br>
                stat =<br>
                    prob: [33480x1 double]<br>
                    cirange: [33480x1 double]<br>
                    mask: [33480x1 logical]<br>
                    stat: [33480x1 double]<br>
                    ref: [33480x1 double]<br>
                    df: 185<br>
                    critval: [-1.9729 1.9729]<br>
                    dim: [33480 1]<br>
                    inside: [10354x1 double]<br>
                    outside: [23126x1 double]<br>
                    pos: [33480x3 double]<br>
                    freq: 64.9309<br>
                    cfg: [1x1 struct]<br>
                    <br>
                grid =<br>
                    xgrid: [1x31 double]<br>
                    ygrid: [1x36 double]<br>
                    zgrid: [1x30 double]<br>
                    dim: [31 36 30]<br>
                    pos: [33480x3 double]<br>
                    inside: [12773x1 double]<br>
                    outside: [20707x1 double]<br>
                <br>
                anatpath2 = [unixANALYSEpath
                'Matlab_scripts/fieldtrip-20140114/template/anatomy/single_subj_T1.nii']<br>
                template_mri = ft_read_mri(anatpath2);<br>
                    <br>
                cfg = [];<br>
                cfg.parameter = 'stat';<br>
                cfg.interpmethod  = 'nearest';<br>
                statplot2 = ft_sourceinterpolate(cfg,stat,
                template_mri);<br>
                <br>
                the input is volume data with dimensions [91 109 91]<br>
                Warning: sphereradius is not used for projmethod
                'nearest'<br>
                > In fieldtrip-20140114/private/interp_ungridded at
                86<br>
                In ft_sourceinterpolate at 216<br>
                the call to "ft_sourceinterpolate" took 37 seconds and
                required the additional allocation of an estimated 96 MB<br>
                <br>
                -- somehow anatomy structure is lost... ?!<br>
                statplot2 =<br>
                    freq: 64.9309<br>
                    stat: [902629x1 double]<br>
                    pos: [902629x3 double]<br>
                    dim: [91 109 91]<br>
                    inside: [1x902629 double]<br>
                    outside: [1x0 double]<br>
                    unit: 'mm'<br>
                    cfg: [1x1 struct]<br>
                    <br>
                cfg = [];<br>
                cfg.method  ='slice';<br>
                cfg.nslices  = 30<br>
                cfg.funparameter  = 'stat';<br>
                %         cfg.maskparameter = 'mask';<br>
                cfg.maskparameter = cfg.funparameter;<br>
                cfg.anaparameter = 'anatomy';<br>
                cfg.opacitymap    = 'rampup';<br>
                ft_sourceplot(cfg, statplot2);<br>
                the input is source data with 902629 positions on a [91
                109 91] grid<br>
                Warning: do not understand cfg.anaparameter, not
                plotting anatomy\n<br>
                > In ft_sourceplot at 350<br>
                the call to "ft_sourceplot" took 2 seconds and required
                the additional allocation of an estimated 3 MB<br>
                <br>
                -- If using fieldtrip_new on server<br>
                --> revision = '$Id: ft_sourceinterpolate.m 10221
                2015-02-12 08:28:20Z roboos $';<br>
                <br>
                cfg =<br>
                parameter: 'stat'<br>
                interpmethod: 'nearest'<br>
                statplot1 = ft_sourceinterpolate(stat, template_mri)<br>
                Undefined function or variable 'abort'.<br>
                Error in ft_sourceinterpolate (line 106)<br>
                if abort<br>
                <br>
                -- <br>
________________________________________________________________________________________________________________________________________<br>
                Heng-Ru May Tan<br>
                Centre for Cognitive Neuroimaging (CCNi) ▫Institute of
                Neuroscience and Psychology (INP) ▫<br>
                College of Medical, Veterinary and Life Sciences &
                College of Science and Engineering ▫ University of
                Glasgow ▫<br>
                58 Hillhead Street, Glasgow G12 8QB, United Kingdom ▫
                +44 (0)141-330-5090 ▫ <a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:Heng-RuMay.Tan@glasgow.ac.uk">
                  Heng-RuMay.Tan@glasgow.ac.uk</a><br>
                <span style="font-size:7.5pt;mso-bidi-font-family:
                  Calibri;mso-bidi-theme-font:minor-latin;color:#595959;mso-themecolor:text1;
mso-themetint:166;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-themecolor:
text1;mso-style-textfill-fill-alpha:100.0%;mso-style-textfill-fill-colortransforms:
"lumm=65000


                  lumo=35000""></span><span
                  style="font-size:7.5pt;color:#595959;mso-themecolor:text1;mso-themetint:166;
mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-themecolor:text1;
mso-style-textfill-fill-alpha:100.0%;mso-style-textfill-fill-colortransforms:
"lumm=65000


                  lumo=35000""><o:p></o:p></span>
                <div class="moz-signature">
                </div>
              </div>
              _______________________________________________<br>
              fieldtrip mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
              <a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>