[FieldTrip] ft_volumerealign with headshape

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Nov 17 16:26:27 CET 2015


Hi Tobias,
I came across the same thing, and fixed it locally with a dirty hack. Please do drop by so that we can make a clean fix.
Best,
JM

On Nov 17, 2015, at 4:12 PM, Tobias Staudigl <tobias.stdgl at gmail.com<mailto:tobias.stdgl at gmail.com>> wrote:

Dear all,

I have some trouble using the polhemus headshape to realign the structural mri of a participant. Following an earlier post on this issue (http://mailman.science.ru.nl/pipermail/fieldtrip/2013-April/006493.html), I use ft_volumerealign twice:

cfg = [];
cfg.method = 'interactive';
cfg.coordsys = 'ctf';
mri_realigned = ft_volumerealign(cfg,mri);

works fine, then:

cfg = [];
cfg.method = 'headshape'
cfg.coordsys = 'ctf';
cfg.headshape.headshape = hs;
mri_realigned2 = ft_volumerealign(cfg,mri_realigned);

after the message 'doing interactive realignment with headshape' I get the following error:
**************
Reference to non-existent field 'label'.

Error in ft_datatype_sens (line 136)
nchan = length(sens.label);

Error in ft_checkconfig (line 248)
  cfg.elec = ft_datatype_sens(cfg.elec);

Error in ft_interactiverealign (line 68)
cfg.template   = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'});

Error in ft_volumerealign (line 586)
      tmpcfg = ft_interactiverealign(tmpcfg);
**************

Reading the polhemus headshape was done with:
[hs]=ft_read_headshape('hs_S01.pos');
which looks fine when plotting it with
ft_plot_headshape(hs);

I am using the fieldtrip version at the Donders.
When using an older version, fieldtrip-20131231, no error occurs.

Any help very much appreciated!
Best,
Tobias
_______________________________________________
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/20151117/96ba1b23/attachment.html>


More information about the fieldtrip mailing list