-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72b994a
commit 1716d65
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Visualise the output from brainmapper. Cells transformed to atlas space can | ||
be found at brainmapper_output/points/points.npy. | ||
For more details on brainmapper, please see: | ||
https://brainglobe.info/documentation/brainglobe-workflows/brainmapper/index.html | ||
""" | ||
|
||
from pathlib import Path | ||
|
||
from myterial import orange | ||
from rich import print | ||
|
||
from brainrender.scene import Scene | ||
from brainrender.actors import Points | ||
from brainrender import settings | ||
|
||
settings.SHADER_STYLE = "plastic" | ||
|
||
cells_path = Path(__file__).parent.parent / "resources" / "points.npy" | ||
|
||
print(f"[{orange}]Running example: {Path(__file__).name}") | ||
|
||
# Create a brainrender scene | ||
scene = Scene(title="brainmapper cells") | ||
|
||
# Create points actor | ||
cells = Points(cells_path, radius=45, colors="palegoldenrod", alpha=0.8) | ||
|
||
# Visualise injection site | ||
scene.add_brain_region("VISp", color="mediumseagreen", alpha=0.6) | ||
|
||
# Add cells | ||
scene.add(cells) | ||
|
||
scene.render() |
Binary file not shown.