cortex.polyutils.Surface.geodesic_path

Surface.geodesic_path(a, b, max_len=1000, d=None, **kwargs)[source]

Finds the shortest path between two points a and b.

This shortest path is based on geodesic distances across the surface. The path starts at point a and selects the neighbor of a in the graph that is closest to b. This is done iteratively with the last vertex in the path until the last point in the path is b.

Other Parameters in kwargs are passed to the geodesic_distance function to alter how geodesic distances are actually measured

Parameters:
aint

Vertex that is the start of the path

bint

Vertex that is the end of the path

darray

array of geodesic distances, will be computed if not provided

Returns:
pathlist

List of the vertices in the path from a to b

Other Parameters:
max_lenint, optional, default=1000

Maximum path length before the function quits. Sometimes it can get stuck in loops, causing infinite paths.

mfloat, optional

Reverse Euler step length. The optimal value is likely between 0.5 and 1.5. Default is 1.0, which should be fine for most cases.

fembool, optional

Whether to use Finite Element Method lumped mass matrix. Wasn’t used in Crane 2012 paper. Doesn’t seem to help any.