Corey, Matlab uses vertex numbers starting from one. However, the vertex numbers from Freesurfer start from zero. This error in matlab can be fixed by adding 1 to the vertex numbers.
Jooman On Mon, 2009-02-02 at 16:14 -0500, Keller, Corey J. wrote: > Hi Freesurfers, > > I am having some issues plotting a reconstructed brain in matlab. I have used > the read_surf function to load in the pial surface file lh.pial and save the > lh_pial.vert and lh_pial.tri. I get the following output: > > fv.vertices fv.faces] = read_surf('lh.pial') > > fv = > > vertices: [140817x3 double] > faces: [281630x3 double] > > h = patch(fv,'FaceColor',[.5 .5 .5]) > ??? Error using ==> patch > Faces values must be >= 1.0. > > My first 10 face values are: > > fv.faces(1:10,1:3) > > ans = > 0 1 5 > 6 5 1 > 0 26 1 > 27 1 26 > 0 5 26 > 39 26 5 > 1 2 6 > 7 6 2 > 1 27 28 > 1 28 2 > > This seems to be the issue because every other row the faces values are > greater > than zero. Do you know why all of my recon output pial files look like this > and > how I can fix the issue. Thanks. > > Best, > Corey > > _______________________________________________ > 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