[FieldTrip] beamformer for EEG: mask the output for a specific atlas region

Babaeeghazvini, P. p.babaeeghazvini at vu.nl
Mon Nov 16 15:53:12 CET 2015


Hi Joram,

Thank you very much for such a complete and helpful explanation.

Best regards,
Parinaz.
________________________________
From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Joram van Driel [joramvandriel at gmail.com]
Sent: Monday, November 16, 2015 3:01 PM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] beamformer for EEG: mask the output for a specific atlas region

Hi Parinaz,

I'm working on similar atlas-based source analyses, and a few days back I kind of asked the same question. In the mean time I solved it. There are two possible approaches:

1) You can already focus your source analyses on ROIs at the level of the lead field grid.
2) You can mask your output of ft_sourcegrandaverage with atlas-based ROIs.

For both you need to use ft_read_atlas (check the help, it's pretty self explanatory, although I don't know if Fieldtrip has your HMAT atlas shipped), and tf_volumelookup.

For option 1), you need subject-specific grids that are aligned (warped) to an MNI template, and do the masking already at the grid level; then proceed to your within-subject source analysis, and group stats; you'll now only have source activity from a ROI. It's all explained here: http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space, although this example uses all combined ROIs from one atlas, to remove ventricles etc. But you can apply the same trick to one specific ROI: for the cfg of ft_volumelookup, instead of cfg.roi = atlas.tissuelabel; you say, e.g.  cfg.roi = 'M1'; or whatever the atlas label of your motor area is in the HMAT atlas you're using.

For option 2), you basically set the .inside voxels to be those of the ROI mask, and additionally you could set the power of all voxels outside of the mask to zero. Here, too, either the subject-specific source results should be normalized to a common template, or you should have done the subject-specific source analysis on pre-warped MNI-based grids. Below code is from my analysis, where I select occipital voxels at the group level on whole-brain source results:

atlas = ft_read_atlas('Z:\Toolboxes\fieldtrip_github\fieldtrip\template\atlas\aal\ROI_MNI_V4.nii');
atlas = ft_convert_units(atlas,'cm');

cfg = [];
cfg.atlas = atlas;
cfg.inputcoord = 'mni';
cfg.roi = atlas.tissuelabel(43:54);

occ_mask = ft_volumelookup(cfg,template_grid);

grandavg_col_masked = grandavg_col;
grandavg_grey_masked = grandavg_grey;
for s=1:10
    grandavg_col_masked{s}.inside=occ_mask(:);
    grandavg_grey_masked{s}.inside=occ_mask(:);
    grandavg_col_masked{s}.avg.pow(occ_mask(:)==0)=0;
    grandavg_grey_masked{s}.avg.pow(occ_mask(:)==0)=0;
end

Hope this helps.
- Joram

On Mon, Nov 16, 2015 at 2:29 PM, Babaeeghazvini, P. <p.babaeeghazvini at vu.nl<mailto:p.babaeeghazvini at vu.nl>> wrote:
Hello

I am doing beamformer on EEG data to find the source position of bimanual activity based on dics method. For that I want to see the activity only on motor area and remove the activities of other regions based on HMAT atlas (http://lrnlab.org/) which provides a binary mask of motor cortex. I need to do that because I want to calculate the position of maximum activity in motor region and I dont want this maximum activity appear  somewhere else due to any possible artifact. please tell me how and where should I apply HMAT binary mask on the output of source analysis.

Regards,
Parinaz.

_______________________________________________
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, PhD
Postdoc @ Vrije Universiteit Amsterdam
Cognitive Psychology

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151116/b5e609e2/attachment.html>


More information about the fieldtrip mailing list