Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home Forum Using data sets vim-4 voxel mappers

vim-4 voxel mappers

Up to Using data sets

vim-4 voxel mappers

Posted by Xinyi Deng at August 30. 2023

Hi, while replicating the published analysis associated with vim-4 data, I am having difficulty figuring out how to use the 'mappers' function to spatially constrain the voxel activity. For example, subject S2 file contains response data from 48819 voxels,

human (900, 48819)
passive (900, 48819)
vehicle (900, 48819)

and in its corresponding mappers file, left and right maps seem to be of different lengths.

pixmap_data (1216380,)
pixmap_indices (1216380,)
pixmap_indptr (1216516,)
pixmap_shape (2,)
pixmask (2060, 1024)
vox_to_fsavg_left_data (168501,)
vox_to_fsavg_left_indices (168501,)
vox_to_fsavg_left_indptr (163843,)
vox_to_fsavg_left_shape (2,)
vox_to_fsavg_right_data (166959,)
vox_to_fsavg_right_indices (166959,)
vox_to_fsavg_right_indptr (163843,)
vox_to_fsavg_right_shape (2,)

Could some one help me with understanding how to properly use the 'mappers' function? Do I need to download a version of fsaverage?

I don't actually need the exact cortical coordinate mapping for each individual voxel, rather the general brain region each voxel belongs to (similar to Figure 2 in Zhang et al. 2021. Voxel-based state space modeling recovers task-related cognitive states in naturalistic fMRI experiments. Frontiers in Neuroscience).

Thank you.

 

Re: vim-4 voxel mappers

Posted by Tianjiao Zhang at September 01. 2023

Hi Xinyi - the mappers (pixmap/flatmap, voxel to fsaverage left, voxel to fsaverage right) are of different lengths because they are stored as sparse arrays. To load them, you can use scipy's csr_matrix class using this set of arguments: csr_array((data, indices, indptr), [shape=(M, N)]).

Re: vim-4 voxel mappers

Posted by Xinyi Deng at September 02. 2023
Hi Tianjiao, thank you! Your answer was very helpful and I was able to combine the four variables ('_data', '_shape', '_indices', '_indptr') into one matrix of the same dimension for left and right respectively:
vox_to_fsavg_left (163842, 81733)
vox_to_fsavg_right (163842, 81733)
I am guessing 163842 is the number of nodes for the high-resolution fsaverage mesh. My follow-up question is then how are the above two matrices correspond with the BOLD/deconv-ed activity matrix:
human (900, 48819)
passive (900, 48819)
vehicle (900, 48819)
which has only length 48819 of voxel dimension?
 
I read in your paper that "Mapping of functional signals to the cortical surface and visualization of results on the cortical surfaces was performed using the pyCortex toolbox (Gao et al., 2015)." Could you be so kind and provide a demo code as to how it is done?

Re: vim-4 voxel mappers

Posted by Tianjiao Zhang at October 03. 2023

Hi Xinyi - sorry it took me a while to get back to you. The mappers that we had on there were computed for a different mask that included much more than just the cortical voxels. I've sent in updated mappers computed with a mask that matched the data, and they should have the same voxel count as the data if you re-download them.

Re: vim-4 voxel mappers

Posted by Xinyi Deng at October 21. 2023

Hi Tianjiao, thank you for taking the trouble to upload the new mappers. All my questions have been addressed. Thanks again!

Powered by Ploneboard
Document Actions