[Homer-users] Error in using create_HeadVox.m

Huppert, Ted huppertt at upmc.edu
Wed Feb 10 13:43:45 EST 2016
Search archives:

The problem is that all arrays in matlab start with the index 1, but arrays in most other computer languages start at “0”.  The surfaces read in from freesurfer use the zero based indexing on the faces variable, but matlab doesn’t like this.

Change the line
*h=trisurf(fa,va(:,1),va(:,2),va(:,3),va(:,1));*

*h=trisurf(fa+1,va(:,1),va(:,2),va(:,3),va(:,1));*

To increment all the faces by 1 so that the numbering starts at 1 instead of 0.  Or more generally, put something like "fa = fa+1;” somewhere right after the field gets read in from FreeSurfer.


-Ted




Theodore Huppert, PhD
Associate Professor
Department of Radiology
Department of Bioengineering
Center for Neural Basis of Cognition
Clinical and Translational Science Institute

University of Pittsburgh
Email: huppertt at upmc.edu<mailto:huppertt at upmc.edu>
Phone: (412) 647-8459

On Feb 10, 2016, at 1:20 PM, jdubb at nmr.mgh.harvard.edu<mailto:jdubb at nmr.mgh.harvard.edu> wrote:



Hi Maheen,
I'm not clear about this issue.

I couldn't find a script called create_HeadVox.m
under Homer2. Where is this script supposed to be in the
Homer2 folder structure?

Are you trying to convert Freesurfer files to AtlasViewer?
If so I'll need more info on what Freesurfer files you have
in your subject folder.

Jay



Dear Homer Users,

I am trying to use the "create_HeadVox.m" script under Homer to create the
necessary files to have an individual subject anatomy in Homer. However, I
keep getting the following error message and I'm unsure why.

*Error using patch*
*Faces values must be >= 1.0*

*Error in trisurf (line 93)*
*h = patch('faces',trids,'vertices',[x(:) y(:)
z(:)],'facevertexcdata',c(:),...*

*Error in create_HeadVox (line 56)*
*h=trisurf(fa,va(:,1),va(:,2),va(:,3),va(:,1));*

I used the "write_surf.m" script to create the meshes in the following way:

*write_surf('pialsurf.mesh',pialn,pialf);*

where pialn are the nodes of the pial surface and pialf are the faces of
the pial surface. Prior to this I had to use the "mergemesh" function in
iso2mesh to combine the left handside and right handside individual
surfaces that FreeSurfer creates.

If anyone could tell me where I am going wrong I would be very grateful!

Thanks,

Maheen
_______________________________________________
Homer-users mailing list
Homer-users at nmr.mgh.harvard.edu<mailto:Homer-users at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users

_______________________________________________
Homer-users mailing list
Homer-users at nmr.mgh.harvard.edu<mailto:Homer-users at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users


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.




More information about the Homer-users mailing list