Convert GIFTI to FreeSurfer Label

Hi all,

This should be fairly easy, but I have been struggling for a bit on this.

I have used mris_convert to convert a .label to a .gii:

mris_convert --label lh.BA45_exvivo.label BA45 sub-XXX_hemi-L_midthickness.surf.gii lh.BA45_exvivo.gii

Then I did some operations on the GIFTI in workbench-command, and now I am simply trying to convert the modified .gii back to a .label.

So I tried something like:
mris_convert --label $gii_to_convert BA45 sub-XXX_hemi-L_midthickness.surf.gii $label_out and I get the following error:

<GIFTI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
error: mris_convert: could not scan # of lines from label file
ERROR: reading .label file specified for --label: lh.betas_thresh.BA45_exvivo.func.gii

so it looks like it is trying to read in my .gii as a .label.

How can I do this .gii to .label conversion? Also open to using other softwares beside FreeSurfer if needed.

Best,
Steven

1 Like