Getting (postprocessed) fmriprep outputs into fsLR32k space

129 views
Skip to first unread message

Ellyn Butler

unread,
Oct 26, 2023, 7:59:24 PM10/26/23
to HCP-Users
Hi everyone,

I have been working on a mini pipeline to get fmriprep outputs in the native volume space (will change to post-processed data in the same space later) onto the fsLR32k surface for use in templateICAr. The pipeline runs, but I am having trouble checking the surface quality in workbench because my final functional surface does not seem to map onto a volume space. I am wondering, must there be a volume that matches the final surface I am viewing in workbench? If so, how can I identify the appropriate volume?

Also, I believe step (4) is creating a registration gifti from subject’s native freesurfer surface space to fsLR32k space, but it is not clear to me from the documentation. Does anyone know for sure if this is the case?

Note: I came up with the steps for the pipeline using a very helpful pdf I found online (Resampling-FreeSurfer-HCP.pdf) and ChatGPT.

The script is attached. I am using Freesurfer 7.4.1, WB 1.5.0, and fMRIPrep 23.1.4. I am also attaching the outputs from the following commands:

1) `freeview -f ${SUBJECTS_DIR}/sub-${subid}/surf/lh.pial:overlay=${sssurfdir}/sub-${subid}_ses-${sesid}_task-rest_space-T1w_desc-preproc_bold_lh.mgh:overlay_threshold=2,5`

and 

2) `wb_view ${sssurfdir}/sub-${subid}.L.midthickness.32k_fs_LR.surf.gii \ ${sssurfdir}/sub-${subid}_ses-${sesid}.task-rest.L.32k_fs_LR.func.gii \ ${sssurfdir}/sub-${subid}.R.midthickness.32k_fs_LR.surf.gii \ ${sssurfdir}/sub-${subid}_ses-${sesid}.task-rest.R.32k_fs_LR.func.gii \ ${ssprepdir}/anat/sub-${subid}_ses-${sesid}_desc-preproc_T1w.nii.gz`

So clearly `${ssprepdir}/anat/sub-${subid}_ses-${sesid}_desc-preproc_T1w.nii.gz` is not the corresponding volume space.

I posted the same question on neurostars here: https://neurostars.org/t/getting-fmriprep-outputs-into-fslr32k-space-viewing-issue/27052/8 

Looking forward to your feedback!

Best,
Ellyn
89fcf581d75fb4deaddd722318edbc636e6fc5a1.jpeg
ad02dc594d3cc7f08a8dcdc35489b1e8c78b821e.jpeg
66c1cd5efdfe9028e28b7dbba8dfd0a4f76dea9d.jpeg
ae217af8e586b97503ad9a38fb8bcf2f272526a3.png
create_ciftis.sh

Tim Coalson

unread,
Oct 26, 2023, 8:49:02 PM10/26/23
to hcp-...@humanconnectome.org
fMRIPrep is not developed by the HCP.  The HCP pipelines output the preprocessed fMRI data in cifti format (and MNINonLinear volume space), and the structural scans are registered to rigid ACPC alignment before we run freesurfer, and an additional copy of the surfaces are made in MNINonLinear space, we don't go back to the scanner space.  I don't know the details of how fMRIPrep handles the surfaces.  You might check if there are additional versions of the freesurfer surfaces in the freesurfer folder, or some other surfaces in the fMRIPrep outputs you can use instead.  -freesurfer-resample-prep is pretty simple, you can redo the midthickness-related commands with whatever you manage to find (average the white and pial coordinates to get midthickness, then resample it to fs_LR with barycentric).

We don't recommend frame censoring, our pipelines use MR FIX, which is an ICA method, to identify and remove motion artifacts from the data.  When the motion corruption is extreme, this ends up being largely equivalent to censoring, but it also removes artifacts from frames that don't exceed the censoring thresholds.

Tim


--
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/f63ffe88-b6cc-4be2-a2ea-b77b2466c8c4n%40humanconnectome.org.

Glasser, Matt

unread,
Nov 1, 2023, 5:04:17 AM11/1/23
to hcp-...@humanconnectome.org

If you want to use HCP Pipelines, it is a whole lot easier to just use them from scratch, rather than trying to combine with another pipeline that outputs files in different places.


Matt.

 


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.

Reply all
Reply to author
Forward
0 new messages