Surface-based ROI analysis

79 views
Skip to first unread message

Alireza Karami

unread,
Nov 18, 2021, 7:12:05 PM11/18/21
to CoSMoMVPA
Dear all

I want to do surface-based multiple regression analysis using cosmo_target_dsm_corr measure. I have some ROIs from a topography study [1]. The ROIs are in 1d.dset format. Previously, I used to map the ROIs in each subject volume data in AFNI and then analyze the NII files. But I think I will get a better result if I map the t-map from 1st-level analysis on the surface and do the analysis in the surface space instead of voxel space. I think I need to:
1. Map the t-maps of each subject on the surface using the following code:

vol_ds = cosmo_fmri_dataset(data_fn,'targets',targets,'chunks',chunks);

% this measure averages the data near each node to get a surface dataset

radius=0;

surf_band_range=[-2 2]; % get voxel data within 2mm from surface

surf_def={vertices,faces,[-2 2]};

nbrhood=cosmo_surficial_neighborhood(vol_ds,surf_def,'radius',radius);

measure=@(x,opt) cosmo_structjoin('samples',mean(x.samples,2),'sa',x.sa);

surf_ds=cosmo_searchlight(vol_ds,nbrhood,measure);

2. Mask the data using the atlas
3. Convert the surface to a dataset using cosmo_surface_dataset
4. Do the analysis on the converted dataset.

Are these steps correct? If they are, how is it possible to read surface data using cosmo_surface_dataset and mask it?


 [1] Probabilistic Maps of Visual Topography in Human Cortex; Liang Wang, Ryan E B Mruczek, Michael J Arcaro, Sabine Kastner


Best Regards,

Alireza

Nick Oosterhof

unread,
Nov 21, 2021, 12:59:46 PM11/21/21
to Alireza Karami, CoSMoMVPA
Greetings,

On Fri, 19 Nov 2021 at 01:12, Alireza Karami <alire...@gmail.com> wrote:
I want to do surface-based multiple regression analysis using cosmo_target_dsm_corr measure. I have some ROIs from a topography study [1]. The ROIs are in 1d.dset format. Previously, I used to map the ROIs in each subject volume data in AFNI and then analyze the NII files. But I think I will get a better result if I map the t-map from 1st-level analysis on the surface and do the analysis in the surface space instead of voxel space. I think I need to:
1. Map the t-maps of each subject on the surface using the following code:

vol_ds = cosmo_fmri_dataset(data_fn,'targets',targets,'chunks',chunks);

% this measure averages the data near each node to get a surface dataset

radius=0;

surf_band_range=[-2 2]; % get voxel data within 2mm from surface

surf_def={vertices,faces,[-2 2]};

nbrhood=cosmo_surficial_neighborhood(vol_ds,surf_def,'radius',radius);

measure=@(x,opt) cosmo_structjoin('samples',mean(x.samples,2),'sa',x.sa);

surf_ds=cosmo_searchlight(vol_ds,nbrhood,measure);

2. Mask the data using the atlas
3. Convert the surface to a dataset using cosmo_surface_dataset
4. Do the analysis on the converted dataset.

Are these steps correct?

They would work, but may not be optimal. That's because you are most likely loosing information when using the measure, as it averages data across voxels on each line segment that connects a white-matter node (on the white-matter to grey matter boundary) to a pial matter node (on the grey matter to white matter boundary) . This can be avoided by using cosmo_surficial_voxel_selection with:
- the input dataset (ds) being in voxel space. 
- center_ids the node ids from the ROI on the surface
- radius small (zero or near zero), assuming your surface is of sufficient high resolution (vertices shorter than voxel size); or a bit larger if the surface is lower resolution. 
where then you then collect all dataset feature indices from the output, remove duplicates (*), and then select those from the input dataset  in volume space for ROI analysis. This may seem a bit cumbersome, but that's because cosmo_surficial_voxel_selection is mostly intended for surface-based searhlight analysis rather than ROI analysis. 

After this step (*) I suggest you make a volumetric dataset setting only these features to a non-zero value, and inspect visually that you selected the expected voxels. This is a good reality check because these analyses with feature indices can become somewhat complicated. 
 

If they are, how is it possible to read surface data using cosmo_surface_dataset and mask it?

cosmo_surficial_dataset can read some surface formats. Masking can be done by selecting the node indices (or voxel indices, see above) of interest using cosmo_slice. 

best,
Nick

Alireza Karami

unread,
Nov 26, 2021, 3:35:16 PM11/26/21
to CoSMoMVPA
Thank you, Nick.

I was wondering whether I could implement smoothing instead of mean or not. I need to smooth my data after mapping on the surface. Currently, I am smoothing using SurfSmooth in AFNI.

If you have any suggestions to implement something like SurfSmooth in CoSMoMVPA, would you please let me know? I can implement it and share it with others in the group, too.


Best,

Alireza

Reply all
Reply to author
Forward
0 new messages