To generate 3D figures of your data in atlas space, you can use brainrender. cellfinder automatically exports a file in a brainrender compatible format, which can be found at test_brain/output/points/points.npy
.
Once you've installed brainrender, you can try something like this:
from brainrender.scene import Scenefrom brainrender.actors import Points​cells_path = "test_brain/output/points/points.npy"​# intialise brainrender scenescene = Scene()​# create points actorcells = Points(cells_path, radius=45, colors="palegoldenrod", alpha=0.8)​# visualise injection site (retrosplenial cortex)scene.add_brain_regions(["RSPd"], colors="mediumseagreen", alpha=0.6)scene.add_brain_regions(["RSPv"], colors="purple", alpha=0.6)scene.add_brain_regions(["RSPagl"], colors="mediumseagreen", alpha=0.6)​# Add cellsscene.add(cells)​scene.render()
Alternatively, you can use the brainrender GUI, and use the Add cells
button to load the points.npy
file. You can use Show structures tree
to visualise brain areas.
As the points.h5
file contains the detected cells in atlas space, you can load cells from multiple brains (e.g. in a different colour).