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 atlasAre 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
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?
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.