Sphere model display and vertex coordinates

Hi,
I have a question about displaying the obtained source model and the vertex coordinates.I have a time-averaged MN:MEG model from the tutorial. We do not want to use the source model, but rather a model in which the cortical surface is projected onto a three-dimensional sphere.

  1. Is it interpreted that the cortical groove was widened and projected? In that case, I would like to list the coordinates of the vertices on the sphere. Also, is there a correspondence with the coordinates of the cortical surface?
  2. Can anatomical color coding be displayed on a sphere?

I've just started learning, so I end up asking basic questions.
I would appreciate it if you could let me know.

If the MRI was segmented with FreeSurfer or CAT12, the cortex is already registered to two spheres (one per hemisphere).

https://neuroimage.usc.edu/brainstorm/Tutorials/CoregisterSubjects?#Using_FreeSurfer_registered_spheres

To view these spheres, right-click on the Surface > MRI registration > Display registration sphere/square. The function view_surface_sphere() is called

image

In the Surface tab you can enable the button Sulci to have the sulci in dark. Moreover, in the Scout tab, it is possible to display cortical parcellations

image

Dear Raymundo,
Thank you.Sorry for the late reply.
By following the steps Surface > MRI registration > Display registration sphere/square, I was able to display the desired area on the spherical surface.
Thank you for your detailed explanation, it was very helpful.

I would like to ask in more detail, is there a way to get or list the coordinates of the surface of a sphere as variables in Matlab?

・Scout>Save selected scouts to file
・File>Export to Matlab
I output it this way and checked the Vertices.
Are these the coordinates of the cortical surface, not the spherical surface?

Ultimately what I want to use is
Cortical surface 3D image and coordinates,
A spherical representation and coordinates (coordinates corresponding to the cortical surface).

Is there a way to list the coordinates?
Sorry if I see it differently.

I apologize for the inconvenience, but
thank you.

If the surface has a registered sphere, the coordinates of the sphere are are found in the field Reg.Sphere.Vertices of the Surface. To have it in Matlab, export the Surface to Matlab. These spherical coordinates have a one-to-one correspondence with the cortical surface vertices.

These X,Y,Z coordinates are in FreeSurfer RAS space, you may want to convert it to SCS (Subject coordinate system), which is the coordinate system used in Brainstorm.
https://neuroimage.usc.edu/brainstorm/CoordinateSystems

These steps can be seen in the view_surface_sphere() function


The field Vertices in Scouts does not contain coordinates, it has the indices for the surface vertices in the Scout. To check its XYZ coordinates, you would need to check the Vertices field in the Surface where the Scout were defined. These coordinates are in SCS

Hello.
I would like to ask you about a certain area (such as the occipital lobe) on the surface of the cortex expressed as a sphere.
We are investigating whether it is possible to generate random numbers within the region using the Monte Carlo method and use this as a forward problem to estimate the region using an inverse problem.

For that purpose, I would like to output the vertex coordinates and sphere to Matlab.

At this moment, I output to Matlab and got the vertex number (Vertex) from the struct.

  1. Why is this number not the same as the vertices of Vertices obtained from the same cortax15002?
  2. How can I obtain the coordinates of the vertices of the cortex displayed on a spherical surface? (in Matlab)
  3. Is it possible to output the cortex displayed as a sphere to Matlab? Can I do this while keeping Scout?

I apologize if there are any similar questions or tutorials.

I moved this post to the previous thread as they are part of the same topic.

  1. Because the coordinates in the GUI, are for the sphere SCS coordinates, and the ones in the Surface file are for the cortical surface. See my answer above in how to convert them.

  2. From the field Reg.Sphere.Vertices of the Surface (details in answer above)

  3. Yes, it's possible with these steps:

    1. Create a copy of your original cortical surface
    2. Get the filename from the copy file path (right-click > File > Copy file path ...)
    3. Get the spherical coordinates, convert them to SCS, replace cortical coords and save surface
      This is based in code from view_surface_sphere
      SurfaceFile = 'FILEPATH_OF_SURFACECOPY';
      % Load surface 
      TessMat = in_tess_bst(SurfaceFile);
      %  from view_surface_sphere()
      sphVertices = double(TessMat.Reg.Sphere.Vertices);
      % Offset Left and Right spheres (if 0, spheres overlap)
      lrOffset = 0.12;
      % Get subject MRI file
      [sSubject, iSubject] = bst_get('SurfaceFile', SurfaceFile);
      sMri = in_mri_bst(sSubject.Anatomy(1).FileName);
      % Convert: FreeSurfer RAS coord => Voxel
      mriSize = size(sMri.Cube(:,:,:,1)) / 2;
      sphVertices = bst_bsxfun(@plus, sphVertices .* 1000, mriSize);
      % Convert: Voxel => SCS
      sphVertices = cs_convert(sMri, 'voxel', 'scs', sphVertices);
      % Detect hemispheres and apply offset
      [ir, il, isConnected] = tess_hemisplit(TessMat);
      sphVertices(il,2) = sphVertices(il,2) + lrOffset;
      sphVertices(ir,2) = sphVertices(ir,2) - lrOffset;
      % Create and save spherical surface
      TessMat.Vertices = sphVertices;
      TessMat.Comment = [TessMat.Comment, '_sphere'];
      bst_save(SurfaceFile, TessMat);
      % Reload database
      db_reload_subjects(iSubject);
      

You can use the simulation processes in Brainstorm, e.g., process Simulate > Simulate recordings from scouts

https://neuroimage.usc.edu/brainstorm/Tutorials/Simulations#Simulate_MEG.2FEEG_from_synthetic_dipoles

Thank you for your detailed explanation.

sphVertices: The coordinates of Reg.Sphere.Vertices successfully converted to SCS were obtained.

I'm even more sorry.
・Cortical surface coordinates and spherical coordinates are unified to SCS.
・Supports 1:1.
got it.

Is the index of the surface vertex of Scout and the left number (cell? row? number) of Vertices et al. the same?

Thank you for the information about the Monte Carlo method.

Yes, the indices in the Scout, apply for the Surface, and for the Sphere surface.
This is because there each vertex in the cortex surface is projected to vertex in the sphere

Thank you for letting me know, it was very helpful.

Sorry for being so basic.
Group analysis: When using FreeSurfer registered spheres in Subject coregistration. What is the radius of this sphere itself and the maximum (range) of the x, y, and z axes in cm?

That's a good question! The coordinates of the Fs registration spheres are given in meters, and in the RAS coordinate system. The sphere radius of 0.1 m

When doing Subject corregistration, these spheres (in RAS and meters) are the ones used: brainstorm3/toolbox/anatomy/tess_interp_tess2tess.m at da97ac6d271b73afef0139aceb6e060c8e8d1c81 · brainstorm-tools/brainstorm3 · GitHub