volume_rendering#
- class braintools.visualize.volume_rendering(volume, threshold=None, alpha=0.3, cmap='viridis', ax=None, figsize=(12, 10), title=None, **kwargs)#
Simple volume rendering using isosurfaces.
- Parameters:
volume (
ndarray) – 3D volume data.threshold (
float|None) – Voxels with values above the threshold are drawn. If None, uses the midpoint of the data range,min + (max - min) / 2(half of the maximum for data with minimum 0).alpha (
float) – Surface transparency.cmap (
str) – Colormap for surface.ax (
Axes3D|None) – 3D axes to plot on.figsize (
Tuple[float,float]) – Figure size if creating new figure.**kwargs – Additional arguments passed to voxels.
- Returns:
ax – The 3D axes object.
- Return type:
Axes3D