[FieldTrip] missing anatomy in source plot of ft_sourcegrandaverage

Joram van Driel joramvandriel at gmail.com
Mon Feb 3 12:19:52 CET 2014


Hi Jörn,

Hi Joram,
>
> you probably need to interpolate to a template and then put the pos and
> dim field from the template you used in the source structure.


With source structure you mean the result from ft_sourcegrandaverage? That
already has a pos and dim field. Or the subject individual source
structures, *after* ft_sourceinterpolate but *before* ft_volumenormalise?


> You do not have to interpolate, but then make sure that the dimensions of
> your anatomy match the dimensions of your sourcemodel.
>

I'm not sure what you mean here. I did for each subject
ft_sourceinterpolate and ft_volumenormalise. Shouldn't then
ft_sourcegrandaverage give me something that I could plot with
ft_sourceplot? Or am I asking too much of FieldTrip right now :) According
to the regular beamforming tutorial this should be possible.

But I will try the steps from the extended tutorial (and this one might be
useful as well:
http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space)
and see how far that brings me!

Thanks,
Joram


>
> Not sure if you followed any tutorial, but this is a good one:
> http://fieldtrip.fcdonders.nl/tutorial/beamformingextended
>
> Best,
> Jörn
>
>
>
> On 2/3/2014 9:59 AM, Joram van Driel wrote:
>
>> Hi Jörn,
>> Not a stupid question at all, because indeed there isn't. I thought that
>> was the problem too; I already tried putting the .anatomy field of one of
>> the (normalized) subjects into the grandavg structure, but that resulted in
>> a bunch of errors due to an error in the cornerpoints function.
>> This is how the grandavg structure looks like after ft_sourcegrandaverage
>> (fieldtrip version 20140127):
>>
>>         pos: [7109137x3 double]
>>         dim: [181 217 181]
>>         avg: [1x1 struct]
>>         var: [1x1 struct]
>>      dimord: 'voxel'
>>      inside: [1550519x1 double]
>>     outside: [5558618x1 double]
>>          df: [7109137x1 double]
>>         cfg: [1x1 struct]
>>
>> This my cfg:
>>
>> grandavg = cell(1,2);
>> cfg = [];
>> cfg.parameter = 'avg.pow';
>> cfg.keepindividual = 'no';
>> grandavg{1} = ft_sourcegrandaverage(cfg,sourceDiffAll{:,1}); % condition
>> 1
>> grandavg{2} = ft_sourcegrandaverage(cfg,sourceDiffAll{:,2}); % condition
>> 2
>>
>> Hope you can find out what the problem is..!
>>
>> Thanks a lot,
>> Joram
>>
>>
>>
>> On Mon, Feb 3, 2014 at 9:10 AM, "Jörn M. Horschig" <
>> jm.horschig at donders.ru.nl <mailto:jm.horschig at donders.ru.nl>> wrote:
>>
>>     Hi Joram,
>>
>>     this might be a stupid question, but is there a
>>     grandavg{1}.anatomy field at all?
>>
>>     Best,
>>     Jörn
>>
>>
>>     On 1/31/2014 12:44 PM, Joram van Driel wrote:
>>
>>         Hi all,
>>
>>         I'm trying to plot the grand average of a source analysis.
>>         However no matter what I try, the result of
>>         ft_sourcegrandaverage keeps giving me only the functional
>>         data, no anatomy.
>>
>>         My cfg for ft_sourceplot is:
>>
>>         cfg = [];
>>         cfg.method        = 'ortho';
>>         cfg.interactive   = 'no';
>>         cfg.funparameter  = 'avg.pow';
>>         cfg.maskparameter = cfg.funparameter;
>>         cfg.funcolorlim   = [0 0.2];
>>         cfg.opacitylim    = [0 0.2];
>>         cfg.opacitymap    = 'rampup';
>>
>>         ft_sourceplot(cfg,grandavg{1})
>>
>>         I thus created my own grandaverage, like this (where
>>         sourceDiffAll{:,:} is a subject-by-condition cell structure):
>>
>>         temp = zeros([length(nsubjects)
>>         size(sourceDiffAll{1,1}.avg.pow)]);
>>         for s=1:length(nsubjects)
>>             temp(s,:,:,:) = sourceDiffAll{s,2}.avg.pow -
>>         sourceDiffAll{s,1}.avg.pow; % create condition contrast
>>         end
>>         customavg = sourceDiffAll{1,1}; % just copy one subject one
>>         condition
>>         customavg.avg.pow = squeeze(mean(temp,1)); % and replace power
>>         with the grand average power condition-contrast
>>
>>         Now using ft_sourceplot on customavg works just fine.
>>         Any idea of what's going wrong with ft_sourceplot on
>>         ft_sourcegrandaverage?
>>         Thanks!
>>
>>         - Joram
>>
>>
>>         --         Joram van Driel, MSc.
>>         PhD student @ University of Amsterdam
>>         Brain & Cognition @ Department of Psychology
>>
>>
>>         _______________________________________________
>>         fieldtrip mailing list
>>         fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
>>
>>         http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>
>>     --     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: jm.horschig at donders.ru.nl <mailto:jm.horschig at donders.ru.nl>
>>     Tel: +31-(0)24-36-68493 <tel:%2B31-%280%2924-36-68493>
>>
>>     Web: http://www.ru.nl/donders
>>
>>     Visiting address:
>>     Trigon, room 2.30
>>     Kapittelweg 29
>>     NL-6525 EN Nijmegen
>>     The Netherlands
>>
>>     _______________________________________________
>>     fieldtrip mailing list
>>     fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
>>
>>     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>
>>
>> --
>> Joram van Driel, MSc.
>> PhD student @ University of Amsterdam
>> Brain & Cognition @ Department of Psychology
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
> --
> 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: jm.horschig at donders.ru.nl
> Tel:    +31-(0)24-36-68493
> Web: http://www.ru.nl/donders
>
> Visiting address:
> Trigon, room 2.30
> Kapittelweg 29
> NL-6525 EN Nijmegen
> The Netherlands
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



-- 
Joram van Driel, MSc.
PhD student @ University of Amsterdam
Brain & Cognition @ Department of Psychology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140203/86d8da5e/attachment-0002.html>


More information about the fieldtrip mailing list