Symmetric vertex correspondence

Dear experts,

I would like to compare scalars projected onto surfaces between hemispheres within subjects (i.e., asymmetries). Surfaces were derived using freesurfer. I have used wb_command -surface-resample to have my surfaces as fsLR-32k, which are symmetric, but not very precisely. I am searching for a 1:1 vertex index correspondence (as much as anatomically possible), mainly respecting gyral crowns and sulcus between hemispheres (something my fsLR-32k approach is not good enough for). In a second step , I’d like to have between-subjects vertex correspondance to the fsLR-32k average surface.

I was thinking that fsl’s msm should do the trick, as it can take curvature values into account. However, I cannot get it to work.

I first converted my subject’s spherical surfaces and curvature files to gifti:

mris_convert lh.sphere sub_lh_sphere.coord.gii
mris_convert rh.sphere sub_rh_sphere.coord.gii

mris_convert -c lh.curv lh.sphere sub_lh_curv.func.gii
mris_convert -c rh.curv rh.sphere sub_rh_curv.func.gii

From msm’s tutorial I assumed I was ready to go, here is my command:

msm  --inmesh=sub_lh_sphere.coord.gii \
     --refmesh=sub_rh_sphere.coord.gii \
     --indata=sub_lh_curv.func.gii \
     --refdata=sub_rh_curv.func.gii \
     -o test

But msm throws an error: Floating point exception (core dumped). I added the -v flag and could see that msm is doing its thing, but the exception can occur at different times during execution (at different levels/iterations).

I am able to visualize the curvature on the gifti files in freeview, so I am assuming they are not corrupted. I also tried with newMSM and got similar errors.

In the end, I have two questions:

  1. Am I on the right track to having this more precise left-right hemisphere matching of vertex indices? Alternatives to msm are welcome.
  2. What could be causing the exception in msm?

Thank you in advance.

Luis


FYI:

fsl_6.0.7.1/bin/msm
freesurfer_7.4.1/bin/mris_convert
Ubuntu 22.04

I will partially answer my own question to avoid someone else’s headache. It seems like mris_convert -c automatically prepends lh or rh to the output .gil file. Thus, my inputs to msm were incorrectly named. Why it failed during execution and not due to missing files was due to pre-existing malformed gii files with the correct file name. Duh. I still have many problems, but msm execution is not one of them.

I’m still figuring out the correct path to having good left/right symmetry and vertex correspondence to the fsLR template. Tips and advice are always welcome.

L