<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Roey,<br>
<br>
habe you tried the atlas that is shipped with FieldTrip? It can be
found in fieldtrip/templates/atlas/AAL/<br>
<br>
Best,<br>
Jörn<br>
<br>
On 10/8/2013 11:41 PM, Roey Schurr wrote:<br>
</div>
<blockquote
cite="mid:CAHm4wZD573rYbo5U_DA8ej1Dny5-f7a3QuE2jn6_Dn26kWgriA@mail.gmail.com"
type="cite">
<div dir="ltr">Dear fieldtrippers (<span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Jan-Mathijs
included),</span>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">(This
message seems long, but is actually quite simple)</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Having
downloaded the latest </span>fieldtrip <span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">version
(20131008), we tried rerunning the code and got the
following error:</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">
</span><font face="arial, sans-serif">??? Reference to
non-existent field 'coordsys'.</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif"> Error in ==>
ft_volumelookup at 206</font></div>
<div><font face="arial, sans-serif"> if
strcmp(cfg.inputcoord, 'mni') &&</font></div>
<div>
<font face="arial, sans-serif">
strcmp(atlas.coordsys, 'tal')</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif"> Error in ==>
statistics_wrapper at 136</font></div>
<div><font face="arial, sans-serif"> tmp =
ft_volumelookup(tmpcfg, varargin{1});</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif"> Error in ==>
ft_sourcestatistics at 107</font></div>
<div><font face="arial, sans-serif"> [stat, cfg] =
statistics_wrapper(cfg, varargin{:});</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div>
<font face="arial, sans-serif">Since the spm8 MNI atlas indeed
has no "coordsys" field.</font></div>
<div><font face="arial, sans-serif">Even if we bypass this
problem (by setting "atlas.coordsys = 'mni' " by hand, or by
simply deleting that "if" line), we still get one of two
errors:</font></div>
<div>
<font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif">* * * * * (1) * * * * *</font></div>
<div><font face="arial, sans-serif">If we define "cfg.roi =
AAL_names;" where AAL_names stores all 90 ROIs the MNI atlas
has to offer, we get an indices error:</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div><font face="arial, sans-serif">
<div> ??? Subscript indices must either be real positive
integers or</div>
</font><font face="arial, sans-serif">
<div> logicals.</div>
<div><br>
</div>
</font><font face="arial, sans-serif">
<div> Error in ==> statistics_wrapper at 213</div>
<div> tmp(i,:) = mean(dat(roi,:), 1);</div>
</font><font face="arial, sans-serif">
<div><br>
</div>
</font><font face="arial, sans-serif">
<div>
Error in ==> ft_sourcestatistics at 107</div>
</font><font face="arial, sans-serif">
<div> [stat, cfg] = statistics_wrapper(cfg,
varargin{:});</div>
<div><br>
</div>
<div><br>
</div>
<div>* * * * * (2) * * * * *</div>
</font></div>
<div><span style="font-family:arial,sans-serif">If we define
"cfg.roi = AAL_names{1};" for example, we get a different
error:</span><font face="arial, sans-serif"><br>
</font></div>
<div><span style="font-family:arial,sans-serif"><br>
</span></div>
<div><font face="arial, sans-serif">
<div> ??? In an assignment A(:) = B, the number of
elements in A and</div>
</font><font face="arial, sans-serif">
<div> B must be the same.</div>
</font><font face="arial, sans-serif">
<div>
<br>
</div>
</font><font face="arial, sans-serif">
<div> Error in ==> clusterstat at 187</div>
</font><font face="arial, sans-serif">
<div> tmp(cfg.inside) = postailobs;</div>
<div><br>
</div>
</font><font face="arial, sans-serif">
<div>
Error in ==> ft_statistics_montecarlo at 326</div>
</font><font face="arial, sans-serif">
<div> [stat, cfg] = clusterstat(cfg, statrand,</div>
</font><font face="arial, sans-serif">
<div> statobs,'issource',issource);</div>
<div><br>
</div>
</font><font face="arial, sans-serif">
<div> Error in ==> statistics_wrapper at 298</div>
</font><font face="arial, sans-serif">
<div> [stat, cfg] = statmethod(cfg, dat, design,</div>
</font><font face="arial, sans-serif">
<div>
'issource',issource);</div>
<div><br>
</div>
</font><font face="arial, sans-serif">
<div> Error in ==> ft_sourcestatistics at 107</div>
</font><font face="arial, sans-serif">
<div> [stat, cfg] = statistics_wrapper(cfg,
varargin{:});</div>
</font></div>
<div><font face="arial, sans-serif"><br>
</font></div>
<div class="gmail_extra">And in "cluserstat" appears this
comment: "%this snippet is to support correct clustering of
N-dimensional data, not fully tested yet".</div>
<div class="gmail_extra">Changing line 187 to: "tmp(cfg.inside)
= postailobs(1);" (and line 211 to "tmp(cfg.inside) =
negtailobs(1);") prevents this problem, but misuses the
variables vectors "postailobs" and "negtailobs"</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Any ideas on how to solve this atlas
source statistics problem (defining the coordsys field,
performing statistics across all ROIs, and using the
postailobs/negtailobs vectors) would be greatly appreciated!</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Good night,</div>
<div class="gmail_extra">Aia and Roey</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Oct 8, 2013 at 9:43 AM, Roey
Schurr <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:roeysc@gmail.com" target="_blank">roeysc@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Dear <span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Jan-Mathijs,</span>
<div>
<span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Thank
you so much for your kind and quick answer!</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">We
do hope this will fix things up. We will check it
asap.</span><br>
</div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Best
regards,</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Aia
and Roey</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
</div>
<div>
<div>
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Tue, Oct 8, 2013 at 9:38
AM, jan-mathijs schoffelen <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:jan.schoffelen@donders.ru.nl"
target="_blank">jan.schoffelen@donders.ru.nl</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px
0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">Dear Roey and
Aia,
<div>
<br>
</div>
<div>This indeed was our bad. We have fixed it
in the current version of FieldTrip.</div>
<div>The version will be available for
download tonight (CET), but you can get an
instantaneous update of the code repository
by doing 'ft_version update' on the Matlab
command line.<br>
<div>This will update the fieldtrip copy you
are using to the latest version. Note that
if you want to keep a 'static' version,
you need to back up the version with a
fixed date, because all changes will be
incorporated.</div>
<div><br>
</div>
<div>A little note to the following piece of
code:</div>
<div>
<div><br>
</div>
<div>
<blockquote type="cite">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>% Load the Atlas</div>
<div>templateDir =
which('ft_defaults'); %
use a known function
(ft_defaults) to find
FieldTrip's directory</div>
<div>backslashIndices =
find(templateDir=='\');</div>
<div>templateDir(backslashIndices(end)+1:end)
= []; clear
backslashIndices;</div>
<div>cfg.atlas =
[templateDir,
'template\atlas\aal\ROI_MNI_V4.nii'];</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</div>
</div>
<div>The same can be achieved with the
fullfile function (which deals with
platform specific file-separators
automatically):</div>
<div><br>
</div>
<div>templateDir=which('ft_defaults');</div>
<div>cfg.atlas =
fullfile(templateDir,template,atlas,ROI_MNI_V4.nii');</div>
<div><br>
</div>
<div><br>
</div>
<div>Best,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div>
<div>
<div>
<div>On Oct 8, 2013, at 8:25 AM,
Roey Schurr wrote:</div>
<br>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Hello again,
<div><br>
</div>
<div>Sorry, it seems like the
older version (with ft_<span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">volumelookup)
is just our mistake.</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">However
the problem is still
relevant, for the function </span><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">volumelookup
is still undefinded in our
case.</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Hopefully
someone might know what we
did wrong.</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Thank
you once again!</span></div>
<div><span
style="font-family:arial,sans-serif;font-size:12.727272033691406px">Aia
and Roey</span></div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue,
Oct 8, 2013 at 12:54 AM, Roey
Schurr <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:roeysc@gmail.com"
target="_blank">roeysc@gmail.com</a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
Hello all,
<div><br>
</div>
<div>We are having some
problems defining
atlas-based ROIs using
ft_sourcestatistics on
two source structures
obtained via
ft_sourceanalysis (whose
grid is later changed
according to a
precalculated MNI-warped
grid).</div>
<div><br>
</div>
<div>It seems like the
function
"statistics_wrapper" has
changed between
"fieldtrip-20130822" and
"fieldtrip-20131007":
line 136 now calls
"volumelookup" and not
"ft_volumelookup", so we
get the following error:</div>
<div><br>
</div>
<div>
<div> ??? Undefined
function or method
'volumelookup' for
input</div>
<div> arguments of
type 'struct'.</div>
<div><br>
</div>
<div> Error in
==>
statistics_wrapper at
136</div>
<div> tmp =
volumelookup(tmpcfg,
varargin{1});</div>
</div>
<div><br>
</div>
<div>Using the older
fieldtrip vesion we get
this error:</div>
<div>
<div> ??? Subscript
indices must either be
real positive integers
or</div>
<div> logicals.</div>
<div><br>
</div>
<div> Error in
==>
statistics_wrapper at
213</div>
<div>
tmp(i,:) =
mean(dat(roi,:), 1);</div>
<div><br>
</div>
<div> Error in
==>
ft_sourcestatistics at
107</div>
<div> [stat,
cfg] =
statistics_wrapper(cfg,
varargin{:});</div>
</div>
<div><br>
</div>
<div>So it seems like we
didn't define the ROIs
correctly, however we
are not sure why.</div>
<div><br>
</div>
<div>Any suggestions would
be greatly appreciated!</div>
<div>The relevant pieceof
code is attached.</div>
<div><br>
</div>
<div>Thank you all,</div>
<div>Aia and Roey</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Relevant code</div>
<div>
<div>============</div>
<div>
<div>% Convert sources
units to mm, to fit
the atlas's units</div>
<div>sourceCondition1
=
ft_convert_units(sourceCondition1,
'mm');</div>
<div>sourceCondition2
=
ft_convert_units(sourceCondition2,
'</div>
</div>
<div>design = [
ones(1,length(sourceCondition1.trial)),
2*ones(1,length(sourceCondition2.trial))
];</div>
<div><br>
</div>
<div>cfg = [];</div>
<div>cfg.dim =
sourceCondition1.dim; </div>
<div>cfg.method =
'montecarlo';</div>
<div>cfg.statistic =
'indepsamplesT';</div>
<div>cfg.parameter =
'pow';</div>
<div>
cfg.correctm =
'cluster';</div>
<div>cfg.numrandomization
= 1000;</div>
<div>cfg.alpha = 0.01;</div>
<div>cfg.tail = 0;</div>
<div>cfg.design(1,:) =
design;</div>
</div>
<div>cfg.ivar = 1;<br>
</div>
<div><br>
</div>
<div>
<div>% Load the Atlas</div>
<div>templateDir =
which('ft_defaults');
% use a known function
(ft_defaults) to find
FieldTrip's directory</div>
<div>backslashIndices =
find(templateDir=='\');</div>
<div>templateDir(backslashIndices(end)+1:end)
= []; clear
backslashIndices;</div>
<div>cfg.atlas =
[templateDir,
'template\atlas\aal\ROI_MNI_V4.nii'];</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div>
<div>cfg.roi =
AAL_names; % This is a
cell array of the
atlas's ROIs:
"Precentral_L",
"Precentral_R", etc/</div>
</div>
<div><br>
</div>
<div>
<div>cfg.avgoverroi =
'yes';</div>
<div>cfg.hemisphere =
'both';</div>
<div>cfg.inputcoord =
'mni';</div>
</div>
<div><br>
</div>
<div>
<div>stat =
ft_sourcestatistics(cfg,
sourceCondition1,
sourceCondition2);</div>
</div>
<div><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a moz-do-not-send="true"
href="mailto:fieldtrip@donders.ru.nl"
target="_blank">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></blockquote>
</div>
<br>
<div>
<span
style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span
style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div style="word-wrap:break-word">
<span
style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div
style="word-wrap:break-word">
<span
style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div
style="word-wrap:break-word">
<span
style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div
style="word-wrap:break-word">
<span
style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div
style="word-wrap:break-word">
<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:Helvetica;word-spacing:0px">
<div
style="word-wrap:break-word">
<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:Helvetica;word-spacing:0px">
<div
style="word-wrap:break-word">
<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:Helvetica;word-spacing:0px">
<div
style="word-wrap:break-word">
<div>Jan-Mathijs
Schoffelen, MD
PhD </div>
<div><br>
</div>
<div>Donders
Institute for
Brain,
Cognition and
Behaviour, <br>
Centre for
Cognitive
Neuroimaging,<br>
Radboud
University
Nijmegen, The
Netherlands</div>
<div><br>
</div>
<div>Max
Planck
Institute for
Psycholinguistics,</div>
<div>Nijmegen,
The
Netherlands</div>
<div><br>
</div>
<div><a
moz-do-not-send="true"
href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a></div>
<div>Telephone:
<a
moz-do-not-send="true"
href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a></div>
<div><br>
</div>
<div><a
moz-do-not-send="true"
href="http://www.hettaligebrein.nl" target="_blank">http://www.hettaligebrein.nl</a></div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></div>
</span></span>
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a moz-do-not-send="true"
href="mailto:fieldtrip@donders.ru.nl"
target="_blank">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>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</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>
<br>
<pre class="moz-signature" cols="72">--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel: +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</body>
</html>