[FieldTrip] Align EEG electrode positions to BEM headmodel Question

Juan Pablo Neira jpnv2006 at gmail.com
Thu Feb 16 17:35:28 CET 2012


Hello,

I am trying to align EEG electrodes to an individual MRI and a BEM
model.  I am using the example:

"Align EEG electrode positions to BEM headmodel"
http://fieldtrip.fcdonders.nl/example/align_eeg_electrode_positions_to_bem_headmodel

But I am having the next problem in "% align using fiducials" part:

* Template structure (label, chanpos and elecpos) - sens_t structure
(label, chanpos and elecpos)

elec_mni.label = {'Nz', 'LPA', 'RPA'};
elec_mni.chanpos = [
  head_Nas
  head_Lpa
  head_Rpa
  ];
elec_mni.elecpos = [
  head_Nas
  head_Lpa
  head_Rpa
  ];
elec_mni.unit = 'mm';

% align using fiducials

cfg = [];
cfg.method = 'fiducial';
cfg.template= elec_mni;
cfg.elec     = sens_t;
cfg.casesensitive  = 'no';%'yes' or 'no'
sens_aligned = ft_electroderealign(cfg);

%Error message:
%-----------------------------------------------------
??? Subscripted assignment between dissimilar structures.

Error in ==> ft_electroderealign at 183
    tmp(i) = ft_datatype_sens(template(i)); % ensure up-to-date sensor
    descriptions (Oct 2011)
%-------------------------------------------------------

I have some questions that maybe can help to find the error:
-  According to the example in the webpage, there are 2 functions from
the private directory used:  electrodenormalize.m & warp_apply.m, but
electrodenormalize.m never was used.  Also in "% align using
fiducials" the method used was  'realignfiducial', but that method is
not available in electroderealign function.  Is it possible the
example is using the wrong function?

-  How should be the structure of the fiducials in the main sensor
structure (sens_t).  As 3 more electrodes (label+fid, chanpos+fid and
elecpos+fid) or in a different place, for example sens_t.fid.pnt and
sens_t.fid.label?

By the way I am using Matlab 2011 and fieldtrip version 20120208

Best regards and thanks for the help.

Jua Pablo Neira Vesga
Christian Albrechts Universität
Clinic Kiel, Germany




More information about the fieldtrip mailing list