<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Bruno,
<div class=""><br class="">
</div>
<div class="">I think we have just been looking into it. And with just, I mean really just. I just merged a pull request from Roemer van der Meij into
<a href="http://github.com/fieldtrip/fieldtrip" class="">github.com/fieldtrip/fieldtrip</a> (#141). This merge is related to a graphics issue that needs to be resolved differently for different matlab versions (in particular for matlab>=2014 it requires a different
 solution than matlab<2014). I wonder whether this is related to the problem you report. </div>
<div class="">We did not do an comparable extensive sweep of the possible combinations (i.e. matlab versions and fieldtrip versions), so could you pull a copy from git and try it out? We have a â€˜tutorial’ on the fieldtrip wiki that explains one way of getting
 yourself a local copy of the code.</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 05 May 2016, at 20:37, Bruno L. Giordano <<a href="mailto:brungio@gmail.com" class="">brungio@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hello,<br class="">
<br class="">
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).<br class="">
<br class="">
The code I run is as follows:<br class="">
<br class="">
mri=ft_read_mri(mrifilename,'dataformat','nifti_spm');<br class="">
<br class="">
cfg=[];<br class="">
cfg.method='fiducial';<br class="">
cfg.coordsys='4d';<br class="">
cfg.fiducial.nas=[59 168 104];<br class="">
cfg.fiducial.lpa=[138 133 28];<br class="">
cfg.fiducial.rpa=[147 138 169];<br class="">
mri=ft_volumerealign(cfg,mri);<br class="">
<br class="">
hs=ft_read_headshape(headshapefilename);<br class="">
% hs.pnt=hs.pos; %required for later fieldtrip versions or gives an error, see v<br class="">
<br class="">
cfg=[];<br class="">
cfg.method='headshape';<br class="">
cfg.headshape=hs;<br class="">
<br class="">
mrihs=ft_volumerealign(cfg,mri);<br class="">
<br class="">
Unless otherwise noted, the code fails when I quit the interactive alignment window.<br class="">
<br class="">
It fails in the following cases (errors below):<br class="">
Matlab: 2015; FT: 2016<br class="">
Matlab: 2015; FT: 2014<br class="">
Matlab: 2013; FT: 2016<br class="">
<br class="">
and is successful only for<br class="">
Matlab: 2013; FT: 2014<br class="">
<br class="">
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?<br class="">
<br class="">
Thank you,<br class="">
<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>Bruno<br class="">
<br class="">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>Matlab: 2013; FT: 2016<br class="">
<span class="Apple-tab-span" style="white-space:pre"></span>Matlab: 2013; FT: 2016<br class="">
Fails when quitting interactive alignment window<br class="">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
<br class="">
Error using cell/ismember>cellismemberR2012a (line 193)<br class="">
Input A of class cell and input B of class cell must be cell arrays of strings, unless one is a string.<br class="">
<br class="">
Error in cell/ismember (line 57)<br class="">
   [varargout{1:max(1,nargout)}] = cellismemberR2012a(A,B);<br class="">
<br class="">
Error in ft_senstype (line 303)<br class="">
   if     (mean(ismember(ft_senslabel('ant128'),         sens.label)) > 0.8)<br class="">
<br class="">
Error in ft_datatype_sens (line 138)<br class="">
ismeg = ft_senstype(sens, 'meg');<br class="">
<br class="">
Error in ft_checkconfig (line 250)<br class="">
 cfg.elec = ft_datatype_sens(cfg.elec);<br class="">
<br class="">
Error in ft_interactiverealign (line 71)<br class="">
cfg.template   = ft_checkconfig(cfg.template, 'renamed', {'vol', 'headmodel'});<br class="">
<br class="">
Error in ft_volumerealign (line 691)<br class="">
     tmpcfg = ft_interactiverealign(tmpcfg);<br class="">
<br class="">
<br class="">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
Matlab: 2015; FT: 2016<br class="">
Matlab: 2015; FT: 2016<br class="">
hs.pnt=hs.pos; %required or will give another error<br class="">
Fails when quitting interactive alignment window<br class="">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
<br class="">
Error using  *<br class="">
Inner matrix dimensions must agree.<br class="">
<br class="">
Error in ft_sourceinterpolate (line 328)<br class="">
       av     = interpmat*fv;<br class="">
<br class="">
Error in ft_volumerealign (line 752)<br class="">
     smoothdist          = ft_sourceinterpolate(tmpcfg, functional, target);<br class="">
<br class="">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
Matlab: 2015; FT: 2014<br class="">
Matlab: 2015; FT: 2014<br class="">
hs.pnt=hs.pos; %required or will give another error<br class="">
Fails when creating the interactive alignment window<br class="">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
<br class="">
<br class="">
ield assignment to a non-structure array object.<br class="">
<br class="">
Error in ft_plot_mesh (line 61)<br class="">
 bnd.pnt = bnd;<br class="">
<br class="">
Error in ft_interactiverealign>cb_redraw (line 282)<br class="">
   ft_plot_mesh(template.elec.chanpos,'vertexcolor', 'b', 'vertexsize',10);<br class="">
<br class="">
Error in ft_interactiverealign (line 126)<br class="">
cb_redraw(gca);<br class="">
<br class="">
Error in ft_volumerealign (line 584)<br class="">
     tmpcfg = ft_interactiverealign(tmpcfg);<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
-- <br class="">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
Bruno L. Giordano, PhD<br class="">
Institute of Neuroscience and Psychology<br class="">
58 Hillhead Street, University of Glasgow<br class="">
Glasgow, G12 8QB, Scotland<br class="">
T +44 (0) 141 330 5484<br class="">
Www: <a href="http://www.brunolgiordano.net/" class="">http://www.brunolgiordano.net</a><br class="">
Email charter: <a href="http://www.emailcharter.org/" class="">http://www.emailcharter.org/</a><br class="">
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
<br class="">
</body>
</html>