[FieldTrip] Failure to import cortical surface extracted with freesurfer into Matlab using ft_read_headshape

Darinka Trübutschek darinkat87 at gmail.com
Wed May 1 13:27:06 CEST 2019


Dear fieldtrip community,

I am currently trying to import cortical surfaces extracted with freesurfer
(version: freesurfer-linux-centos7_x86_64-dev-20190403-dacefd1) into Matlab
(version: R2018b) using the fieldtrip function ft_read_headshape (version:
20190329). All of this is run in an Ubuntu 18.04.2 LTS environment. While
all of the extracted surfaces seem fine upon visual inspection in freeview,
the import into Matlab fails, throwing the following error message:

pial = ft_read_headshape('freesurfer/surf/lh.pial');
Error using fread
Invalid size.

Error in read_surf (line 72)
  vertex_coords = fread(fid, vnum*3, 'float32') ;

Error in ft_read_headshape (line 909)
    [pos, tri] = read_surf(filename);

It is most certainly related to the fact that, both for the number of
vertices (vnum) and the number of faces (fnum), the function read_surf
returns non-sensible (?) values (i.e., vnum = -1.0263e+09 and fnum  =
-1.0529e+09).

The same code produces no error when run on the same pial surface extracted
with a different version of freesurfer
(freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c) in a different
Ubuntu environment (Ubuntu 16.04 LTS). As, however, both of these surfaces
look qualitatively similar in freeview, I am at a loss at where exactly to
start to fix the above problem and would be grateful for any help.

Many thanks,
Darinka

-- 
Darinka Trübutschek, PhD

Department of Experimental Psychology
Anna Watts Building
Radcliffe Observatory Quarter
Woodstock Road
Oxford, OX2 6GG
UK

website: https://sites.google.com/site/dtruebutschek/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190501/75fb3e2c/attachment-0001.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list