mri_vol2surf does not actually produce a surface, it produces a surface overlay (ie, a value for each vertex). You can to run recon-all to produce a surface
On 2/27/2020 4:49 AM, Shuntaro Aoki wrote:
External Email - Use CautionDear mailing list,
I was trying to convert a volume image to a freesurfer surface (as gii) with `mri_vol2surf` for visualization, but ended up with invalid surface data (i.e., a file not loadable by freeview).
What I did was:
% mri_vol2surf --version stable5 % mri_vol2surf --src ./sample_volume.nii.gz --regheader sample-sub
--hemi lh --out ./sample_vol2surf_lh.gii
Here, `sample_volume.nii.gz` is a volume image (such as a statistical map) registered to an individual reference T1w image of subject `sample-sub`, which was the input of recon-all for the subject. The command completed without errors:
srcvol = ./sample_volume.nii.gz srcreg unspecified srcregold = 0 srcwarp unspecified surf = white hemi = lh reshape = 0 interp = nearest float2int = round GetProjMax = 0 INFO: float2int code = 0 Done loading volume Computing registration from header. Using /home/share/data/fmri/freesurfer/subjects/sample-sub/mri/orig.mgz as target reference. Reading surface /home/share/data/fmri/freesurfer/subjects/sample-sub/surf/lh.white Done reading source surface Mapping Source Volume onto Source Subject Surface 1 0 0 0 using old Done mapping volume to surface Number of source voxels hit = 31055 Writing to ./sample_vol2surf_lh.gii Dim: 155685 1 1
Then I tried to open the resulting surface `sample_vol2surf_lh.gii` with freeview (ver 1.0 build 2013-05-13) but it failed, saying "Failed to load Surface". I also got the following shell output:
mriseadGIFTIfile: mris is NULL! found when parsing file /home/mu/aoki/work/surf_sphere/sample_vol2surf_lh.gii MRISread failed mriseadGIFTIfile: mris is NULL! found when parsing file /home/mu/aoki/work/surf_sphere/sample_vol2surf_lh.gii
The output of `mris_info` is:
% mris_info sample_vol2surf_lh.gii
gifti_image struct version = 1.0 numDA = 1 gim->meta nvpairs struct, len = 3 : nvpair: 'UserName' = 'aoki' nvpair: 'Date' = 'Thu Feb 27 17:32:40 2020' nvpair: 'gifticlib-version' = 'gifti library version 1.09, 28 June, 2010'
gim->labeltable giiLabelTable struct, len = 0 :
gim->darray[0] giiDataArray struct intent 0 = NIFTI_INTENT_NONE datatype 16 = NIFTI_TYPE_FLOAT32 ind_ord 1 = RowMajorOrder num_dim = 1 dims = 155685, 0, 0, 0, 0, 0 encoding 3 = GZipBase64Binary endian 2 = LittleEndian ext_fname = ext_offset = 0 darray->meta nvpairs struct, len = 0 : data = <set> nvals = 155685 nbyper = 4 numCS = 0 darray->ex_atrs nvpairs struct, len = 0 :
gifti_image struct swapped = 0 compressed = 1 -- darray totals: 1 MB gim->ex_atrs nvpairs struct, len = 0 : ==================================================
I checked matching between voxels in the input volume and the surface with the output of --srchit option and found the registration was fine.
I also tried mgh output but got another invalid file.
% mris_info sample_vol2surf_lh.mgh ERROR: MRISread: file 'sample_vol2surf_lh.mgh' has 0 vertices! Probably trying to use a scalar data file as a surface!
No such file or directory
I would appreciate any advice on this.
Regards,
Shuntaro