func.gii to mgh conversion, using metric-resample?

277 views
Skip to first unread message

Linn Christin Bonaventure Norbom

unread,
Jun 14, 2022, 3:35:18 PM6/14/22
to HCP-Users
Dear HCP experts, 

I have several vertex-wise surfaces that after -cifti-separate resulted in something like "n8000_fsLR.32k_thickness.L.func.gii" and "n8000_fsLR.32k_T1w/T2wratio.L.func.gii" (as they are concatenated across subjects n = 8000). I now wish to perform multimodal fusion by FSLs FLICA, but unfortunately the input needs to be .mgh (or nii.gz) and I thus need to convert my gifti files to mgh. 

The only way I can think of is to map my fs_LR data to fsaverage using the wb_command metric-resample resulting in something like "n8000_thickness.L.32k_fsavg_L.func.gii" and then hopefully being able to use Freesurfers mris_convert to convert this newest gifti to mgh. Does anyone have experience with func.gii to mgh convertion, and does this appear sound?

If so, the only issue is that I am unsure of where to find the standard meshes including
"fs_LR-deformed_to-fsaverage.L.sphere.32k_fs_LR.surf.gii" and "fsaverage_std_sphere.L.32k_fsavg_L.surf.gii needed for the metric-resample command. Are these apart of some standard atlas like Conte69? Would they need to be downloaded or can they be found within the ConnectomeWorkbench files?

Thank you so much in advance for any input here!
Kinds regards Linn 

Glasser, Matt

unread,
Jun 14, 2022, 3:38:07 PM6/14/22
to hcp-...@humanconnectome.org

I don’t think you have to map to fsaverage to convert to mgh; however, I agree it is unfortunate that FSL’s FLICA does not support GIFTI as some other FSL tools do.  I’ve not personally used FLICA, so I can’t help more with that specifically.

 

Matt.

--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion on the web visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/e95b87dc-500d-4bb0-a600-e74f55e4c4ean%40humanconnectome.org.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Coalson, Timothy Scott (S&T-Student)

unread,
Jun 14, 2022, 6:48:34 PM6/14/22
to HCP-Users
If it doesn't do any spatial operations (smoothing, gradient, etc), you should be able to use wb_command -cifti-convert -to-nifti to generate a "fake nifti" form of the original cifti file, and convert back afterwards.

If it really does need it to spatially be a volume file, that is quite unfortunate.  wb_command does have -metric-to-volume-mapping, which you could use for a similar purpose (temporarily convert to a volume-like file, and immediately convert back afterwards with -volume-to-surface-mapping with the same surfaces - specifically, don't try to compare the volume-format file to other data, because volume-based group alignment of human cortex isn't very good, and group average surfaces lose folding definition in a location-dependent way).

Tim


From: Linn Christin Bonaventure Norbom <linnn...@gmail.com>
Sent: Tuesday, June 14, 2022 2:35 PM

To: HCP-Users <hcp-...@humanconnectome.org>
Subject: [hcp-users] func.gii to mgh conversion, using metric-resample?
 
WARNING: This message has originated from an External Source. This may be a phishing expedition that can result in unauthorized access to our IT System. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
--

Linn Christin Bonaventure Norbom

unread,
Jun 15, 2022, 1:41:31 PM6/15/22
to hcp-...@humanconnectome.org
Thank you both so much for the quick replies.
It was a great idea to convert data to nifti, zipping them and then performing a slight re-write of the flica_load.m script, which is appearing to work! 

Thanks so much for the help!
Kinds regards Linn 

Coalson, Timothy Scott (S&T-Student)

unread,
Jun 15, 2022, 3:46:14 PM6/15/22
to hcp-...@humanconnectome.org
If you didn't know, workbench will automatically write volume files as gzipped nifti just by having the output filename end in ".nii.gz".  However, this shouldn't be done when writing to cifti format (don't try ".dtseries.nii.gz", etc), as the cifti standard forbids being gzipped during reading/writing (and workbench may fail to write it).

Tim


From: Linn Christin Bonaventure Norbom <linnn...@gmail.com>
Sent: Wednesday, June 15, 2022 12:40 PM
To: hcp-...@humanconnectome.org <hcp-...@humanconnectome.org>
Subject: Re: [hcp-users] func.gii to mgh conversion, using metric-resample?
 
Reply all
Reply to author
Forward
0 new messages