Hi Nick, That works PERFECTLY! Thank you so much, it has been a big help!
I hope I may ask you another question: I am actually trying to convert each freesurfer-label (from aparc.annot) into separate surfaces (not gifti-labels) So ideally I would convert lh.precentral.label > lh.precentral.gii. I have used the command "label2surf", Part of FSL (build 504). (and I have used the "new" gifti lh.white created with your updated version as the input surface) However, the output gifti does not open in matlab (instead shows the same error message seen before). Now I would guess that whatever changes you made to mris_convert would have to be applied to "label2surf" as well. I have noticed some changes in the gifti files with your new mris_convert command. However, I'm not so familiar with the gifti file structure. Maybe I could ask you to have a look into this? Also, If there is a easier way to achieve my goal any advise is welcome! Again, many thanks for your efforts so far! Bastian. On 29 May 2014 02:05, Nick Schmansky, MGH <ni...@nmr.mgh.harvard.edu> wrote: > Bastian, > > Hi, I've posted a new mris_convert which should solve the problem for > you. It's built for Centos 6, so if you need it for another platform, > let me know. It's here: > > ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/misc/linux-centos6_x86_64/ > > Nick > > > > On Wed, 2014-05-28 at 11:42 +0200, Bastian Cheng wrote: >> Dear Freesurfer-Experts, >> >> I would like to create gifti-surfaces to use in matlab. >> >> That's what I am doing so far (latest FS-Version): >> >> mris_convert lh.white lh.white.gii >> >> I then try to open it using the "gifti" command (g=gifti('file.gii')) >> (http://www.artefact.tk/software/matlab/gifti/) >> >> however, I get an error message from matlab: >> >> >>>>>>>>>>> >> ??? Attempt to reference field of non-structure array. >> Error in ==> gifti.subsref at 28 >> varargout{1} = this.data{j}.space.MatrixData; >> Error in ==> gifti.struct at 17 >> [values{i,:}] = subsref(this(:), substruct('.',names{i})); >> Error in ==> gifti.display at 17 >> eval([display_name ' = struct(this);']); >> >>>>>>>>>>>>>>> >> >> Am I missing something? Is there anything special with the .gii file form FS? >> >> here is the surface file I created with mris_convert: http://we.tl/B2n4Ex6ifJ >> >> I am able to open the gifti file with freeview. >> I also updated the gifti-toolbox in matlab to the latest version. >> >> >> Any help is appreciated! >> _______________________________________________ >> Freesurfer mailing list >> Freesurfer@nmr.mgh.harvard.edu >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer >> >> > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the e-mail > contains patient information, please contact the Partners Compliance HelpLine > at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer