Hi,
We are looking to create white matter, grey matter, and CSF masks in MNI152NLin2009cAsym space at the BOLD resolution. Previously, we were achieving this using the wmparc.2.nii output of the HCP preprocessing pipeline. Now that we are using fMRIPrep, how can we obtain an output that allows us to create masks for white matter, grey matter, and CSF for use with our BOLD data (possibly as a parcellation/segmentation image)?
Thanks so much for your help,
-Phil
Because the structural and functional images are aligned, this is purely resampling to the BOLD field-of-view/resolution. Here's an example with FreeSurfer's mri_vol2vol:
mri_vol2vol --regheader \ # No separate registration needed
--nearest \ # Nearest-neighbor resampling is appropriate for labels
--mov sub-01/anat/sub-01_space-MNI152NLin2009cAsym_dseg.nii.gz \ # Discrete segmentation
--targ sub-01/func/sub-01_task-rhymejudgment_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz \ # BOLD file
--o sub-01/func/sub-01_task-rhymejudgment_space-MNI152NLin2009cAsym_desc-preproc_dseg.nii.gz # Output
This should be equally straightforward with an analogous tool in other packages.
Thanks for the quick reply. I have one more question: Is there an fMRIPrep output in MNI152NLin2009cAsym space with the equivalent parcellation and segmentation information of the FreeSurfer output wmparc.mgz?
Hmm. No, we have aparc+aseg resampled, but that doesn't parcellate white matter.
This could be added, if desired. I think our overall assumption was that people would want gray matter parcellations, not white matter.
If you would like to do it yourself, you can mri_convert your wmparc.mgz to a NIfTI, and then you can resample with ANTs:
```
mri_convert $OUTPUT/freesurfer/sub-01/mri/wmparc.mgz \
sub-01_space-fsnative_desc-wmparc_dseg.nii.gz # To give it a BIDS-y name
antsApplyTransforms --default-value 0 --float 1 --interpolation MultiLabel \
--input sub-01_space-fsnative_desc-wmparc_dseg.nii.gz \
--output sub-01_space-MNI152NLin2009cAsym_desc-wmparc_dseg.nii.gz \
--reference-image $OUTPUT/fmriprep/sub-01/func/sub-01_task-rhymejudgment_space-MNI152NLin2009cAsym_boldref.nii.gz \
--transform fmriprep/sub-01/anat/sub-01_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 \ # antsApplyTransforms takes transforms in reverse order, so T1w-MNI...
--transform fmriprep/sub-01/anat/sub-01_from-fsnative_to-T1w_mode-image_xfm.txt # ...then fsnative-T1w
Hi @ptubiolo37 - has this issue been completely addressed?