brain_surface_3d

Contents

brain_surface_3d#

class braintools.visualize.brain_surface_3d(vertices, faces, values=None, cmap='viridis', alpha=0.8, ax=None, figsize=(12, 10), title=None, **kwargs)#

Visualize brain surface mesh in 3D.

Parameters:
  • vertices (ndarray) – Vertex coordinates of shape (n_vertices, 3).

  • faces (ndarray) – Face indices of shape (n_faces, 3).

  • values (ndarray | None) – Values to color the surface.

  • cmap (str) – Colormap for surface coloring.

  • alpha (float) – Surface transparency.

  • ax (Axes3D | None) – 3D axes to plot on.

  • figsize (Tuple[float, float]) – Figure size if creating new figure.

  • title (str | None) – Plot title.

  • **kwargs – Additional arguments passed to Poly3DCollection.

Returns:

ax – The 3D axes object.

Return type:

Axes3D