cvnlab surface tools

cvnlab surface tools

We generated example scripts and tutorial videos a long time ago, and a link to those materials is here:  how-tos . But the content there is a bit stale. We are slowly migrating relevant information here on this page.

Basic info:

  • cvnlookup.m - Quick visualization of FreeSurfer surface data.
  • check out cvnlookup_example1.m and the  YouTube video 
  • drawroipoly.m - In conjunction with cvnlookup.m, manually draw ROIs (polygons).
  • cvnlookupvertex.m - Transfer data across different surfaces (e.g. to/from fsaverage).
  • cvndefinerois.m - A wrapper around drawroipoly.m to try to make the job of drawing many ROIs more palatable.
  • check out cvndefinerois_example1.m and the  YouTube video 
  • cvnsurfsmooth.m - For smoothing data that live on surfaces.

Important notes:

  • Drawing ROIs on surfaces can result in holes. You need to draw on spheres (or flattened surfaces). If you draw on inflated, it works, but there may be vertices that are missed. You can/should double-check on a sphere view. If you draw on spheres, the drawroipoly.m code does special stuff to ensure that there aren't any holes.
  • For auditory cortex, 'occipC2' and 'occipA4' are useful "pre-canned" sphere views that (more or less) focus on auditory cortex.
  • 'fsaverage' is a quasi FreeSurfer subject with its own surfaces. Note that relative to what comes standard with FreeSurfer, we augment the fsaverage subject with extra goodies, like "full.flat.patch.3d". (This is provided with NSD.)
  • cvnlookup.m's view number 10 is slick in the sense that it can behind-the-scenes transfer your native subject's data to the fsaverage surface and then give you a visualization of the "full.flat" fsaverage surface with those data. If you manually transfer your data onto fsaverage, you can then view directly the fsaverage surface, using view 13. View 13 basically means "just show me the data on the subject's flattened surface", and if your FSID is 'fsaverage' then it'll use the custom fsaverage flattened surface that we've generated and that should be available in your 'fsaverage' directory.
  • For cvnlookup, I think NaN values get rendered for some reason (maybe this is a bug that should be fixed?). In order to "hide" NaN data points, I think you have to use the option mechanisms (like <overlayalpha>).