help
help > RE: using other freesurfer surface to project maps
Apr 22, 2020 01:04 AM | Pedro Valdes-Hernandez - University of Florida
RE: using other freesurfer surface to project maps
Awesome. I think I will be able to
achieve what I want with your explanation.
I'll let you know if it worked
Thank you!
Are the developmental tools more recent than version 19b?
Originally posted by Alfonso Nieto-Castanon:
I'll let you know if it worked
Thank you!
Are the developmental tools more recent than version 19b?
Originally posted by Alfonso Nieto-Castanon:
Hi
Pedro,
On a closer look I am going to assume you really meant (a). I was actually working recently on updating the default reference pial & white surfaces used by CONN display functions (to be based on freesurfer white/pial surfaces from the same ICBM152 template -nlin_asym_09c- as the one used by CONN's slice-display functions, instead of the current average fsaverage surfaces) so the procedure should be very similar in your case. It goes something like this:
1) resample your subject white&pial surfaces to fsaverage level8 sampling, e.g. using the syntax:
conn_surf_readsurfresampled('/mysubject/surf/lh.pial',true,'/mysubject/mri/T1.mgz');
this assumes that you have run recon-all, in particular the above uses the information in lh.sphere.reg in order to match fsaverage tessellation to this subject specific sampling, as well as the reference T1 image in order to match subject-specifc surface coordinates to the reference image "world" space. The line above will create a new lh.pial.fsavg file, simply rename that file to lh.pial.surf. Then repeat the same procedure for lh.white, rh.pial, and rh.white surfaces.
2) compute new "lh.mid.surf" files (these simply represent the mid-point between pial and white surfaces), using the syntax:
tsurf1 = conn_surf_readsurf('lh.pial.surf');
tsurf2 = conn_surf_readsurf('lh.white.surf');
conn_freesurfer_write_surf('lh.mid.surf',(tsurf1.vertices+tsurf2.vertices)/2,tsurf1.faces-1);
and then repeat the same procedure using rh surfaces instead.
You "should" then be able to simply substitute CONN utils/surf reference surfaces with these ones without a problem, but please let me know otherwise. Also note that some of CONN's functions used by the code above have been modified recently, please use the development version of CONN (in https://web.conn-toolbox.org/resources/s...) to make sure everything goes smoothly
Best
Alfonso
originally posted by Alfonso Nieto-Castanon:
On a closer look I am going to assume you really meant (a). I was actually working recently on updating the default reference pial & white surfaces used by CONN display functions (to be based on freesurfer white/pial surfaces from the same ICBM152 template -nlin_asym_09c- as the one used by CONN's slice-display functions, instead of the current average fsaverage surfaces) so the procedure should be very similar in your case. It goes something like this:
1) resample your subject white&pial surfaces to fsaverage level8 sampling, e.g. using the syntax:
conn_surf_readsurfresampled('/mysubject/surf/lh.pial',true,'/mysubject/mri/T1.mgz');
this assumes that you have run recon-all, in particular the above uses the information in lh.sphere.reg in order to match fsaverage tessellation to this subject specific sampling, as well as the reference T1 image in order to match subject-specifc surface coordinates to the reference image "world" space. The line above will create a new lh.pial.fsavg file, simply rename that file to lh.pial.surf. Then repeat the same procedure for lh.white, rh.pial, and rh.white surfaces.
2) compute new "lh.mid.surf" files (these simply represent the mid-point between pial and white surfaces), using the syntax:
tsurf1 = conn_surf_readsurf('lh.pial.surf');
tsurf2 = conn_surf_readsurf('lh.white.surf');
conn_freesurfer_write_surf('lh.mid.surf',(tsurf1.vertices+tsurf2.vertices)/2,tsurf1.faces-1);
and then repeat the same procedure using rh surfaces instead.
You "should" then be able to simply substitute CONN utils/surf reference surfaces with these ones without a problem, but please let me know otherwise. Also note that some of CONN's functions used by the code above have been modified recently, please use the development version of CONN (in https://web.conn-toolbox.org/resources/s...) to make sure everything goes smoothly
Best
Alfonso
originally posted by Alfonso Nieto-Castanon:
Hi
Pedro,
The surf folder in CONN installation folder only contains reference fsaverage surfaces used by CONN mainly for display purposes. The sampling in these surfaces is the level8 fsaverage tesellation (with 163,842 vertices per hemisphere), while freesurfer sampling of each subject-specific surfaces is unconstrained (with an arbitrary / typically-different number of vertices per hemisphere). In any way, before going in much detail about these differences and how these files in CONN were created, just to double-check, could you please confirm whether what you would like to do is:
a) have CONN use different set of reference gray, white, semi-inflated, and inflated cortical surfaces in all CONN's 3d display functions (this does require modifying CONN's reference surf files)
or b) perform surface-level analyses or use surface-level ROIs in CONN, for example after running recon-all on your subjects you would like to import some freesurfer ROIs defined on each subject cortical surface, such an aparc+aseg.mgz file (this does not requires modifying any of CONN's reference surf files)
Thanks
Alfonso
Originally posted by Pedro Valdes-Hernandez:
The surf folder in CONN installation folder only contains reference fsaverage surfaces used by CONN mainly for display purposes. The sampling in these surfaces is the level8 fsaverage tesellation (with 163,842 vertices per hemisphere), while freesurfer sampling of each subject-specific surfaces is unconstrained (with an arbitrary / typically-different number of vertices per hemisphere). In any way, before going in much detail about these differences and how these files in CONN were created, just to double-check, could you please confirm whether what you would like to do is:
a) have CONN use different set of reference gray, white, semi-inflated, and inflated cortical surfaces in all CONN's 3d display functions (this does require modifying CONN's reference surf files)
or b) perform surface-level analyses or use surface-level ROIs in CONN, for example after running recon-all on your subjects you would like to import some freesurfer ROIs defined on each subject cortical surface, such an aparc+aseg.mgz file (this does not requires modifying any of CONN's reference surf files)
Thanks
Alfonso
Originally posted by Pedro Valdes-Hernandez:
Hi Alfonso,
I would like to substitute the \surf folder in the CONN installation with the outputs of Freesurfer (FS) on my specific data.
I have a set of ROIs masked using a specific mask in a specific volume. I used this volume to generate the Freesurfer /surf folder.
However, the FS output files are the same in CONN's /surf folder. For example, lh.pial.surf in CONN is merely lh.pial in the FS output. Also, cortex and mid surfaces are not present and the registration is not symmetric as in CONN, i.e., right and left surfaces do not have the same number of trianges. Thus, even if I trick CONN by renaming some files and reusing them for other types of surfaces I still get an error due to this difference between hemispheres.
I wonder how this CONN's \surf was created and how I can adapt my data to its format.
I am attaching my output
Thank you!
I would like to substitute the \surf folder in the CONN installation with the outputs of Freesurfer (FS) on my specific data.
I have a set of ROIs masked using a specific mask in a specific volume. I used this volume to generate the Freesurfer /surf folder.
However, the FS output files are the same in CONN's /surf folder. For example, lh.pial.surf in CONN is merely lh.pial in the FS output. Also, cortex and mid surfaces are not present and the registration is not symmetric as in CONN, i.e., right and left surfaces do not have the same number of trianges. Thus, even if I trick CONN by renaming some files and reusing them for other types of surfaces I still get an error due to this difference between hemispheres.
I wonder how this CONN's \surf was created and how I can adapt my data to its format.
I am attaching my output
Thank you!
Threaded View
| Title | Author | Date |
|---|---|---|
| Pedro Valdes-Hernandez | Apr 20, 2020 | |
| Alfonso Nieto-Castanon | Apr 21, 2020 | |
| Alfonso Nieto-Castanon | Apr 21, 2020 | |
| Pedro Valdes-Hernandez | Apr 22, 2020 | |
| Alfonso Nieto-Castanon | Apr 22, 2020 | |
| Pedro Valdes-Hernandez | Apr 22, 2020 | |
| Pedro Valdes-Hernandez | Apr 22, 2020 | |
| Alfonso Nieto-Castanon | Apr 22, 2020 | |
| Pedro Valdes-Hernandez | Apr 22, 2020 | |
