[FieldTrip] Extracting virtual EEG channel from a patch

Babaeeghazvini, P. p.babaeeghazvini at vu.nl
Mon Dec 7 12:52:55 CET 2015


Hi Julian,

Thank you very much for your kind reply. Yes I want to compute virtual channel from an atlas area like whole Precentral_L (not from one voxel in this area). So your second explanation helps me. If I understood correctly in the code below I should use all grid points belong to atlas:


cfg = []

cfg.atlas = atlas;

cfg.roi = atlas.tissuelabel(1)

cfg.inputcoord = 'mni';

mas = ft_volumelookup(cfg,grid);

cfg              = [];
cfg.method       = 'lcmv';
cfg.vol          = hdm;


cfg.grid.xgrid      =

cfg.grid.ygrid      =

cfg.grid.zgrid      =

cfg.grid.inside  = 1:size(cfg.grid.pos, 1);
cfg.grid.outside = [];
cfg.keepfilter   = 'yes';
source_idx       = ft_sourceanalysis(cfg, tlock);

My problem is how I should use the output of volumelookup here for cfg.grid.xgrid, cfg.grid.ygrid and cfg.grid.zgrid.

an other question that I have is that: when I compute the maximum index from
 [maxvalr, maxpowindxr] = max(srcetask.avg.pow)

How I can find the atlas position to this maximum point in my code (I can see this atlas label in the figure that I get from sourceplot, but I want to report this label in matlab)

Regards,
Parinaz.



From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julian Keil [julian.keil at gmail.com]
Sent: Monday, December 07, 2015 9:30 AM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Extracting virtual EEG channel from a patch

Hi Parinaz,

I'm not sure if I understood your question correctly.
Do you want to find the atlas label to a given virtual channel? Or do you want to compute a virtual channel on a given atlas label?

In the first case, you can simply interpolate your virtual EEG channels to the standard MRI and use source plot with an atlas to find the corresponding label.
In the second case, it's a tad more complicated, but here's how I do it:
1. Compute the virtual channels for all grid points in the cortex
2. If you have computed the virtual channels on an individual MRI, make sure that the positions correspond to the standard MRI (I think that's described in the source analysis-tutorial)
3. Build a high-resolution 3D-Grid on the standard MRI
4. Select all grid points from the grid of step 3 which belong to an atlas (see ft_volumelookup)
5. Use pythagoras to find the virtual channels from step 2 closest to the grid points from step 4.

I hope this helps, let me know otherwise.

Julian

Am 04.12.2015 um 20:14 schrieb Babaeeghazvini, P.:

Hello

I want to reconstruct a source signal the same as below in page  http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors

cfg              = [];
cfg.method       = 'lcmv';
cfg.vol          = hdm;
cfg.grid.pos     = sourcemodel.pos([maxcohindx maxpowindx], :);
cfg.grid.inside  = 1:size(cfg.grid.pos, 1);
cfg.grid.outside = [];
cfg.keepfilter   = 'yes';
source_idx       = ft_sourceanalysis(cfg, tlock);

Not from the voxel indicating maximum power ([maxval, maxpowindx] = max(source_diff.avg.pow);), but from the atlas area which this voxel belongs to, such as Supp_Motor_Area_L. So my question is: How I can get the atlas range and atlas label belong to a voxel, and how I can use this atlas area range in this code to reconstruct a signal instead of using (cfg.grid.pos = sourcemodel.pos([maxcohindx maxpowindx], :)).

Regards,
Parinaz.
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto: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/20151207/b057852b/attachment-0002.html>


More information about the fieldtrip mailing list