[FieldTrip] alignment channel array, head model & individual grid

Frederic Roux fredericroux at hotmail.de
Thu Mar 29 17:45:52 CEST 2012


Dear all,

I have trouble finding the right alignment for my head models and individual grids
with the MEG channel array.

The code I use is the following:

addpath('/data/common/FieldtripCurrent/fieldtrip-20120105/');
addpath('/data/common/FieldtripCurrent/fieldtrip-20120105/fieltdrip_private/');
ft_defaults;

spm2path = '/data/common/FieldtripCurrent/fieldtrip-20120105/external/spm2/';
spm8path = '/data/common/FieldtripCurrent/fieldtrip-20120105/external/spm8/';

rmpath(spm2path,spm8path);


mri = ft_read_mri('ID_V2.mri');

cfg = [];
cfg.coordsys = 'ctf';
seg = ft_volumesegment(cfg,mri);

cfg = [];
hdm = ft_prepare_singleshell(cfg,seg);

cfg = [];
cfg.template = '/data/common/SPM8current/spm8/canonical/single_subj_T1.nii';
cfg.coordsys = 'ctf';
cfg.nonlinear = 'no';

norm = ft_volumenormalise(cfg,mri);

load template_grid.mat % template created from the SPM8 single_subj_T1.nii template located in the canonical folder of SPM8

grid = [];
grid.pos = warp_apply(inv(norm.cfg.final), template_grid.pos, 'homogenous')/10;
grid.inside = template_gird.inside;
grid.outside = template_grid.outside;

transfrom_ctf2spm = norm.cfg.final;

figure;
hold on;
ft_plot_sens(ft_read_sens('ID.ds'));
ft_plot_vol(hdm);
ft_plot_mesh(grid.pos(grid.inside,:));


Would be great if you could help me to figure out what is going wrong here.

Best,
Fred


-- 
Frédéric Roux, PhD student
Department of Neurophysiology
Max Planck Institute for Brain Research
D-60529 Frankfurt am Main
Frederic.Roux at brain.mpg.de
+49(0)69630183225


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120329/cdd714b6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: individual_grid_sensor_array_headmodel2.jpg
Type: image/jpeg
Size: 43058 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120329/cdd714b6/attachment.jpg>


More information about the fieldtrip mailing list