Hey,
I’ve been working with fMRI images by treating them 3D volumes/arrays (for the MNI template it is a (91, 109, 91) sized array). So far, I’ve used nibabel
to load NIFTI1 images as a 3D volume and it works seamlessly.
I’m now trying to extend the work I’m doing to HCP resting state fMRI data. However, the resting state data is in CIFTI2 format, and I’ve been trying to convert it into a 3D volume, but to no avail.
I’ll list a couple of things I’ve tried, and hopefully someone can point me to the right tools or tell me what I’ve been doing wrong.
-
Connectome workbench:
wb_command -cifti-convert -to-nifti [cifti file] [output file]
This produces a file thatnibabel
loads as as (32767, 3, 1, 1200) - the 4th dimension is for time I think. I’m not sure how to convert this into a 3D volume (or 4D including a dimension for time) -
Loading CIFTI2 file using
nibabel
: I have tried iterating over thebrain_models
which have regions withvoxel_indices_ijk
. However, this creates images without surface information.
I’m not sure what I should be doing instead - how do I go about loading in CIFTI2 files as 3D matrices?
Thanks!