Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions brainrender/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ def __init__(
# Initialise render class
Render.__init__(self, plotter)

root_name = self.atlas.structures[self.atlas.hierarchy.root]["acronym"]

# Get root mesh
self.root = self.add_brain_region(
"root",
root_name,
alpha=settings.ROOT_ALPHA,
color=settings.ROOT_COLOR,
silhouette=bool(root and settings.SHADER_STYLE == "cartoon"),
Expand Down Expand Up @@ -283,7 +285,7 @@ def get_actors(

def add_brain_region(
self,
*regions: str,
*regions: str | int,
alpha: float = 1,
color: str | None = None,
silhouette: bool | None = None,
Expand All @@ -296,7 +298,7 @@ def add_brain_region(
Parameters
----------
*regions
Region names.
Region names or IDs.
alpha
How opaque the regions are rendered.
color
Expand Down
Loading