Hi freesurfers!
I'm trying to run the function write_surf in matlab, as far as I understand this function is to write a surface to analyze in freesurfer from matlab data. I'm not sure if the extension of the file name has to be different, so I need your help to solve this simple (I guess) problem.
The first line is what I'm trying to run and the next lines show me the error.
*write_surf('prueba.nofix/', vertices, faces);*
*...subtracting 1 from face indices for FreeSurfer compatibility*.
*Error using fwriteInvalid file identifier. Use fopen to generate a valid file identifier.Error in fwrite3 (line 29)fwrite(fid, b1, 'uchar') ;Error in write_surf (line 38)fwrite3(fid, TRIANGLE_FILE_MAGIC_NUMBER);* thank you in advance for your help! Dulce
why do you have a back slash in the file name?
On 07/08/2016 05:24 PM, Dulce Maria Magdaleno Arroyo wrote:
Hi freesurfers!
I'm trying to run the function write_surf in matlab, as far as I understand this function is to write a surface to analyze in freesurfer from matlab data. I'm not sure if the extension of the file name has to be different, so I need your help to solve this simple (I guess) problem.
The first line is what I'm trying to run and the next lines show me the error.
*write_surf('prueba.nofix/', vertices, faces);*
*...subtracting 1 from face indices for FreeSurfer compatibility*. *Error using fwrite Invalid file identifier. Use fopen to generate a valid file identifier.
Error in fwrite3 (line 29) fwrite(fid, b1, 'uchar') ;
Error in write_surf (line 38) fwrite3(fid, TRIANGLE_FILE_MAGIC_NUMBER);
thank you in advance for your help! Dulce*
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Thank you for replied me! :)
Oh, sorry!
but even If a remove the back slash in the file name I still having the same error. :(
Does the *write_surf *matlab function writes files with extension .nofix? Is that the problem?
Thank you so much!
no, the extension should be fine. Can you include the entire correspondence in your email as well as the command and the output of it?
thanks Bruce
On Sat, 9 Jul 2016, Dulce Maria Magdaleno Arroyo wrote:
Thank you for replied me! :)
Oh, sorry! but even If a remove the back slash in the file name I still having the same error. :(
Does the write_surf matlab function writes files with extension .nofix? Is that the problem?
Thank you so much!
freesurfer@nmr.mgh.harvard.edu