Importing Brainspace surface

Hello,

I am contacting you as I am currently trying to import the surface from Brainspace in Brainstorm:
https://brainspace.readthedocs.io/en/latest/pages/getting_started.html

The surface seems to be computed from FSaverage and they are well aligned when opened in Freeview but I cannot seem to have them imported in Brainstorm. After the importation, it tells me that the surface can't be aligned.

image

I tried to add the following line in import_anat_fs: but doesn't work

[iLh, BstTessLhFile1, nVertOrigL1] = import_surfaces(iSubject, '/home/edelaire/Desktop/surfaces/conte69_32k_lh.gii', 'FS', 0);
[TessMat, err] = tess_addsphere(BstTessLhFile1, '/home/edelaire/Desktop/surfaces/conte69_32k_lh_sphere.gii', 'FS', 0);

Bad magic number (3948408) in surface file /home/edelaire/Desktop/surfaces/fsa5.pial.lh.gii

Do you have any idea on how to have those surfaces imported for the FsAverage template?

If I try to manually align them we can see the issue:

Thanks a lot,
Edouard

@tmedani have you worked with Brainspace?
@edelaire, could you share a L/R pair of the problematic surfaces?

Hi all,
No @Raymundo.Cassani never used these files before.

@edelaire can you share an example?

Are you importing also the MRI with this surface?

Hello,

The surface can be found here: https://github.com/MICA-MNI/BrainSpace/tree/master/brainspace/datasets/surfaces

From what I understood, this is based on FsAverage so I used the template from Brainstorm; use template > FsAverage > FsAverage2020

in the end, what I want is to be able to project some data I have on the MNI template to those surfaces using FreeSurfer sphere, and then export it to compare with other data that were computed on those surfaces.

So maybe I don't really need the alignment with MRI but make sure the surface and sphere are loaded properly in Brainstorm?

That's right

You should be able to import them using the format: GIfTI / World coordinates
(Then merge L and R in Brainstorm)

Red: Brainstorm-FsAverage Subject > cortex_15002V
Green: fsa5.pial.lh.gii in shared repo (it has 10242 vertices)
image

1 Like

it works !!!! Thanks a lot !!!

1 Like

i have an additional question.

So i loaded each surface separately and imported the sphere in each surface. Then merged them.

I now want to project some data that are on the cortex of the MNI template to those surface.
The surface also have their sphere loaded:

However, when I do the projection, it tells me that the algorithm isn't using the sphere and that it is using an outdated method

image

Note: the two surface have the same number of vertices

Can you double-check that both surface files (origin and destination) have the field Reg.Sphere.Vertices which should be the size of the surface.

BTW, where did you get the spheres for the surfaces from the repo above?

Hello,

Yes i have the sphere in both of them:

FSL_avg

MNI

For the sphere, I imported them as cat12 sphere from:
BrainSpace/brainspace/datasets/surfaces/conte69_32k_lh_sphere.gii at master · MICA-MNI/BrainSpace · GitHub

and

BrainSpace/brainspace/datasets/surfaces/conte69_32k_rh_sphere.gii at master · MICA-MNI/BrainSpace · GitHub

The issue is with Structures atlas in the New Surface.
Open the New Surface, and in the Structures atlas, rename the Scouts:

  • From conte69_32k_lh L to Cortex L
  • From conte69_32k_lh R to Cortex R

Then it will work.

If you have run the outdated and inaccurate method. Do not forget to set to empty the previous tess2tess_interp matrix from the origin surface.

1 Like

it works !!! Thanks a lot :slight_smile: