Volume#
- class brainrender.actors.volume.Volume(griddata, voxel_size=1, cmap='bwr', min_quantile=None, min_value=None, name=None, br_class=None, as_surface=True, **volume_kwargs)[source]#
Bases:
ActorRender a 3D numpy array as a surface mesh or vedo Volume. By default the volume is represented as an isosurface.
Methods
make_actor(mesh, name, br_class)Construct an Actor from an existing mesh.
make_label(atlas)Create 3D label actors anchored to this actor's mesh.
Create a silhouette actor outlining this actor's mesh.
mirror(axis[, origin, atlas])Mirror the actor's mesh across the given axis.
Attributes
Return the mesh's centre of mass coordinates.
labelssilhouette- property center: ndarray[tuple[Any, ...], dtype[float64]]#
Return the mesh’s centre of mass coordinates.
- Returns:
Array of shape (3,) with (x, y, z) coordinates.
- Return type:
numpy.ndarray
- classmethod make_actor(mesh, name, br_class)#
Construct an Actor from an existing mesh.
- Parameters:
mesh (
Mesh) – Mesh to wrap.name (
str) – Actor name.br_class (
str) – Brainrender class type.
- Return type:
- make_label(atlas)#
Create 3D label actors anchored to this actor’s mesh.
- Parameters:
atlas (
BrainGlobeAtlas) – Atlas used for hemisphere queries and mirroring.- Returns:
Label actors (text and optional sphere markers).
- Return type:
list of Actor
- make_silhouette()#
Create a silhouette actor outlining this actor’s mesh.
- Returns:
Silhouette actor with brainrender class
"silhouette".- Return type:
- mirror(axis, origin=None, atlas=None)#
Mirror the actor’s mesh across the given axis.
Accepts Cartesian axes (
'x','y','z') or anatomical plane names ('sagittal','vertical','frontal'). If an anatomical name is used without an atlas,'asr'space is assumed. The mesh is updated in place.- Parameters:
axis (
str) – Axis or anatomical plane to mirror across.origin (
ndarray[tuple[Any,...],dtype[TypeVar(_ScalarT, bound=generic)]] |None) – Centre of the mirroring operation. Default None.atlas (
BrainGlobeAtlas|None) – Atlas used to resolve anatomical axis names. Default None.
- Return type:
None