I am trying to follow a tutorial for running seed-to-voxel connectivity on surface functional files with my own data. Specifically, I have rs-fMRI preprocessed by fMRIPrep (91k cifti outputs), then postprocessed with XCP_ABCD, leading to a smooth denoised cifti2 file in fsaverage space (e.g. sub-XX_task-rest_space-fsLR_den-91k_desc-residual_smooth_bold.dtseries.nii).
When I try to load it in Nilearn [e.g. timeseries = surface.load_surf_data(FUNC_FILE)], I get an error since it’s not a .gii, so I instead load it with image.load_img.
After transposing the timeseries to match the expected shape output from loading surfaces, I do the rest of the tutorial as is, but fail when I get to the seed-to-voxel stat-map plotting, since the density of the func file (91k res) does not match the surface mesh. I cannot seem to find a fsaverage 91k surface mesh to plot. Is there a way for me to plot my stat maps? Happy to provide more info as needed.
I might have misunderstood what you’re trying to do, but any chance vol_to_surf (see doc) could be useful here? Instead of using load_img, you would pass your image and mesh to vo_to_surf which will return the texture that you want to plot.
OK, I got it wrong. I thought you converted your cifti image.
I think this post could be useful (especially the answers from @emdupre and @effigies), as well as this notebook (also linked in the post).
This has definitely helped me understand more of the I/O of CIFTI files, but I am still running into an error where the func files (91k) do not match the resolution of surface meshes. I’ve looked for something that may work in both the subject’s anatomical derivatives as well as the fsLR templateflow cache. Maybe this is something that should be asked to fMRIPrep devs (@oesteban?), but one would think that the fsLR surface mesh at the appropriate resolution would be provided at some point in the workflow, right?
Thanks for the response. However, the 32k resolution of these meshes wouldn’t match the 91k of the CIFTI file, right? I would like to avoid resampling, if possible.