[FieldTrip] odd interaction between matlab and ft version in ft_volumerealign

Bruno L. Giordano brungio at gmail.com
Thu May 5 20:37:51 CEST 2016


Hello,

I am trying to run these commands on different matlab versions(2013 vs. 
2015) and using different FT versions (20141209 vs. 20160317; let's call 
them 2014 vs. 2016).

The code I run is as follows:

mri=ft_read_mri(mrifilename,'dataformat','nifti_spm');

cfg=[];
cfg.method='fiducial';
cfg.coordsys='4d';
cfg.fiducial.nas=[59 168 104];
cfg.fiducial.lpa=[138 133 28];
cfg.fiducial.rpa=[147 138 169];
mri=ft_volumerealign(cfg,mri);

hs=ft_read_headshape(headshapefilename);
% hs.pnt=hs.pos; %required for later fieldtrip versions or gives an 
error, see v

cfg=[];
cfg.method='headshape';
cfg.headshape=hs;

mrihs=ft_volumerealign(cfg,mri);

Unless otherwise noted, the code fails when I quit the interactive 
alignment window.

It fails in the following cases (errors below):
Matlab: 2015; FT: 2016
Matlab: 2015; FT: 2014
Matlab: 2013; FT: 2016

and is successful only for
Matlab: 2013; FT: 2014

Did anyone experience similar problems? Is there a workaround? If not, 
would it be complicated to estimate the transformation matrices myself 
once I know the right scale/translation/rotation parameters?

Thank you,

	Bruno

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	Matlab: 2013; FT: 2016
	Matlab: 2013; FT: 2016
Fails when quitting interactive alignment window
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error using cell/ismember>cellismemberR2012a (line 193)
Input A of class cell and input B of class cell must be cell arrays of 
strings, unless one is a string.

Error in cell/ismember (line 57)
     [varargout{1:max(1,nargout)}] = cellismemberR2012a(A,B);

Error in ft_senstype (line 303)
     if     (mean(ismember(ft_senslabel('ant128'),         sens.label)) 
 > 0.8)

Error in ft_datatype_sens (line 138)
ismeg = ft_senstype(sens, 'meg');

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

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

Error in ft_volumerealign (line 691)
       tmpcfg = ft_interactiverealign(tmpcfg);


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matlab: 2015; FT: 2016
Matlab: 2015; FT: 2016
hs.pnt=hs.pos; %required or will give another error
Fails when quitting interactive alignment window
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error using  *
Inner matrix dimensions must agree.

Error in ft_sourceinterpolate (line 328)
         av     = interpmat*fv;

Error in ft_volumerealign (line 752)
       smoothdist          = ft_sourceinterpolate(tmpcfg, functional, 
target);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matlab: 2015; FT: 2014
Matlab: 2015; FT: 2014
hs.pnt=hs.pos; %required or will give another error
Fails when creating the interactive alignment window
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


ield assignment to a non-structure array object.

Error in ft_plot_mesh (line 61)
   bnd.pnt = bnd;

Error in ft_interactiverealign>cb_redraw (line 282)
     ft_plot_mesh(template.elec.chanpos,'vertexcolor', 'b', 
'vertexsize',10);

Error in ft_interactiverealign (line 126)
cb_redraw(gca);

Error in ft_volumerealign (line 584)
       tmpcfg = ft_interactiverealign(tmpcfg);











-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bruno L. Giordano, PhD
Institute of Neuroscience and Psychology
58 Hillhead Street, University of Glasgow
Glasgow, G12 8QB, Scotland
T +44 (0) 141 330 5484
Www: http://www.brunolgiordano.net
Email charter: http://www.emailcharter.org/



More information about the fieldtrip mailing list