Get coordinates from volume-based ROIs to calculate distance between ROIs

Hi there,

I have a volume-based atlas in brainstorm with various ROIs of different sizes. I want to calculate the distance between the centroids of these ROIs. When I select my desired ROIs in brainstorm and export them to MATLAB, I get a structure with fields including 'vertices' and 'seed'.

However, the values in the 'vertices' field do not seem to be meaningful for computing distance between ROIs. What do these values represent? Is there a way to access the actual x,y,z coordinates of each vertex of these ROIs?

Thanks!

The values of Vertices and Seed are the indices of the vertices that are part of the given Scout.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scouts#On_the_hard_drive

The coordinates for each of the vertices are stored in (volume) head model, in the GridLoc field.
Coordinates are given in the subject coordinate system in meters.

https://neuroimage.usc.edu/brainstorm/Tutorials/HeadModel#On_the_hard_drive