I think I have fixed it myself. The input for the 'lh.pial' wasn't coming through correctly. I edited the find_corresponding_center_FSformat.m to take in not only 'lh.pial' but the entire path leading to 'lh.pial'. I did this for make_roi_paths.m and compute_lgi.m as well as added an input argument in /freesufer/bin/mris_compute_lgi to take in the current working directory ($PWD) and changed the acceslocation of the pial surface into [pial_dir '/' pial].
So, matlab: function find_corresponding_center_FSformat (pial, outersmoothed, stepsize, outdir, flagfile, pial_dir) [...] [mesh_total.vertices, mesh_total.faces]=freesurfer_read_surf([pial_dir '/' pial]);
and bin file:
set MLF = /tmp/mrc"_$$_".m set arg1 = ${input} set arg2 = ${input}-outer-smoothed set arg3 = ${stepsize} set arg4 = ${tmpdir} set arg5 = ${MLF} set arg6 = ${PWD} echo "find_corresponding_center_FSformat('${arg1}','${arg2}',$ {arg3},'${arg4}','${arg5}','${arg6}'); exit" > $MLF
Just posting in case anybody needs this for future reference.
Michael
2017-09-28 12:36 GMT-07:00 Michael Leibbrand michael.leib7@gmail.com:
Dear FreeSurfer team,
I'm trying to calculate the local gyrification index for the test subject Bert (or any of my own subjects for that matter) but I'm running into an error when FS tries to read the lh.pial surface.
I have the exact same error as Louise (see: https://mail.nmr.mgh. harvard.edu/pipermail//freesurfer/2017-March/050593.html) but that doesn't seemed to have been answered yet. The error basicly takes place during the FS matlab command freesurfer_read_surf, where it is unable to read the lh.pial (see the log). This also causes the command find_corresponding_center_FSformat to fail because there are no faces/vertices as input.
">> FREESURFER_READ_SURF [v 1.2 ] Error using freesurfer_read_surf (line 90) could not open surface file lh.pial.
Error in find_corresponding_center_FSformat (line 26) [mesh_pial.vertices, mesh_pial.faces] = freesurfer_read_surf(pial);"
If I run freesurfer_read_surf directly from matlab with the lh.pial as input, it does return the faces/vertices to me in my matlab workspace. This led me to think there might be a communication error between the FS toolbox and matlab itself (or maybe the lh.pial is specified incorrectly?).
Am I missing something here?
FS versions used: nightly build and stable 6.0 Matlab version: 2017a OS: ubuntu 16.04 uname -a: Linux michael-M11AD 4.10.0-35-generic #39~16.04.1-Ubuntu SMP Wed Sep 13 09:02:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Cheers,
Michael
freesurfer@nmr.mgh.harvard.edu