Warning:  Due to planned infrastructure maintenance, the EBRAINS Wiki and EBRAINS Support system will be unavailable for up to three days starting Monday, 14 July. During this period, both services will be inaccessible, and any emails sent to the support address will not be received.

Attention: We are currently experiencing some issues with the EBRAINS Drive. Please bear with us as we fix this issue. We apologise for any inconvenience caused.


Changes for page Widget Connectivity

Last modified by paulapopa on 2025/06/24 14:15

From version 1.1
edited by davidbacter01
on 2023/09/19 10:08
Change comment: Uploaded new attachment "image-20230919110833-1.png", version {1}
To version 5.1
edited by paulapopa
on 2025/05/30 15:09
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +Widget Connectivity
Parent
... ... @@ -1,0 +1,1 @@
1 +Collabs.tvb-widgets.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.davidbacter01
1 +XWiki.paulapopa
Content
... ... @@ -1,0 +1,62 @@
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:conn2d.png]]
20 +
21 + - in 3D can visualize regions and their respective edges
22 +
23 +==== [[image:conn3d.png]] ====
24 +
25 +To show/hide the Connectivity centers/edges, access the controls available in the upper-right corner:
26 +
27 +[[image:visible.png]]
28 +
29 +=== Operations: ===
30 +
31 + - remove selected nodes from a connectivity, results in a new connectivity containing only the nodes that were not selected;
32 +
33 + - remove unselected nodes from a connectivity, results in a new connectivity containing only the selected nodes;
34 +
35 + - remove unselected edges, results in a new connectivity with the same number of regions but without the edges of unselected regions;
36 +
37 + - remove selected edges,  results in a new connectivity with the same number of regions but without the edges of selected regions.
38 +
39 +
40 +=== Usage: ===
41 +
42 +After instantiating the widget it allows export of the currently selected connectivity:
43 +
44 +{{code language="python"}}
45 +from tvbwidgets.api import ConnectivityWidget
46 +from tvb.datatypes.connectivity import Connectivity
47 +
48 +conn = Connectivity.from_file() # defaults to connectivy_76.zip
49 +conn.configure()
50 +
51 +wid = ConnectivityWidget(conn, default_active_tab='viewers') # default_active_tab can be any value between 'viewers'|'operations'|'both'
52 +
53 +display(wid)
54 +# ....do some operations...
55 +# replace None in the method below with the gid of the connectivity you wish to export
56 +# if no gid is provided it will export the connectivity currently viewed
57 +
58 +new_connectivity = wid.get_connectivity(gid=None)
59 +new_connectivity
60 +{{/code}}
61 +
62 +
conn2d.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.paulapopa
Size
... ... @@ -1,0 +1,1 @@
1 +212.2 KB
Content
conn3d.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.paulapopa
Size
... ... @@ -1,0 +1,1 @@
1 +422.4 KB
Content
image-20230919110853-2.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.davidbacter01
Size
... ... @@ -1,0 +1,1 @@
1 +627.0 KB
Content
visible.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.paulapopa
Size
... ... @@ -1,0 +1,1 @@
1 +260.2 KB
Content
XWiki.DocumentSheetBinding[0]
Sheet
... ... @@ -1,0 +1,1 @@
1 +Collaboratory.Apps.Article.Code.ArticleViewSheet
XWiki.DocumentSheetBinding[1]
Sheet
... ... @@ -1,0 +1,1 @@
1 +Collaboratory.Apps.Article.Code.ArticlePreviewSheet
Public

TVB Widgets