@@ -75,7 +75,7 @@ def __init__(
7575 print_plane ("Plane 0" , self .slicer .plane0 , blue_dark )
7676 print_plane ("Plane 1" , self .slicer .plane1 , pink_dark )
7777
78- def show (self ):
78+ def show (self , both = True ):
7979 """
8080 Renders the hetamap visualization as a 3D scene in brainrender.
8181 """
@@ -88,15 +88,19 @@ def show(self):
8888
8989 # add slicing planes and their norms
9090 for plane , color , alpha in zip (
91- (self .slicer .plane0 , self .slicer .plane1 ),
91+ (
92+ (self .slicer .plane0 , self .slicer .plane1 )
93+ if both
94+ else (self .slicer .plane0 ,)
95+ ),
9296 (blue_dark , pink_dark ),
9397 (0.8 , 0.3 ),
9498 strict = False ,
9599 ):
96100 plane_mesh = plane .to_mesh (self .scene .root )
97101 plane_mesh .alpha (alpha ).color (color )
98102
99- self .scene .add (plane_mesh , transform = False )
103+ self .scene .add (plane_mesh )
100104 for vector , v_color in zip (
101105 (plane .normal , plane .u , plane .v ),
102106 (color , red_dark , green_dark ),
@@ -109,12 +113,12 @@ def show(self):
109113 + np .array (vector ) * self .arrow_scale ,
110114 c = v_color ,
111115 ),
112- transform = False ,
116+ classes = "plane_mesh" ,
113117 )
114118
115119 self .scene .add (
116120 Sphere (plane_mesh .center , r = plane_mesh .width / 125 , c = "k" ),
117- transform = False ,
121+ classes = "plane_mesh" ,
118122 )
119123
120124 self .scene .render (interactive = self .interactive , zoom = self .zoom )
0 commit comments