visbrain.utils.volume_to_mesh(vol, smooth_factor=3, level=None, **kwargs)[source][source]

Convert a volume into a mesh with vertices, faces and normals.

vol : array_like

The volume of shape (N, M, P)

smooth_factor : int | 3

The smoothing factor to apply to the volume.

level : int | None

Level to extract.

kwargs : dict | {}

Optional arguments to pass to convert_meshdata.

vertices : array_like

Mesh vertices.

faces : array_like

Mesh faces.

normals : array_like

Mesh normals.