This is because FreeSurfer uses a more complicated coordinate system than
Connectome Workbench.  The next version of FreeSurfer will have some
options in mris_convert to fix this, but for now you can do the following:

#Find c_ras offset between FreeSurfer surface and volume and generate
matrix to transform surfaces
      
      
        
        MatrixX=`mri_info "$FreeSurferFolder"/mri/brain.finalsurfs.mgz |
grep "c_r" | cut -d "=" -f 5 | sed s/" "/""/g`
      
      
        
        MatrixY=`mri_info "$FreeSurferFolder"/mri/brain.finalsurfs.mgz |
grep "c_a" | cut -d "=" -f 5 | sed s/" "/""/g`
      
      
        
        MatrixZ=`mri_info "$FreeSurferFolder"/mri/brain.finalsurfs.mgz |
grep "c_s" | cut -d "=" -f 5 | sed s/" "/""/g`
      
      
        
        echo "1 0 0 ""$MatrixX" > "$FreeSurferFolder"/mri/c_ras.mat
      
      
        
        echo "0 1 0 ""$MatrixY" >> "$FreeSurferFolder"/mri/c_ras.mat
      
      
        
        echo "0 0 1 ""$MatrixZ" >> "$FreeSurferFolder"/mri/c_ras.mat
      
      
        
        echo "0 0 0 1" >> "$FreeSurferFolder"/mri/c_ras.mat
      
      
        



      
      
        
            ${CARET7DIR}/wb_command -surface-apply-affine
"$T1wFolder"/"$NativeFolder"/"$Subject"."$Hemisphere"."$Surface".native.sur
f.gii "$FreeSurferFolder"/mri/c_ras.mat
"$T1wFolder"/"$NativeFolder"/"$Subject"."$Hemisphere"."$Surface".native.sur
f.gii
      
      
        


Peace,

Matt.

On 10/13/15, 9:32 AM, "hcp-users-boun...@humanconnectome.org on behalf of
C.D. Langen" <hcp-users-boun...@humanconnectome.org on behalf of
c.lan...@erasmusmc.nl> wrote:

>Greetings,
>
>I am trying to use wb_view to view freesurfer surfaces and to load an
>overlay from a freesurfer volume (in this case, wmparc), but when I load
>them both, they are not aligned (image attached). What can I do to get
>the surface and volumes into the same space?
>
>Here are the steps I have completed to get the surface and metric files:
>
>1. Convert pial surface to gifti: mris_convert lh.pial lh.pial.surf.gii
>2. Convert wmparc from mgz to nii: mri_convert wmparc.mgz
>wmparc_origSpace.nii.gz
>3. Map wmparc to pial surface: wb_command -volume-to-surface-mapping
>wmparc.nii.gz lh.pial.surf.gii wmparc.lh.shape.gii -trilinear
>
>Regards,
>Carolyn
>
>_______________________________________________
>HCP-Users mailing list
>HCP-Users@humanconnectome.org
>http://lists.humanconnectome.org/mailman/listinfo/hcp-users


_______________________________________________
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

Reply via email to