Skip to content

Commit

Permalink
small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
liadomide committed Mar 20, 2024
1 parent 62a1351 commit 3d0f2bc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tvbwidgets/ui/head_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import ipywidgets
import numpy
import pyvista

from pyvista import PolyData

from tvb.basic.neotraits.api import HasTraits
from tvb.datatypes.connectivity import Connectivity
from tvb.datatypes.region_mapping import RegionMapping
Expand Down Expand Up @@ -140,11 +137,10 @@ def add_datatype(self, datatype, config=None):
self.logger.warning(f"Datatype {type(datatype)} not supported by this widget!")

def __prepare_mesh(self, surface):
# type: (Surface) -> PolyData
# type: (Surface) -> pyvista.PolyData
dim_4th = numpy.full((surface.triangles.shape[0], 1), 3, dtype=int)
faces = numpy.hstack((dim_4th, surface.triangles))

mesh = PolyData(surface.vertices, faces)
mesh = pyvista.PolyData(surface.vertices, faces)
return mesh

def __toggle_actor(self, change, actor):
Expand Down

0 comments on commit 3d0f2bc

Please sign in to comment.