cedalion.vis.anatomy.brain_and_scalp
Functions
|
Plots a 3D visualization of brain and scalp meshes. |
|
Using pyvista render a brain, colored by a metric, and display it in MPL axes. |
- cedalion.vis.anatomy.brain_and_scalp.plot_brain_and_scalp(
- brain_mesh,
- scalp_mesh,
- geo3d,
- timeseries,
- poly_lines=[],
- brain_scalars=None,
- plotter=None,
Plots a 3D visualization of brain and scalp meshes.
- Parameters:
brain_mesh (TrimeshSurface) – The brain mesh as a TrimeshSurface object.
scalp_mesh (TrimeshSurface) – The scalp mesh as a TrimeshSurface object.
geo3d (xarray.Dataset) – Dataset containing 3-dimentional point centers.
timeseries – Time series data array.
poly_lines – List of lists of points to be plotted as polylines.
brain_scalars – Scalars to be used for coloring the brain mesh.
plotter (pv.Plotter, optional) – An existing PyVista plotter instance to use for plotting. If None, a new PyVista plotter instance is created. Default: None.
- Initial Contributors:
Eike Middell | middell@tu-berlin.de | 2024
- cedalion.vis.anatomy.brain_and_scalp.plot_brain_in_axes(
- ts: Annotated[DataArray, DataArraySchema(dims='time', coords='time', 'time', 'samples')],
- geo3d: Annotated[DataArray, DataArraySchema(dims='label', coords='label', 'label', 'type')],
- metric: DataArray | _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes],
- brain_surface: TrimeshSurface,
- ax: Axes,
- title: str | None = None,
- vmin: float | None = None,
- vmax: float | None = None,
- cmap: str | Colormap = 'RdBu_r',
- bad_color: tuple[float, float, float] | str | tuple[float, float, float, float] | tuple[tuple[float, float, float] | str, float] | tuple[tuple[float, float, float, float], float] = [0.7, 0.7, 0.7],
- cb_label: str = '',
- camera_pos: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None,
Using pyvista render a brain, colored by a metric, and display it in MPL axes.