pjkohler Wrote:
-------------------------------------------------------
> I need to compute the pairwise distance between
> every combination of nodes on a Freesurfer
> surface. I would like to be able to get both the
> Euclidean distance and the distance along the
> mesh. I can get the Euclidean distance by loading
> the surface into Matlab and using the coordinates,
> but how can I get the distance along the mesh? I
> wrote a little wrapper for SurfDist that can
> probably do it, but that seems a bit slow for a
> problem of this scale.
>
> Any suggestions? I would be happy to use an
> external Matlab toolbox, if that is the easiest.
The fast marching toolbox by Gabriel Peyre can do this, see [
github.com]
In particular the perform_fast_marching_mesh function can be used for geodesic distances along the surface.
You may also be interested in the surfing toolbox (https://github.com/nno/surfing - I am the main author). It contains the fast marching toolbox code and also some helper functions to read and write surfaces (surfing_read and surfing_write).