Changes for page Widget Connectivity
Last modified by paulapopa on 2025/06/24 14:15
From version 3.1
edited by davidbacter01
on 2023/09/19 10:22
on 2023/09/19 10:22
Change comment:
There is no comment for this version
To version 2.1
edited by davidbacter01
on 2023/09/19 10:08
on 2023/09/19 10:08
Change comment:
Uploaded new attachment "image-20230919110853-2.png", version {1}
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Objects (0 modified, 0 added, 2 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -Widget Connectivity - Parent
-
... ... @@ -1,1 +1,0 @@ 1 -Collabs.tvb-widgets.WebHome - Content
-
... ... @@ -1,65 +1,0 @@ 1 -== Widget Connectivity == 2 - 3 -Source code: [[https:~~/~~/github.com/the-virtual-brain/tvb-widgets>>url:https://github.com/the-virtual-brain/tvb-widgets]] 4 - 5 -This is part of a Pypi release: [[https:~~/~~/pypi.org/project/tvb-widgets/>>url:https://pypi.org/project/tvb-widgets/]] 6 - 7 -//**tvb-widgets**// is also already installed in the official image released for EBRAINS lab, where you can test it directly. 8 - 9 - 10 -== Purpose == 11 - 12 -Jupyter lab widget for visualizing or do operations on a connectivity 13 - 14 - 15 -=== Visualization: === 16 - 17 - - in 2D can visualize weights or tracts matrixes; 18 - 19 -[[image:image-20230919110833-1.png]] 20 - 21 - - in 3D can visualize regions and their respective edges 22 - 23 - 24 -==== [[image:image-20230919110853-2.png]] ==== 25 - 26 - 27 -=== Operations: === 28 - 29 - - remove selected nodes from a connectivity, results in a new connectivity containing only the nodes that were not selected; 30 - 31 - - remove unselected nodes from a connectivity, results in a new connectivity containing only the selected nodes; 32 - 33 - - remove unselected edges, results in a new connectivity with the same number of regions but without the edges of unselected regions; 34 - 35 - - remove selected edges, results in a new connectivity with the same number of regions but without the edges of selected regions. 36 - 37 - 38 -=== Usage: === 39 - 40 -After instantiating the widget it allows export of the currently selected connectivity: 41 - 42 -{{code language="python"}} 43 -from tvbwidgets.api import ConnectivityWidget 44 -from tvb.datatypes.connectivity import Connectivity 45 - 46 -import pyvista as pv 47 - 48 - 49 -pv.set_jupyter_backend('pythreejs') 50 - 51 -conn = Connectivity.from_file() # defaults to connectivy_76.zip 52 -conn.configure() 53 - 54 -wid = ConnectivityWidget(conn, default_active_tab='viewers') # default_active_tab can be any value between 'viewers'|'operations'|'both' 55 - 56 -display(wid) 57 -# ....do some operations... 58 -# replace None in the method below with the gid of the connectivity you wish to export 59 -# if no gid is provided it will export the connectivity currently viewed 60 - 61 -new_connectivity = wid.get_connectivity(gid=None) 62 -new_connectivity 63 -{{/code}} 64 - 65 -
- XWiki.DocumentSheetBinding[0]
-
- Sheet
-
... ... @@ -1,1 +1,0 @@ 1 -Collaboratory.Apps.Article.Code.ArticleViewSheet
- XWiki.DocumentSheetBinding[1]
-
- Sheet
-
... ... @@ -1,1 +1,0 @@ 1 -Collaboratory.Apps.Article.Code.ArticlePreviewSheet