visbrain.utils.convert_meshdata

visbrain.utils.convert_meshdata(vertices=None, faces=None, normals=None, meshdata=None, invert_normals=False, transform=None)[source][source]

Convert mesh data to be compatible with visbrain.

Parameters:
vertices : array_like | None

Vertices of the template of shape (N, 3) or (N, 3, 3) if indexed by faces.

faces : array_like | None

Faces of the template of shape (M, 3)

normals : array_like | None

The normals to each vertex, with the same shape as vertices.

meshdata : VisPy.MeshData | None

VisPy MeshData object.

invert_normals : bool | False

If the brain appear to be black, use this parameter to invert normals.

transform : visPy.transform | None

VisPy transformation to apply to vertices ans normals.

Returns:
vertices : array_like

Vertices of shape (N, 3)

faces : array_like

Faces of the template of shape (M, 3)

normals : array_like

The normals of shape (M, 3, 3).