EtienneCmb / visbrain

A multi-purpose GPU-accelerated open-source suite for brain data visualization
http://visbrain.org
Other
242 stars 65 forks source link

Is it possible to merge multiple BrainObj? #60

Closed iPsych closed 4 years ago

iPsych commented 4 years ago

Is it possible to merge multiple BrainObj? For example, build two separate BrainObj (Left and Right hemisphere) and merge them, or several Objs from label volumes.

EtienneCmb commented 4 years ago

Yes, it should be possible using the SceneObj, which is made to superimpose objects. Something like that :

sc = SceneObj()
b_obj_1 = BrainObj('custom_1', ...)
b_obj_2 = BrainObj('custom_2', ...)

sc.add_to_subplot(b_obj_1)
sc.add_to_subplot(b_obj_2)

sc.preview()

See examples using the scene

iPsych commented 4 years ago

Thanks. I am wondering merge objects in GUI. It seems not possible to put multiple BrainObj in Brain, right? For example, Insular, Left hemisphere, and Cerebellum separately.

Below works,

from visbrain.gui import Brain
vb = Brain(brain_obj=b_obj)
vb.show()

But below doesn't works.

from visbrain.gui import Brain
vb = Brain(brain_obj=[b_obj, b_obj2])
vb.show()
EtienneCmb commented 4 years ago

Yes, the GUI only supports a single brain object