[FieldTrip] Source Reconstruction

Ainsley Temudo ainsley.temudo at nyu.edu
Wed Mar 8 07:52:03 CET 2017

Hi FieldTrip Experts,

I am trying to perform source reconstruction, and I am having trouble with
coregistering my anatomical with the sensors. The MEG system we're using is
Yokogawa and the anatomical is a NIFTI file. I get some errors when using
 ft_sensorrealign and ft_electroderealign. I will go through the steps I
took before getting to this stage, as maybe I have done something wrong.

first I read in my MRI and determine the coordinate system which is LPS.

mriunknown = ft_read_mri('WMCP1011+22+t1mprage.nii');

mri = ft_determine_coordsys(mriunknown, 'interactive','yes')

 next I realign to the CTF coordinate system by marking the NAS LPA, RPA

cfg = [];

cfg.method = 'interactive';

cfg.coordsys = 'ctf';

mri_ctf = ft_volumerealign(cfg, mir);

I read in the sensor information and added in the coordinates for the
marker positions. we have five marker positions, the three I picked were
the left and right ear markers and the middle forehead marker.


grad.fid.pnt(1,:) = [96.07 3.11 -5.32]./10;

grad.fid.pnt(2,:) = [11.13 75.50 -78.23]./10;

grad.fid.pnt(3,:) = [8.50 -75.09 -64.60]./10;

grad.fid.label = {'NAS' 'LPA' 'RPA'};

I then put the template marker point cordinates  into the configuration
which were taken from the mri_ctf

cfg = [];

cfg.method = 'fiducial';

cfg.target.pnt(1,:) = [91.1 3.0 49.2]./10;

cfg.target.pnt(2,:) = [-0.1 70.5 0.0]./10;

cfg.target.pnt(3,:) = [0.1 -70.5 0.0]./10;

cfg.target.label = {'NAS' 'LPA' 'RPA'};

grad_aligned = ft_sensorrealign(cfg, grad);

when I use ft_sensorrealign I get the following errors  :

Undefined function or variable 'lab'.

Error in channelposition (line 314)
n   = size(lab,2);

Error in ft_datatype_sens (line 328)
        [chanpos, chanori, lab] = channelposition(sens);

Error in ft_sensorrealign (line 212)
elec_original = ft_datatype_sens(elec_original); % ensure up-to-date sensor
description (Oct 2011)

when I use ft_electroderealign I get the following errors:

Error using ft_fetch_sens (line 192)
no electrodes or gradiometers specified.

Error in ft_electroderealign (line 195)
  elec_original = ft_fetch_sens(cfg);

Hope you can help me figure out why I'm getting these errors.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170308/da4aaeea/attachment-0001.html>

More information about the fieldtrip mailing list