conpy.select_shared_vertices

conpy.select_shared_vertices(insts, ref_src=None, subjects_dir=None)

Select the vertices that are present in each of the given objects.

Produces a list of vertices which are present in each of the given objects. Objects can either be instances of SourceSpaces or Forward.

If the given source spaces are from different subjects, each vertex number will not necessarily refer to the same vertex in each source space. In this case, supply the source space that will be use as a reference point as the ref_src parameter. All source spaces will be morphed to the reference source space to determine corresponding vertices between subjects.

Parameters
instslist of instance of (SourceSpaces | Forward)

The objects to select the vertices from. Each object can have a different number of vertices defined.

ref_srcinstance of SourceSpaces | None

The source space to use as reference point to determine corresponding vertices between subjects. If None (the default), vertex numbers are assumed to correspond to the same vertex in all source spaces.

subjects_dirstr | None

Path to SUBJECTS_DIR if it is not set in the environment. Only needed if ref_src is specified.

Returns
verticestwo lists | list of tuple of lists

Two lists with the selected vertex numbers in each hemisphere. If ref_subject is specified, for each object, two lists with the selected vertex numbers in each hemisphere.