The current version doesn't consider the actual path distance between points and therefore depends on FreeSurfer's sphere surface. An algorithm that works on any given surface mesh would require the computation of the path length between any two given vertices.
But computing the path distance between any two given vertices might be computationally too demanding. So it's not really clear if this optimization would really be useful.
The current version doesn't consider the actual path distance between points and therefore depends on FreeSurfer's sphere surface. An algorithm that works on any given surface mesh would require the computation of the path length between any two given vertices.
This could be done with the Dijkstra algorithm and is implemented by surfdist, using the gdist library or by PyMVPA.
But computing the path distance between any two given vertices might be computationally too demanding. So it's not really clear if this optimization would really be useful.