visbrain.utils.volume_to_mesh

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.

Parameters
volarray_like

The volume of shape (N, M, P)

smooth_factorint | 3

The smoothing factor to apply to the volume.

levelint | None

Level to extract.

kwargsdict | {}

Optional arguments to pass to convert_meshdata.

Returns
verticesarray_like

Mesh vertices.

facesarray_like

Mesh faces.

normalsarray_like

Mesh normals.