vispy.visuals.isosurface module

class vispy.visuals.isosurface.IsosurfaceVisual(data=None, level=None, vertex_colors=None, face_colors=None, color=(0.5, 0.5, 1, 1), **kwargs)

Bases: vispy.visuals.mesh.MeshVisual

Displays an isosurface of a 3D scalar array.

Parameters
datandarray | None

3D scalar array.

level: float | None

The level at which the isosurface is constructed from data.

vertex_colorsndarray | None

The vertex colors to use.

face_colorsndarray | None

The face colors to use.

colorndarray | None

The color to use.

**kwargsdict

Keyword arguments to pass to the mesh construction.

property level

The threshold at which the isosurface is constructed from the 3D data.

set_data(data=None, vertex_colors=None, face_colors=None, color=None)

Set the scalar array data

Parameters
datandarray

A 3D array of scalar values. The isosurface is constructed to show all locations in the scalar field equal to self.level.

vertex_colorsarray-like | None

Colors to use for each vertex.

face_colorsarray-like | None

Colors to use for each face.

colorinstance of Color

The color to use.