brainrenderis first used to create an instance of
Actorclass. This class handles the 3D mesh data for the object to be rendered and provides a few useful methods for the behind-the-scenes work necessary to render your data.
Actorclass can be used to render any type of data that can be used to create a
vedo Meshobject, several specific
Actorclasses are provided for more conveniently loading commonly used data types.
brainrender.actors.Neuronis used to render neurons morphology (e.g. downloaded with
morphapior from a
brainrender.actors.Pointsis used to render anything that can be represented as a set of points (e.g. labelled cells from
Pointscan load data directly from a
.npyfile or a numpy array of coordinates can be passed to it.
brainrender.actors.Streamlinesis used to render streamlines tractography data. It expects the data as a
pandas DataFrameand can load data from a
brainrender.actors.Volumerenders volumetric data (e.g. gene expression) from a numpy array or from a
Rulercan be used to render other types of data.
actorinstance can be created by passing the data to be rendered to the dedicated
Actorclass. For instance, to render the position of labelled cells, a Nx3 numpy array with the cells coordinates has to be passed to the
Pointsclass to create an actor representing the cells' locations. Some actors can also load data directly from file.
Scene.addmethod and pass to it the actors you would like to see added to your rendering.