[FieldTrip] Pipeline for sourceanalysis with individualize grid.

Olga Sysoeva olga.v.sysoeva at gmail.com
Thu Mar 10 12:44:53 CET 2016


Thank you Jan-Mathijs for clarification.

Therefore, I think it is better for me to change my pipeline to more
conventional.
Like this?

1.read individual mri (I do have it in .fif format adjusted in Graph to
sensor position)

[mri{subj_i}] = ft_read_mri(filename{subj_i});


2. perform the segmentation

cfg = [];

cfg.output = 'brain';

segmentedmri{subj_i} = ft_volumesegment(cfg, mri{subj_i});


3. create a headmodel

cfg = [];

cfg.method='singleshell';

vol{subj_i} = ft_prepare_headmodel(cfg, segmentedmri{subj_i});


4. create a leadfield (do I need to do it twice – sourcemodel first and
than leadfield?). Which resolution is better to use? 1 cm – to coarse?


cfg = [];

cfg.grad = freqPost{Subj_i} .grad;

cfg.vol = vol{Subj_i} ;

cfg.reducerank = 2;

cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution

cfg.grid.unit = 'cm';

[grid{Subj_i} ] = ft_prepare_leadfield(cfg);


5. do source reconstraction


cfg = [];

cfg.frequency = freq_cmb{Subj_i}.freq;

cfg.grad = freq_cmb{Subj_i}.grad;

cfg.method = 'dics';

cfg.keeptrials = 'yes';

*cfg.grid = **grid{Subj_i};*

*cfg.vol = vol**{Subj_i};*

cfg.keeptrials = 'yes';

cfg.dics.lambda = '5%';

cfg.dics.keepfilter = 'yes';

cfg.dics.fixedori = 'yes';

cfg.dics.realfilter = 'yes';

*source {Subj_i} = ft_sourceanalysis(cfg, freq_cmb{Subj_i});*


How does it look for experienced sourcemodeller?

Best Regards,
Olga.

On Thu, Mar 10, 2016 at 10:55 AM, Schoffelen, J.M. (Jan Mathijs) <
jan.schoffelen at donders.ru.nl> wrote:

> Hi Olga,
>
> The ‘template grid’ refers to a so-called source model, i.e. the set of
> positions that you use to model your sources.
> The headmodel refers to the volume conduction model of the head.
>
> The inverse warping is intended to facilitate group comparisons after the
> source reconstruction.
>
> For the source reconstruction you can use these ‘inverse warped template
> grids’, but it is advisable to always use a volume conduction model based
> on the participant’s anatomy, as Simon already suggested in his reply.
>
> Best wishes,
> Jan-Mathijs
>
>
>
> On 09 Mar 2016, at 17:18, Olga Sysoeva <olga.v.sysoeva at gmail.com> wrote:
>
> Dear Simon,
>
> Thank you very much for the answer, but I think that this code should
> "create the subject specific grid, using the template grid" as specified
> in tutorial here http://www.fieldtriptoolbox.org/tutorial/sourcemodel.
> "
>
> % create the subject specific grid, using the template grid that has just been created
> cfg                = [];
> cfg.grid <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html>.warpmni   = 'yes';
> cfg.grid <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html>.template  = template_grid;
> cfg.grid <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html>.nonlinear = 'yes'; % use non-linear normalization
> cfg.mri            = mri;
> cfg.grid <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html>.unit      ='mm';grid <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html>               = ft_prepare_sourcemodel(cfg);
>
> I believe it "align/project" the template grid with individual mri using
> non-linear transformation.
>
> Correct me if I'm wrong.
> I'll be more than happy to get more comments on this.
>
> Best Regards,
> Olga.
>
> On Wed, Mar 9, 2016 at 2:43 PM, Simon Homolle <s.homolle at donders.ru.nl>
> wrote:
>
>> Dear Olga,
>>
>> Should I use template or subject-specific headmodel with “projected to
>> template grid individualized grid”?
>>
>>
>> I would use the individual head model based on the MRI as it provides
>> more information for your source analysis. This should provide more
>> accurate results.
>>
>> Actually I tried both ways for one subject and did not notice any
>> difference in the results.
>>
>>
>> It seems to that this is due to this line of code, but I’m not quite sure
>> about that:
>>
>> cfg = [];
>>
>> cfg.grid.warpmni = 'yes';
>>
>> cfg.grid.template = template_grid;
>>
>> cfg.grid.nonlinear = 'yes'; % use non-linear normalization
>>
>> cfg.mri = mri_cm{Subj_i};
>>
>> grid_ind{Subj_i} = ft_prepare_sourcemodel(cfg);
>>
>>
>> I think with this configuration the source model that is prepared is only
>> based on the cfg.grid.template, and completely ignores the MRI (which you
>> are interested in). This might explain why you see no difference.
>>
>> Bests,
>>
>> Simon Homölle
>> PhD Candidate
>> Donders Institute for Brain, Cognition and Behaviour
>> Centre for Cognitive Neuroimaging
>> Radboud University Nijmegen
>> Phone: +31-(0)24-36-65059
>>
>> On 09 Mar 2016, at 11:57, Olga Sysoeva <olga.v.sysoeva at gmail.com> wrote:
>>
>> Pipeline for sourceanalysis with individualize grip
>>
>>
>>
>> Dear field trippers,
>>
>>
>> I have a question related to pipeline for sourceanalysis with
>> individualize grid.
>>
>> Should I use template or subject-specific headmodel with “projected to
>> template grid individualized grid”? Below is my pipeline with details of
>> what I mean. Actually I tried both ways for one subject and did not notice
>> any difference in the results. Does it mean that I do not need to constract
>> headmodel for each subject? That's indeed save a lot of time, but I'd like
>> to get your green light on this.
>>
>> Best Regards,
>>
>> Olga.
>>
>>
>> % 1. load template grid, e.g.
>>
>>
>> load(
>> '/net/server/mnt/programs/olgas/fieldtrip-20160119/template/sourcemodel/standard_sourcemodel3d10mm.mat'
>> );
>>
>> template_grid = sourcemodel;
>>
>>
>> %2. Make the individual subjects' grid
>>
>> %a) Load individual subject mri, e.g.
>>
>>
>> [mri{Subj_i}] = ft_read_mri(path_MRI{Subj_i});
>>
>> mri_cm{Subj_i} = ft_convert_units(mri{Subj_i}, 'cm');
>>
>>
>> %b) construct individual grid by projecting to template grid
>>
>>
>> cfg = [];
>>
>> cfg.grid.warpmni = 'yes';
>>
>> cfg.grid.template = template_grid;
>>
>> cfg.grid.nonlinear = 'yes'; % use non-linear normalization
>>
>> cfg.mri = mri_cm{Subj_i};
>>
>> grid_ind{Subj_i} = ft_prepare_sourcemodel(cfg);
>>
>>
>> % 3. Make source reconstruction, using individualized grid and*
>> template? or individual headmodel*
>>
>> %a) load template volume
>> load('/net/server/data/programs/olgas/fieldtrip-20160119/template/headmodel/standard_singleshell.mat');
>>
>> template_vol = vol;
>>
>>
>> cfg = [];
>>
>> cfg.grid = grid_ind{Subj_i};
>>
>> *cfg.vol = vol_K0012_cm; **% **individual* *or template **vol???*
>>
>> cfg.channel = {'MEG'};
>>
>> cfg.grad = freq_cmb{Subj_i}.grad;
>>
>> sourcemodel_lf_K0012 = ft_prepare_leadfield(cfg, freq_cmb{Subj_i});
>>
>>
>> cfg = [];
>>
>> cfg.frequency = freq_cmb{Subj_i}.freq;
>>
>> cfg.grad = freq_cmb{Subj_i}.grad;
>>
>> cfg.method = 'dics';
>>
>> cfg.keeptrials = 'yes';
>>
>> *cfg.grid = sourcemodel_lf{Subj_i}; % **sourcemodel after leadfield with
>> individual or template headmodel?*
>>
>> *cfg.vol = vol_K0012_cm; **% individual or template vol???*
>>
>> cfg.keeptrials = 'yes';
>>
>> cfg.dics.lambda = '5%';
>>
>> cfg.dics.keepfilter = 'yes';
>>
>> cfg.dics.fixedori = 'yes';
>>
>> cfg.dics.realfilter = 'yes';
>>
>> source_K0012 = ft_sourceanalysis(cfg, freq_cmb{Subj_i});
>>
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160310/c944b93d/attachment-0002.html>


More information about the fieldtrip mailing list