help > RE: voxel-to-voxel First-Level Analysis Error
Dec 1, 2015  09:12 PM | Alfonso Nieto-Castanon - Boston University
RE: voxel-to-voxel First-Level Analysis Error
Hi Thinh,

Regarding question (1), you can use something like the following syntax to perform nearest-neighbor interpolation between both spaces:

 [~,fsaverage2ref,ref2fsaverage] = conn_surf_sphere(8,conn_freesurfer_read_surf('mysubject/surf/lh.sphere.reg'));
 V_left_ref = V_left_fsaverage(fsaverage2ref);

This will convert the vector V_fsaverage (a vector with 163842 values containing one value per node/vertex in the default left-hemisphere fsaverage surface) to a vector V_ref (containing one value per node/vertex in this subject's left-hemisphere cortical surface). You may then repeat the same step for right-hemisphere surfaces (now pointing to the rh.sphere.reg file and using the corresponding right-hemisphere fsaverage vector V_ref) to get the other half of the data as well, e.g.:

 [~,fsaverage2ref,ref2fsaverage] = conn_surf_sphere(8,conn_freesurfer_read_surf('mysubject/surf/rh.sphere.reg'));
 V_right_ref = V_right_fsaverage(fsaverage2ref);

Regarding question (2), yes, sorry I did not clarify that, both the .mat and .matc are just two parts of the same file-format (similar to .img and .hdr files), simply point to the corresponding .mat files in your conn_matc2nii syntax.

And regarding question (3), yes, if you use for example something like:

 a = spm_vol('niftivvPC_Subject001_Condition001.nii');
 B = spm_read_vols(a);
 B = reshape(B, [], numel(a));

that will result in a matrix B with size [number-of-vertices by number-of-components]. The order of the vertices is still the same as in the fsaverage tessellation (only with the two hemispheres concatenated in this case), so, for example, you could set

 V_left_fsaverage = B(1:end/2,k);

to get the values of the left-hemisphere fsaverage-space k-th eigenvector/component to be used in the example code in (1) above, or you could use something like:

 R_left_fsaverage = B(1:end/2,:)*B(vertex_index,:)'

to get the connectivity values on the left-hemisphere fsaverage-space surface (connectivity between the "vertex_index" seed vertex and the rest of the brain)

Hope this helps
Alfonso

Originally posted by Thinh Nguyen:
Hello Alfonso,

Thank you for such helpful reply, you answered exactly what I needed to know. I have some follow up quick questions:

1) Is there away to associate vertex indexing in fsaverage surface with subject-specific surface. I see that subject-specfic surface and fsaverage surface do not have the same vertices/faces number, so their respective indexing should not associated to each other in anyway. I understand that subject-specific surface had been morphed into fsaverage space using ?h.sphere.reg (via curvature measures) but I could not figure out how each vertex values in fsaverage space map back to subject-specific space (again they have different number of vertices, also different in xyz locations).

2) I can only do conn_matc2nii on the vvPC_Subject*_Condition*.mat  and NOT on the vvPC_Subject*_Condition*.matc (see Error)Error using load
     Number of columns on line 2 of ASCII file
     vvPC_Subject001_Condition003.matc
     must be the same as previous lines.

     Error in conn_vol (line 3)
     load(filename,'V');
     Error in conn_matc2nii (line 24)
     Y=conn_vol(filename{nfile});
Are they (.mat and .matc) equivalent? (my Matlab is R2013a)

3) As in reshaping the N volumes into matrix B, would concatenate the whole volume into 1 vector (say B = vol(:) ) be appropriate to have correct ordered index?

Thank you for your time and assistance, as always.
Best,
Thinh Nguyen

Threaded View

TitleAuthorDate
Thinh Nguyen Nov 25, 2015
Alfonso Nieto-Castanon Nov 26, 2015
Thinh Nguyen Nov 30, 2015
Alfonso Nieto-Castanon Nov 30, 2015
Thinh Nguyen Dec 1, 2015
RE: voxel-to-voxel First-Level Analysis Error
Alfonso Nieto-Castanon Dec 1, 2015