ThomasYeoLab / CBIG

MIT License
586 stars 384 forks source link

CBIG_RF_projectMNI2fsaverage to gii formated file #28

Closed gourdchen closed 2 years ago

gourdchen commented 2 years ago

Hi, I used the CBIG_RF_projectMNI2fsaverage.sh to map my statistic results from MNI to fsaverage. I see the script use MRIwrite to save the results, which is a matrix with size of 1*163842. The code is following:

input = MRIread('$input'); 
[lh_proj_data, rh_proj_data] = CBIG_RF_projectMNI2fsaverage('$input', '$interp', '$lh_map', '$rh_map'); 
input.vol = permute(lh_proj_data, [4 2 3 1]); 
MRIwrite(input, '$lh_output'); 
input.vol = permute(rh_proj_data, [4 2 3 1]); 
MRIwrite(input, '$rh_output'); 

It can be visualised by freeview, but how about connectome workbench? I tried to convert the nii.gz file to fun.gii file with mri_covert, but I have been filed. The display in workbench was just disordered. How could I output .gii file directly or convert the results to .gii

rubykong commented 2 years ago

@gourdchen It cannot. I don't think workbench support nifti format. MRIwrte and MRIread were used for reading and writing a nifti format file defined by freesurfer. Workbench mainly support cifti format. fsaverage surface template is defined by freesurfer, fsLR template is defined by HCP group. I don't think workbench even supports fsaverage if you don't make your own templates for fsaverage. You can check here for more info about freesurfer fsaverage and workbench fs_LR space: https://surfer.nmr.mgh.harvard.edu/fswiki/FsAverage Van Essen DC, Glasser MF, Dierker DL, Harwell J, Coalson T. 2012b. Parcellations and hemispheric asymmetries of human cerebral cortex analyzed on surface-based atlases.

You can use freeview from Freesurfer to visualize the nii.gz file.

gourdchen commented 2 years ago

Thanks for your explanation! I did not know the fsLR and fsaverage were two template previously. I prefer to use workbench than freeview because of the massive bugs of freeview that lead to many crash in windows. I have solved it by converting the surface of fsaverage to gii format, which could be displayed in workbench with the results as the overlay.