<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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><br></div><div><blockquote type="cite"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><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>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>On Oct 8, 2013, at 8:25 AM, Roey Schurr wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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 href="mailto:roeysc@gmail.com" target="_blank">roeysc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><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>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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 href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl">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></body></html>