From 62a1351497be91942cf02461b9dabea1d0f358e6 Mon Sep 17 00:00:00 2001 From: liadomide Date: Wed, 20 Mar 2024 14:42:54 +0200 Subject: [PATCH] Add TODO --- requirements.txt | 2 +- tvbwidgets/ui/connectivity_ipy/connectivity_widget.py | 6 ++++-- tvbwidgets/ui/head_widget.py | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8b42f4f..2c1bb70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ mne>=1.0 numpy<1.24 plotly==5.14.0 pythreejs -pyvista==0.41.0 +pyvista==0.41.0 # from version 0.42 backend pythreejs is removed - we use it in the HeadWidget ipyreact==0.4.1 tvb-library>=2.5 tvb-framework diff --git a/tvbwidgets/ui/connectivity_ipy/connectivity_widget.py b/tvbwidgets/ui/connectivity_ipy/connectivity_widget.py index b67c545..6d49840 100644 --- a/tvbwidgets/ui/connectivity_ipy/connectivity_widget.py +++ b/tvbwidgets/ui/connectivity_ipy/connectivity_widget.py @@ -8,7 +8,7 @@ import ipywidgets import matplotlib import numpy -import pyvista as pv +import pyvista import numpy as np from numpy import ndarray from tvb.basic.neotraits.api import HasTraits @@ -21,6 +21,8 @@ DROPDOWN_KEY = 'dropdown' +# TODO see latest releases of pyvista have this backend removed +pyvista.set_jupyter_backend('pythreejs') class CustomOutput(ipywidgets.Output): CONFIG = ConnectivityConfig() @@ -168,7 +170,7 @@ def __add_actors(self): plotter = self.output.plotter points = CONTEXT.connectivity.centres - mesh_points = pv.PolyData(points) + mesh_points = pyvista.PolyData(points) points_color = self.output.CONFIG.points_color points_size = self.output.CONFIG.point_size diff --git a/tvbwidgets/ui/head_widget.py b/tvbwidgets/ui/head_widget.py index 1a40372..f633fab 100644 --- a/tvbwidgets/ui/head_widget.py +++ b/tvbwidgets/ui/head_widget.py @@ -20,6 +20,7 @@ from tvbwidgets.ui.base_widget import TVBWidget from tvbwidgets.ui.widget_with_browser import TVBWidgetWithBrowser +# TODO see latest releases of pyvista have this backend removed pyvista.set_jupyter_backend('pythreejs')