brainrender
's code and the introduction of a few new features. If you have been using version 1 of brainrender
, we strongly recommend upgrading to the new one with:brainrender
code work.Actor
class is introduced, everything rendered in brainrender
is first converted into an instance of Actor
. Different types of Actor
class have been created to render different types of data:brainrender.actors.Neuron
is used to render neurons morphology (e.g. downloaded with morphapi
)brainrender.actors.Points
is used to render anything that can be represented as a set of points (e.g. labelled cells from cellfinder
brainrender.actors.Streamlines
is used to render streamlines tractography databrainrender.actors.Volume
renders volumetric data (e.g. gene expression)Cylinder
, Point
and Ruler
can be used to render other types of data.brainrender
has changed a little bit. While before you would use methods like Scene.add_cells
to render labelled cells, now you have to create a Points
actor and add that to the scene with Scene.add
. The same goes for all other types of visualizations supported by dedicated Actor
classes. More details can be found in the examples at the Github repository.Actor
class, you can create a vedo
Mesh
object from your data, as you would've done in v1, and use that to create a generic Actor
object.Scene
's method for adding actors to your rendering have been removed. A generic Scene.add
can be used to add any Actor
or Mesh
object to the scene, while Scene.add_brain_regions
can be used specifically to add brain region meshes. Also methods to add a silhouette or a label to individual actors are supported. Scene
got a few new methods as well: remove
can be used to remove an Actor
from the rendering, get_actors
can be used to get a handle on the actors in the scene. The slice
method also replaced cut_actors_with_plane
.VideoMaker
class changed slightly. Your interaction with it will be largely unchanged, however its inner workings are now different: it uses ffmpeg
instead of opencv
to create and compress videos. This means that you don't need opencv
anymore (yayffmpeg
is installed and working correctly.Animation
class has been introduced which facilitates the creation of videos with more advanced animations, more about it in the docs and examples.brainrender
's functionality persists unchanged. Some method names might have changed however, but you should find all the info you need in the examples at the Github repository. Two more things worth noticing are:brainrender.settings
have changed or have been removed.