Investigating Discrepancies in Brainstorm's Dipole Distance and Cortical Thickness Measurements

Hello,

I need your assistance in resolving an issue I encountered while working with Brainstorm and FreeSurfer. Specifically, I have obtained the thickness of each dipole in Brainstorm. According to my code, the distance between the dipoles and the nearest white matter point should be equal to "thicknessPointPial," but I have noticed a discrepancy. The calculated distance is 0.0027, whereas the cortical thickness value obtained from Brainstorm is 1.77, both for the same vertex.

Here is the code where I calculate the distance for the first dipole:

%% Find nearest point of white matter to dipoles of ROI on pial surface

% Create a triangulation model for the high-resolution white matter surface
highResWhiteModel = triangulation(tess_cortex_white_high.Faces, tess_cortex_white_high.Vertices);

% Find dipoles of V1v on the left hemisphere
leftScoutVertices = scout_wangevc_70x2E900000e_00_7_lh.Scouts(2).Vertices(1,:);
v1vLeftHVertices = tess_lh_pial.Vertices(leftScoutVertices, :);

% For each row in the left hemisphere, find the corresponding indices in the pial surface
highResPialModel = triangulation(tess_cortex_pial_high.Faces, tess_cortex_pial_high.Vertices);
v1vLeftHPialVertices = nearestNeighbor(highResPialModel, v1vLeftHVertices(:, 1), v1vLeftHVertices(:, 2), v1vLeftHVertices(:, 3));

% Find the nearest point of each dipole of V1v to the white matter
nearestPointWhite = nearestNeighbor(highResWhiteModel, v1vLeftHVertices(:,1), v1vLeftHVertices(:,2), v1vLeftHVertices(:,3));

% Calculate the distance between the nearest white matter point and the dipole
distance = norm(tess_cortex_pial_high.Vertices(v1vLeftHPialVertices(1), :) - tess_cortex_white_high.Vertices(nearestPointWhite(1), :));
thicknessPointPial = Thickness.ImageGridAmp(v1vLeftHPialVertices(1), 1);

I would greatly appreciate your help in identifying the problem. Thank you!

At first glance the idea is sounding, although estimating the cortical thickness is a bit more complicated. Under that logic there will be points where the thickness will not be correct. An 2D example, consider a vertex (black dot) on the cortex surface (red), the thickness measure should be the green line, however the closest point in the white matter surface (yellow) is the purple line.

Check this paper (from FreeSurfer docs), on troubles on measuring cortical thickness and how to address them:

Fischl B, Dale AM.
Measuring the thickness of the human cerebral cortex from magnetic resonance images.
Proc Natl Acad Sci USA. 2000;97(20):11050-11055.


Also, I noticed this in your code:
% Find dipoles of V1v on the left hemisphere
leftScoutVertices = scout_wangevc_70x2E900000e_00_7_lh.Scouts(2).Vertices(1,:);
v1vLeftHVertices = tess_lh_pial.Vertices(leftScoutVertices, :);

Keep in mind that although two surfaces have the same number of vertices, those vertices are not necessarily in the same order. Thus the vertices from the V1 Scout in one surface (scout_wangevc_70x2E900000e_00_7_lh) are not the necessarily the same vertices for the V1 Scout V1 in the second surface (tess_lh_pial.Vertices).

The correct way to do this would be to project the Scout from Surface1 to Surface2, with the Project to... option in the Scout menu:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scouts#Menu:_Scout

Project can be done only from none-default Atlas. Thus if the project option is not available, copy the desired Scout to a new atlas, and project it from there.

1 Like

Thank you so much.

I attempted to project a scout onto another surface, but unfortunately, my efforts were unsuccessful. Here are the steps I took: I opened "lh.white" and "lh.pial" and proceeded to create a new atlas. Additionally, I included a scout from another atlas into this newly created one. However, despite these actions, I have not been able to execute the projection from "pial" to white matter yet. I would greatly appreciate your assistance in resolving this matter. Could you please provide further guidance?

Moreover, I believed that every vertex on the pial surface corresponds to a specific vertex number on the white matter surface in Freesurfer files. Could my understanding be incorrect?

Are you doing these steps in the GUI or with commands?
Can you share more details step by step? Tried here, and the GUI procedure is working fine

Agree, as far as I understand that is how it is done:

The pial surface is created by expanding the white matter surface so that it closely follows the gray-CSF intensity gradient as found in the brainmask.mgz volume.

However, I'm not sure if this one-to-one correspondence holds when the surfaces are downsized (to 15k vertices).

Thank you so much for your response.

Actually, I am doing it in the GUI.
I imported 'lh.white' and 'lh.pial' surfaces into the brainstorm by right-clicking on the subject. After opening them up, I selected my scout from one of the pial surfaces and created a new atlas on the white surface. Then, I exported a scout to MATLAB from the pial surface. Upon returning to the white surface, I imported that scout from MATLAB into the new atlas. However, despite choosing the scout from the new atlas, I encountered a problem when trying to project it onto another surface. If you are available, I could demonstrate it to you on AnyDesk. Please let me know if this is possible for you.

Additionally, I did not use the low-resolution cortex (15002). My current problem arises from the fact that my atlases are designed for both the left and right hemispheres, and I need these vertices to correspond to the entire brain, encompassing the whole cortex. In the past, I attempted to find the nearest point for each vertex on each hemisphere to the cortex, but I now realize that this approach is incorrect as well.

There is not need to export / import Scouts to do the projection. The functionality is in the GUI.

Could you provide screenshots of the steps taken?

Projecting scouts:

  1. Once you have import the the surfaces, double click on one.

  2. Create an Atlas with the desired Scout
    image

  3. Then select the Scout, and use the menu Scout > Project to ... and select the target surface
    image
    image

It is possible to import Atlases to Brainstorm.
With the Surface opened, use the menu Atlas > Load atlas... just select the adequate format

Of course! I did exactly what you did, but unfortunately, I don't have anything related to the project to ... here.

I imported atlases from my Freesurfer folders, but there are two parts: one for the left hemisphere (lh) and one for the right hemisphere (rh). Now, I want to locate their corresponding regions across the entire cortex actually.

Thanks for screenshot! It helped to identify the trouble.

Projection is only available between surfaces of type Cortex (iconCortexCut). Thus it is needed to change the type:
Close all figures, right-click on the imported surfaces > Set surface type > Cortex

Select both cortex surfaces (lh.pial and rh.pial), right-click > Merge surfaces.
This should do the trick

All done!
My apologies for not sending the screenshot earlier.
Thank you so much. I appreciate it.