Dear FreeSurfer users,

I have used the "mkheadsurf" function to create "lh.seghead" in the surf
folder of my subject. Now I am trying to extract the vertices and faces of
"lh.seghead" in the following way:

           *[vertex_coords, faces] = read_surf('lh.seghead')*

but get an error in read_surf which is:

             *Undefined function or variable "faces".*

*             Error in read_surf (line 80)*
*             faces = faces+1;*

After a bit of investigation I found that the "magic" number of the file
is 16777213 while the triangle magic number is 16777214. Since these are
unequal, it doesn't go into the if statement where faces are defined.

When I try to changed the magic number manually to be the same as the
triangle magic number, I get the following error:

         *Error using reshape*
*         To RESHAPE the number of elements must not change.*

*         Error in read_surf (line 76)*
*         faces = reshape(faces, 3, fnum)' ;*

But I don't think making this change is a good idea as it would affect the
surfaces that I try to read that DO have magic number that is actually
equal to the triangle magic number.

Does anybody know why this might be happening? Any suggestions for me to
try? The read_surf works fine when I use it for the pial surface, just not
the lh.seghead. I am using FreeSurfer version 5.3.0.

I would appreciate any advice!

Thanks,

Maheen
_______________________________________________
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.

Reply via email to