User Guide: Release 2.3-16437
User Guide: Release 2.3-16437
Release 2.3-16437
TVB Team
1 Overview of TheVirtualBrain 3
3 Configuring TVB 11
3.1 Configuring a headless TVB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Setting up a client/server configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Installing PosgreSQL on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
i
8 Copyright notice 101
8.1 CITATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
ii
User Guide, Release 2.3-16437
This document provides the most basic tutorial to get the new user started working with TheVirtualBrain,
version 1.0. As TheVirtualBrain will be updated regularly, please check for updates on our web site:
http://www.thevirtualbrain.org.
CONTENTS 1
User Guide, Release 2.3-16437
2 CONTENTS
CHAPTER
ONE
OVERVIEW OF THEVIRTUALBRAIN
TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologi-
cally realistic connectivity. TheVirtualBrain uses tractographic data (DTI/DSI) to generate connectivity matrices
and build cortical and subcortical brain networks. The connectivity matrix defines the connection strengths and
time delays via signal transmission between all network nodes. Various neural mass models are available in the
repertoire of TheVirtualBrain and define the dynamics of a network node. Together, the neural mass models at the
network nodes and the connectivity matrix define the Virtual Brain.
TheVirtualBrain simulates and generates the time courses of various forms of neural activity including Local
Field Potentials (LFP) and firing rate, as well as brain imaging data such as EEG, MEG and BOLD activations as
observed in fMRI.
TheVirtualBrain is foremost a scientific simulation platform and provides all means necessary to generate, manip-
ulate and visualize connectivity and network dynamics. In addition, TheVirtualBrain comprises a set of classical
time series analysis tools, structural and functional connectivity analysis tools, as well as parameter exploration
facilities by launching parallel simulations on a cluster.
3
User Guide, Release 2.3-16437
TWO
5
User Guide, Release 2.3-16437
On Linux these scripts will have the .sh termination, on Mac the .command termination and on Windows the .bat
termination. We will omit the termination in this manual. For example if you are using Windows and tvb_start is
mentioned in this document then tvb_start.bat is meant. The examples below are for Linux.
These scripts will start and control TheVirtualBrain.
On the latest versions of MacOS, you should allow from Settings –> Security and Privacy the newly downloaded
executable to run.
For Linux and Windows users, to start TheVirtualBrain in your web-browser, run the tvb_start script in
TVB_Distribution/bin. On all platforms you can also double click the script’s icon.
$ cd TVB_Distribution/bin
$ ./tvb_start.sh
To make sure that no processes will remain open after you use the application, you should always close TheVirtu-
alBrain by running the tvb_stop script.
$ ./tvb_stop.sh
Note: The first time you configure TVB, it will write a file .tvb.configuration in your user home folder. In case
you run into problems when this write is about to happen, you can set environment variable TVB_USER_HOME
to a value more appropriate for your environment (for example pointing towards TVB_Distribution unzipped
location). Specify a value for the environment variable TVB_USER_HOME in distribution command file to have
it ready for multiple TVB runs.
tualBrain. In the LIBRARY_PROFILE you use TheVirtualBrain as you would use a library and it will not manage
data for you.
The most user friendly interface is the Jupyter notebook one. It is a LIBRARY_PROFILE interface. It’s shell is
the browser based jupyter notebook. To launch it run the jupyter_notebook script from the TVB_Distribution/bin/
folder.
$ cd TVB_Distribution/bin
$ ./jupyter_notebook.sh
The distribution script is used from a terminal to control the TheVirtualBrain distribution. Run distribution -h too
get help with this command:
$ ./distribution.sh -h
To access the console interface, run in a terminal distribution start COMMAND_PROFILE or distribution start
LIBRARY_PROFILE. A Python shell will appear.
$ ./distribution.sh start COMMAND_PROFILE
• Mac : /Users/johndoe/TVB
However for a client server or cluster setup you will need to take some more time to configure TVB. See the
Configuring TVB section for details.
The above operation will not touch TVB_Distribution, which represents your downloaded TheVirtualBrain app,
but only TVB generated user data, as result of using the GUI interface, mainly.
The files under TVB_Distribution/..../tvb_data and the git repository tvb_data, can be used together with the GUI
and/or the script interfaces, or taken as reference by you, when creating TVB compatible dataset.
• Debian Stretch. Other Linux flavors might also work as long as you have installed a glibc version of 2.14 or
higher.
• Mac OS X 10.13 High Sierra.
• Windows 10 and Windows 8.
THREE
CONFIGURING TVB
The preferred method to configure TheVirtualBrain is from the web interface. See TVB Settings.
However if TheVirtualBrain is installed on a headless server (no GUI), then the web interface might not be avail-
able remotely. See Configuring a headless TVB.
Usually one would change the web server port and domain. TheVirtualBrain will create a folder with project data
named TVB (at the path specified by line starting with TVB_STORAGE). By default it is located in the users home
directory. You can change the TVB_STORAGE to point to a different location.
Finally run the appropriate script for your platform (as described in the previous chapter), to launch TheVirtual-
Brain with the new settings.
11
User Guide, Release 2.3-16437
3. Choose the postgres user that TVB will use to connect. Any user with rights over tvb database is ok. These
are not tvb accounts but db accounts.
4. Create a DB connection URI. Postgres URI’s in TVB have this general form
postgresql+psycopg2://postgres:root@[postresql-server-host]:[postgres-port]/tvb?user=[user]&p
# The angle bracketed expressions are placeholders that have to be replaced by values specifi
5. Place the concrete connection URI in the TheVirtualBrain configuration using either the GUI or by editing
the config file.
FOUR
The workflow of TheVirtualBrain is divided in six major activities. The main menu of the web interface lays at
the bottom of the page. It links to these six activities.
1. In User, the user can manage their account and TheVirtualBrain settings.
2. In Project, the individual projects are managed with all their data and infrastructure.
3. In Simulator large-scale simulations are defined and launched. Analysers and visualizers associated with a
simulation are defined there. Their results, structural and functional data, are shown in panels. Having mul-
tiple panels allows having a quick overview of the current TheVirtualBrain model parameters, simulations
and results. We consider the Simulator to be the core of TheVirtualBrain.
4. In Analysis experimental and simulated data can be analyzed.
5. In Stimulus, patterns of spatiotemporal stimuli can be generated.
6. And finally in Connectivity, the user can edit the connectivity matrices assisted by interactive visualization
tools.
The typical workflow within TheVirtualBrain GUI proceeds through these steps:
1. a project is defined and/or selected and user data, (e. g. a connectivity matrix), are uploaded into this project
2. new data is obtained by simulating large scale brain dynamics with some set of parameters
3. results are analyzed and visualized
A history of launched simulations is kept to have the traceability of any modifications that took place in the
simulation chain.
The TVB EduPack on the TVB main website contains several video lectures guiding you step by step through
TVB’s web interface:
• LEARN: How to interact with the GUI and script interface of TVB, lecture by Paula Prodan & Mihai Andrei
• LEARN: Hands-On: Introduction to the GUI, lecture by Paul Triebkorn
4.1 User
4.1.1 TVB Settings
Once started, TheVirtualBrain should automatically open your default browser and start on the default
http://127.0.0.1:8080/settings/settings. If not, you should manually open your favorite browser from our list of
supported browsers and open the before mentioned URL. This should open up the following settings page:
These are the configurable settings for TheVirtualBrain. Note that the Name of the administrator is the only one
that cannot be changed later on. The others will be accessible afterward from the profile page of the administrator.
These settings are:
Administrator User Name: the name of the administrator. Default value here is admin. Remember it, as you
will need this account for validating other accounts created with Register function.
13
User Guide, Release 2.3-16437
Password: the password of the administrator. Default value here is pass. Remember it, as you will need it at a
first login. This password can be changed later by clicking the Change password link, from the profile page
(available only after a login).
Administrator Email: the email of the administrator. Emails requesting validations for new users will be sent to
this address. This can be changed by clicking the edit link from the profile page.
Root folder for all projects: this is the root storage for TheVirtualBrain. All your projects will be stored here, as
well as the logging file and the files used as input and output for the backend server. Please provide here a
valid folder path, on a drive which has enough space for storing TVB data. This field will be present on the
settings page later on, but you won’t be able to change it. In case you are forced to change this path/folder,
we recommend that you export your existing projects, stop TheVirtualBrain, start it with the clean option
(and configure new folder) and then import your projects back into the system.
Max Disk Size (in MB): Is the amount of disk space that you (as administrator) can specify as the limit for each
user, to occupy with TheVirtualBrain data. When a user exceeds this limit, they are no longer allowed to
run simulations or other operations producing data. When this limit is exceeded, the user will still be able
to visualize their previously created data, and, if desired, to remove data for making space for new results.
For instance:
• A default region level simulation with length 1000 ms takes approximatively 1 MB of disk space.
• A surface level simulation, with Local Connectivity pre-computed, Raw monitor and length of 10 ms
takes 280 MB.
Default value here is 5GB. We validate upon setup that a value not greater than the available physical disk
free space is specified. In case you later get errors when running simulations (with disk full messages), but
you still have free space on your hard-drive, feel free to come on this settings page and increase this value
of space allocated to TheVirtualBrain.
DB engine: For benchmarking purposes currently supported are sqlite and postgresql databases. You will need to
provide a valid database URL in case you choose postgresql. In the case of sqlite a default tvb-database.db
will always be used. Please take into consideration that when switching to a new database your existing
data will be lost.
Server name: usually the IP of the server that will run TheVirtualBrain. You can also leave it as the default if
you are just running TheVirtualBrain locally.
Cherrypy port: the port used by cherrypy. You need to make sure this port is not used by some other application
otherwise TheVirtualBrain will not start.
Deploy on cluster: set true if you want to run TheVirtualBrain on a cluster environment.
RPC server: if you are not running on a cluster, this will be the port used by the backend server. If Deploy on
cluster is checked this will not be used.
Maximum number of vertices: maximum number of vertices for a surface.
After selecting your desired settings press the Apply button. This will restart TheVirtualBrain with the new settings.
The restart could take a few minutes.
4.1.2 Login
In order to access TheVirtualBrain, you need to have a user account.
There is a single Administrator account in TVB (created when installing the application). Its default user-name
and password are admin and pass (exactly these words). These are the default values, but when you setup
TheVirtualBrain for the first time (section Settings from above) you can specify different values, if wanted. Please
remember what you specify for this Administrator account, as you are the sole responsible for it (TheVirtualBrain
being installed in your own environment we have no control of your storage). With the Administrator account you
will be able to later validate other TVB accounts.
4.1.3 Register
If you want to create a new user in TheVirtualBrain, you should register using the corresponding link (available
on the User Login page), which takes you further to the following form:
When the register button is clicked (on the right), an email is sent to ADMINISTRATOR_EMAIL address. It is the
administrator’s task to validate the new account. The administrator needs to be logged in to validate an account.
Without validation from the administrator, you will not be able to use the new accounts. For details on how
validation is done, see the User Profile section.
4.1. User 15
User Guide, Release 2.3-16437
Figure 4.4: The User details page (also called User Profile)
• enable or disable Online Help for current user. By Online Help we mean a bunch of question marks spread
all over the application which can display a tooltip when clicked). In case you find the question marks
annoying, feel free to disable them for your user from this page. Some pages will take longer to load when
Online Help is on. You might want to disable it once you feel confident with the interface.
• logout function (button on the right side)
Tip: TVB is a web application, which gets deployed on every computer where TVB_Distribution is downloaded
and tvb_start command is executed. This happens usually in a local environment; which means that the user and
resource management will be done locally, in that instance, and not in a centralised manner.
When TVB is started for the first time, you will see a settings page, where you can define the administrator account
of that TVB instance. Default that is: admin / pass (exactly these words).
If you are using TVB in a single-user manner (not shared with other colleagues), feel free to use only this user
while working with TVB; you do not need to bother with creating/registering other accounts. It is although
recommended for you to change the password and the email address for this administrator account, especially if
you are working in a LAN and your computer is not having a strong firewall.
4.1. User 17
User Guide, Release 2.3-16437
If you are using TVB in a shared environment (e.g. installed on a server and accessed from remote by multiple
people), you could follow the following steps:
• register accounts (optional)
• login with administrator
• check admin’s profile page, link Manage other users
• in case you haven’t registered accounts (step 1) you can now create new accounts using the button on the
right
• check the validate checkbox for new users that you want active, and click Save to apply (see figure from
previous page)
• from this very same page you can also invalidate some old users which you want to no longer be able to use
TVB
4.2 Project
Projects are the way you organise data and simulations in TheVirtualBrain. They correspond to directories where
related data sets and simulation results are stored.
Information on the currently selected project is always available by clicking on the upper left corner of the inter-
face:
The Project tab provides access to the projects that you have created within TheVirtualBrain. The second level
menu in the top left corner, next to the Project number, allows you to navigate between five main subpages, each
of which is described in more detail in the sections below:
• List of All Projects
• Basic Properties
• Operations
• Data Structure
• Saved Figures
4.2. Project 19
User Guide, Release 2.3-16437
Note: Only the current project figures will be available. If you want to visualize images from another project,
you will have to switch to that project.
4.2.4 Operations
A table with the history of operations related to the currently selected project is displayed. From this board the
user can filter, view, reload or cancel any operation:
4.2. Project 21
User Guide, Release 2.3-16437
You can change the criteria of this grouping. Experiment with the level1 and level2 drop down menus found above
the tree.
Besides grouping the datatypes you may also filter them. The left-most area of the Data Structure page contains
basic filters for the centrally displayed entities. We display fixed filters (entities declared relevant / irrelevant) of
free-text filtering (when using the input text field and then pressing Button ‘Filter’). Filtering based on free-text
searches into all fields of an entity, and it is case insensitive.
Note that the color of the datatype icons in the tree view indicate their category:
1. Green are the raw datatypes. These are mostly imported in TVB (eg. connectivities, surfaces, sensors etc.)
2. Yellow are adjacent datatypes. These usually imported in TVB (eg. lookup tables and matrices etc.)
3. Red are time series datatypes either created by simulations or imported.
4. Blue are analyser results.
5. Pink are some datatypes created by TVB (eg. stimuli, local connectivities etc.)
Selecting a data node in the Tree structure causes an overlay to appear.
From this overlay, the user can:
• edit metadata
• launch Analyzers and Visualizers
• link data to other projects
• export data.
On the most-right area of this page, an upload button appears. This launches an overlay with tabs for each type of
TVB-compatible data:
For a detailed description of the supported file formats see TheVirtualBrain Data Formats
Launching any uploader with success will generate you a new leaf in the Tree displayed centrally on this page.
The central area also contains a Graph view. The main target for the Graph view is to show you in a mixed manner
both DataTypes and Operations. The edges that link the Graph are of type: ‘Operation generated DataType’ and
‘DataType is input for Operation’. When switching from the Tree display to the Graph display, the same node (if
DataType) remains selected. This way you could filter entities in the Tree display, check generic meta-data, then
switch to the Graph display and see what Operation was parent for this entity.
4.2. Project 23
User Guide, Release 2.3-16437
4.3 Simulator
This page shows a configurable multicolumn interface that combines TheVirtualBrain simulation, analysis and
visualization capabilities.
The button allows you to initialize a new simulation, using the default Simulator parameters. This default
initialization is already happening, if you just landed on this page for the first time. The button can be useful in
case you started configuring a complex simulation and you lost track of the changes, to return to the safe defaults.
The button allows you to upload a JSON file. This file can be exported from a previously configured and
run simulation (on the same or different TVB installation, as long as versions are compatible). Details on how to
export such a JSON file can be found just bellow, when we explain the icon.
As main content in this left column, a history of all simulations is kept and can be accessed at any time.
Each simulation execution has a color label that represents its current status:
• pale blue: simulation is running,
• green: simulation is finished,
• gray: simulation has been canceled by the user,
• red: an error occurred during the simulation.
Each simulation can be renamed, copied, exported or deleted by clicking on icon, next to its name.
To rename a simulation, click the icon first, then edit the text in the input field, and do not forget to press
icon when you are done writing.
Note: You cannot rename a Simulation while it is running, but instead you could cancel it (e.g. if you see it eats
too many of your machine resources, or you simply changed your mind about this run).
4.3. Simulator 25
User Guide, Release 2.3-16437
Copy simulation means loading in memory the same configuration, as used for that particular simulation. It will
be your job to optionally change something in the configuration and, when done, press the icon, to actually
run this copy of the simulation.
Export JSON is a new feature which allows you to create a text file, which stores the current simulation parameters.
This text file will be downloaded from your browser window, and can be reused later. You could use it on the same
TVB installation, or on a totally different TVB server, in several manners:
• from web GUI, using the button, on this page (top of column History)
• in the python console of TVB, for better debugging capabilities. Examples for this later case can be found
in the set of examples for COMMAND and LIBRARY profiles.
Caution: Please notice that deleting a simulation will remove the parameters configuration, and also
delete all resulting data that had been produced in relation to that simulation.
In this column you can change all the configurable parameters of a simulation:
• Long Range Connectivity
• Long Range Coupling Function
• Conduction Speed
• Cortical Surface
• Stimulus
• Local Dynamics Model
– State Variable Range
– State Variables to be recorded
– Initial Conditions
• Integration Scheme
– Integration Step Size
• Monitors
• Simulation Length
You can find more detailed information by clicking on the icon next to each element.
4.3. Simulator 27
User Guide, Release 2.3-16437
This page allows you to observe how the dynamics of the physical model change as a function of its parameters.
On the left column you select the model you want to explore and set it’s parameters.
The selected model will generally have a n-dimensional phase space. The right column shows a 2-dimensional
axis cut of this space. Gradients are shown and nullclines if they exist. To control this cut use the Axes and State
variables regions in the left column. There you can select what state variables should be shown and their ranges.
Also you can set values for the variables that are not shown.
If you click in the phase plane a state trajectory will be computed. The integration method for this trajectory is
configured on the left column. To make trajectories longer increase the integration step. This will not influence
the simulation. For stochastic integrators decreasing the dispersion usually makes sense. Below the phase graph
you will see the signals for all state variables. These signals belong to the latest trajectory.
Finally to save a parameter configuration give it a name and click Save new parameter configuration. This saved
configuration can be used in Region-based simulations
Region-based simulations
The Set up region Model button leads you to the region model page. Here you can associate model parameter
configurations to connectivity nodes.
The Configure noise button leads to the region noise page. Here you can associate noise dispersions to connectivity
nodes. Select some nodes using any of the selection components or the 3d view. Choose dispersions for all state
variables then place those values in the selected nodes.
Surface-based simulations
If you are launching a surface-based simulation, then it is possible to add more complexity by spatially varying
the model parameters.
In order to do that, click on Set up surface model. A new configuration page will be loaded.
Hint: Maximize this column by clicking on the zoom icon located in the top right corner.
4.3. Simulator 29
User Guide, Release 2.3-16437
Figure 4.23: The results will be presented in a discrete two dimensional graph. Each point represents the results
of a simulation for an unique combination of parameters. The disk size corresponds to Global Variance and the
color scale corresponds to Variance of the Variance of nodes.
Tip: Once your results are available, by clicking on you will be redirected to a new page where only the
currently selected visualizer is presented. In this new page, you can click on in the top right corner to access
a new menu which will allow you to:
• Save a snapshot of the current figure.
• Relaunch the visualizer using a different entity, if available. For instance, a different time-series.
All the snapshots you save can be managed in Projects –> Image Archive page.
orphan
4.3. Simulator 31
User Guide, Release 2.3-16437
Pressing the control key will rotate or translate in the model space; while without control key pressed, the rotation
happens in the space of the navigator (with center in (0,0,0) ).
The SPACE key will show a top view. The CURSOR Keys will show axis aligned views.
For region level time series the brain is represented by a coarse granularity - each region is represented with only
one color. For surface level time series each vertex has an individual measure.
The color coding is determined by the current color scheme. A legend of it is on the right side of the brain view.
You can change this color scheme and other viewer parameters from the brain menu in the upper right corner.
From the visualizer toolbar you can pause and resume the activity movie. For region level time series there is a
selection component in the toolbar. Use it to show activity only for the selected regions.
Figure 4.25: Preview for Brain Activity Visualizer at the region level
4.3. Simulator 33
User Guide, Release 2.3-16437
The page size determines how much data should appear at once in the viewer. The spacing determines the space
between the horizontal axis of each signal. Setting it to 0 will plot all signals in the same coordinate system. A
side effect of this setting is that as you decrease this axis separation the amplitude of signals is scaled up.
Figure 4.28: Selecting the “channels” to be displayed (available in several viewers of TVB).
Volume Visualizer
This family of viewers display volumetric data, usually in an anatomical space. If the data has a time component
then on the right side it will display timelines for selected voxels. FMri data is an example of this. A structural
mri volume may be used as a background.
Volumetric fragment
4.3. Simulator 35
User Guide, Release 2.3-16437
There are 3 navigation and viewing quadrants on the left and one main “focus quadrant” (left-central). It is possible
to navigate in space using the slide controls on the top-left toolbar or by clicking on the 3 navigation quadrants
on the most left part of the screen. So clicking in the 3 left squares will change the X, Y, Z of the planes slicing
through the currently displayed volume (as the sliders on top are doing), while clicking in the main (central) square
will select the clicked point for display of details on the right.
The crosses designate the selected voxel. It’s value is shown at the bottom of the focus quadrant. A white bar on
the color legend also indicates this value.
The playback function is activated by clicking the play button on the top bar, and it will then change the display
with time (left and right areas); The time series data is buffered from the server according to the currently section
of view.
A different color map can be selected by clicked the Brain call-out in the top-right side of the screen. You might
want to use the trim middle values feature with this viewer. It renders values around the mean transparent in the
view. Also to be found on the Brain call-out.
Time Series Line Fragments
This is the right part of the TimeSeries Volume visualizer and is composed of other sub-parts:
Global Time Series Graph
All selected lines are shown here (top area), with the same scaling. Some transparency is applied to the lines and
only one line is highlighted at a time. Highlighting can be done by passing the mouse over the line on the global
graph or by clicking the selected line in the sortable graphs bellow. Vertical scaling is done based only on the
selected values and not on the complete data set. A red vertical line shows the current time point (correlated with
the movie in TimeSeries Volume section). A blue line follows the mouse showing the value of the highlighted line
at each point.
Time slice selection (focus):
This function can be used to display only a portion of the data, zooming on it bellow. Try dragging in this region.
The grey selection box can be moved and resized. If the focused data looks flat, increase the selected window
length. The selection will automatically set itself around the current time point with a default extent during
playback.
Sortable Graphs:
Every selected time series from the volume is shown on a separate line and labeled based on its coordinates from
the 3D space. Adding lines in this section can be done by clicking in the left area on the main quadrant.
Already selected Time series lines on the right, will remain unchanged, when Mode and State Variable change,
but if you click again on the left side volume, new lines will be added, for the currently active Mode and State
Variable. One can inspect in the line title, the details for that point (including X, Y, Z position in the volume, full
region name, Mode and State Variable).
Important notice:
While these time lines share the temporal axis they do not share the vertical one. The signal amplitudes are
dynamically scaled so as to make the signal features visible. Amplitudes are not comparable among two of these
signals.
The lines are colored following the selected feature in “Color Lines by” at the top of the screen. They are then
sorted automatically by one of the selected methods or manually, by dragging and dropping each line in the desired
position, as seen on the picture bellow. Lines can be removed by dragging them to the top “trash bin area” that
appears every time a line is selected to be dragged.
4.3. Simulator 37
User Guide, Release 2.3-16437
On the X axis, we will see the Connectivity nodes listed, and for each of them, we see the computed measure on
the Y axis.
Topographic Visualizer
This visualizer can be used for displaying various Brain Connectivity Measures, related to a given Connectivity.
Its input is the same as for the previous visualizer (Connectivity Measure Visualizer), but the display is completely
different. Instead of a discrete view, this time, we can have a continous display (with gradients).
Surface Visualizer
This visualizer can be used for displaying various Brain Surfaces. It is a static view, mainly for visual inspect-
ing imported surfaces in TVB. Optionally it can display associated RegionMapping entities for a given surface.
Navigate the 3D scene like in the Brain Activity Visualizer.
Sensor Visualizer
This visualizer can be used for displaying EEG, MEEG, and internal sensors . It is a static view, intended for
visual inspecting imported sensors in TVB. Optionally it can display the sensors on a EEG cap surface.
To show sensors displaying on a Cap, check the call-out on the top-right corner.
When displaying the EEG sensors on a EEG Cap surface, we are automatically computing a “parcellation”. Cur-
rently this parcellation has no anatomical meaning, it is only based on distance (a vertex gets coloured as the
closest sensor).
Navigate the 3D scene like in the Brain Activity Visualizer.
4.3. Simulator 39
User Guide, Release 2.3-16437
4.3. Simulator 41
User Guide, Release 2.3-16437
(bottom page menu), Local Connectivity option on top of the page, then select an existing LocalConnectivity and
finally click “View” from the right side menu.
In order to see actual correlations, one should pick (by mouse click) a vertex on the 3D cortical surface once it
loads in the canvas. The colors displayed nearby, show connected vertices with the selected point.
Annotations Visualizer
This viewer shows ontology annotations linked with TVB connectivity regions. It is composed of two main display areas:
• 3D left-side canvas with TVB regions. These regions are color coded, based on the connectivity
region index (similar to Surface Visualizer when a Region Mapping entity is selected). From the most
top-right corner menu, you can change the color scheme used to draw these regions coloring.
• 2D tree display of ontology annotations. A tooltip will appear if you go with the mouse over various
nodes, and will show you details imported from the ontology.
The two areas (left and right) are linked, both ways:
• You can pick a vertex in 3D and have the corresponding tree node highlighted on the right-side, or
backwards:
• Click on the tree, and have the corresponding region(s) highlighted in 3D.
Hints:
• There is a checkbox on the top-right menu to draw region boundaries in the 3D canvas
• When you click on an ontology node on the right, a message text will appear on the top area of the
page, telling you how many TVB regions are linked to this ontology term
Figure 4.44: Pick a vertex in 3D and have the corresponding tree node selected on the right.
Figure 4.45: Select a tree node on the right, and have the linked regions highlighted in 3D.
4.3. Simulator 43
User Guide, Release 2.3-16437
When moving with your mouse cursor over a graph node, you will see a few details about that particular simulation
result. When clicking a node, an overlay window will open, which gives you full access to view or further analyze
that particular Simulation result.
Figure 4.46: Preview for Discrete PSE Visualizer, when varying two input parameters of the simulator
A newly incorporated feature is the option to pan the canvas in/out or left/right/up/down. To pan you may click
and drag on top of one of the axes, and to zoom in double click or out shift + double click. This will allow the
inspection of very large batch simulations section by section. The same mouse over, and clicking rules apply from
above.
The next new tool is the filter button. This allows users to specify threshold values for either the color or size
metric and render results transparent if they are below that value. This tool has the option to invert the threshold
rule which makes the results above that threshold transparent instead. Also, the user has the choice to make their
filter more specific by adding further criteria rows that relate to the one which came before it through selected
logical operators (AND OR). It is worth noting that in order to perform filtering that requires grouping of the
logical operations ([foo and bar] or baz) as different from (foo and [bar or baz]) sequential filters must be applied:
one filter execution then the other.
The last tool to be described in the PSE Discrete Viewer is the Explore tool. This tool is meant to give users the
option to select regions of the Parameter Space to be filled in with new results. Currently only the front end of
this tool is complete, so upon clicking the explore button the mouse cursor becomes a cross hair, and sections of
the graph can be selected. Upon creation of this selection, grid lines are placed to demonstrate where new results
would be added given the user’s chosen step values. To adjust these values simply drag the sliders in the drop
down menu for the explore tool, and the grid lines will adjust until they suit the user.
4.3. Simulator 45
User Guide, Release 2.3-16437
Figure 4.51: Preview for Continuous PSE Visualizer, when varying two numeric input parameters of the simulator
overlay window will open, having the possibility to view or further analyze the simulation result closest to the
point where you clicked.
4.3. Simulator 47
User Guide, Release 2.3-16437
4.3. Simulator 49
User Guide, Release 2.3-16437
Matrix Visualizer
This is a 2D representation of a generic matrix-like result.
In case the current Datatype has more than 2 dimensions, the ND array will be cut, with a default slice. The user
can also input the slice manually.
4.3. Simulator 51
User Guide, Release 2.3-16437
4.4 Analyze
This area offers a set of techniques for data analysis.
The Analyzers in TheVirtualBrain are not always the best implementations of the algorithms in terms of perfor-
mance, neither are we offering a complete analysis spectrum, because analysis is not considered the focus feature
of TheVirtualBrain and we do not intend to offer a replacement for tools already existent and successful in this
area. We are merely offering some handy tools for people who want to directly process simulation results in-
side TheVirtualBrain, although the advised long term strategy is to export simulated data from TheVirtualBrain
and analyze it intensively with specialized tools for your area of interest. We advise you not to run our analysis
algorithms with long timeseries, as some might take a lot of time to finish.
The Analysis area has several interfaces that support the following operations for time-series analysis (and not
only):
• Cross-correlation of nodes
• Fourier Spectral Analysis
• Global TimeSeries Metrics
• Cross coherence of nodes
• Temporal covariance of nodes
• Principal Component Analysis
• Independent Component Analysis
• Continuous Wavelet Transform
4.4. Analyze 53
User Guide, Release 2.3-16437
The algorithm returns a CrossCorrelation object that contains cross correlation coefficients for all possible combi-
nations of nodes. Results are visualized with the Correlation viewer.
4.4. Analyze 55
User Guide, Release 2.3-16437
The algorithm returns an PrincipalComponents object that is a xD-Matrix with the Dimensions {x,y,z}. The
resulting time-series can be viewed with the Pca viewer.
To calculate a CWT of all nodes of a given multi-node time-series, select the 4D-TimeSeries object from the
drop-down list in the Continuous Wavelet Transform interface, specify transformation parameters like:
• mother wavelet function
• frequency resolution and range
• type of the normalization for the resulting wavelet spectrum
• Q-ratio
• Sampling period of the spectrum
and hit Launch.
The algorithm returns an WaveletCoefficients object that is a xD-Matrix with the Dimensions {x,y,z}. The resulting
spectrogram of wavelet power can be viewed with the Wavelet viewer.
4.4. Analyze 57
User Guide, Release 2.3-16437
• The FCD segmented, that is the FCD matrix with the entries corresponding to the time points not belonging
to the epochs of stability equal to 1.1. When the epochs of stability are not find, the FCD segmented is not
an output
• The 3 eigenvectors corresponding to the FC of the epochs (if present) or to the global FC. These are Con-
nectivityMeasures which are viewable with the volume visualizer.
The analyser takes as input a time series region, time window length (in ms), spanning between 2 consecutive time
windows (in ms).
The code does the following steps:
1. Calculates the FCD: The entire time series is divided in time window of the fixed length (decided by
the user) and with an overlap decided by the user ( spanning=[time window length] - [overlapping
between consecutive time window]). The data points within each window, centred at time ti, are used
to calculate FC(ti). The element ij of the FCD is calculated as the Pearson correlation between the
upper triangular part of FC(ti) arranged as a vector and the upper triangular part of FC(tj) arranged as
a vector.
2. The FCD is segmented in epochs of stability using the spectral embedding algorithm. We call epoch
of stability a length of time during which an FC configuration stays stable. It is possible to visual-
ize these epochs of stable FC as blocks of elevated inter-FC(t) correlation around the diagonal of the
FCD. We neglect always the first epoch of stability found by the algorithm since should be an artifact
caused by the initial condition of the simulated time series.
3. FCs are calculated over the epochs of stability (excluding the first epoch). When the algorithm does
not find the epochs the global FC is calculated, i.e. the FC calculated over the entire timeseries.
4. The first three eigenvectors of the FCs calculated at step 3 are extracted. We call the “first” eigenvec-
tor the one associated to the largest eigenvalue, the second eigenvector the one associated to the second
largest eigenvalue and so on. Eigenvalues are normalized between 0 and 1.
4.5 Stimulus
Spatio-temporal patterns can be generated to create stimulation patterns.
Figure 4.65: Preview for Stimulus Area. Select the type of stimulus you want to define / inspect
Note: You can build stimuli for region-based and surface-based simulations
4.5. Stimulus 59
User Guide, Release 2.3-16437
Figure 4.68: Preview for selecting the focal points of a Surface Level Stimulus
On the right column you will have the list of the selected focal points. You can delete them independently.
Hint: The spatial pattern will be centered around the focal points.
Finally, click on Save New Stimulus Surface button to create the new stimulus entity; but do not forget to give it
a meaningful name (left column Display name input field).
Regardless if the current Stimulus entity is stored or not yet, you can visualize the evolution of the spatio-temporal
Tip: You can increase the complexity of a stimulus pattern by building on top of one Stimulus entity.
For an example on how to do it, please read the Test Cases in the User Guide document.
4.5. Stimulus 61
User Guide, Release 2.3-16437
4.6 Connectivity
In this area you can edit two types of TVB connectivity objects:
• long-range connectivity and,
• local connectivity.
You can also download connectomes from the Allen Mouse Brain Connectivity Atlas.
4.6. Connectivity 63
User Guide, Release 2.3-16437
Hint: In the Connectivity Editor only one quadrant is displayed at a time. You can select which quadrant is
shown by accessing the quadrant selector button in the upper left corner of the matrix display.
Assuming that the connectivity matrix is sorted such that the first half corresponds one single hemisphere:
• quadrants 1 and 4 will represent the intra-hemispheric connections,
• and quadrants 2 and 3 will be the inter-hemispheric connections.
4.6. Connectivity 65
User Guide, Release 2.3-16437
TVB enables you to save a new Connectivity object by clicking on . This entity can be used later on in
TheVirtualBrain Simulator.
You can save a particular selection. Click the Select Nodes button and the selection component will be shown.
Enter a name for the selection and click save.
The Weights button opens a menu to perform basic algebraic operations on a group of edges. You can select
multiple nodes from the current connectivity (by default all nodes are selected); thus you will end up with two
sets of nodes: the set of selected nodes and the set of un-selected nodes. These two sets of nodes, determine four
categories of edges:
• In –> In: are only the edges connecting the nodes of the selected set.
• In –> Out: are the edges that connect nodes in the selected set (rows) to nodes in the unselected set
(columns).
• Out –> In: are the edges connecting nodes in the unselected set (rows) to nodes in the selected set (columns).
• Out –> Out: are edges connecting pair of nodes in the ‘unselected set’.
Click on the Apply weight change button to perform the selected operation on a group of edges.
Example: HOW TO REMOVE INTER-HEMISPHERIC CONNECTIONS
1. Using the Quick select remove all nodes from the right hemisphere.
4.6. Connectivity 67
User Guide, Release 2.3-16437
The Connectivity editor will be aware of two sets of nodes: the ones in your selection (green
nodes) and the ones that are not selected (white nodes).
5. Then you can proceed to perform some operations on the edge values.
The four categories of edges in this particular case are:
• edges IN-IN: intrahemispheric edges from the left hemisphere.
• edges OUT-OUT: intrahemispheric edges from the right.
• edges IN-OUT: interhemispheric edges in quadrant 2 (Q2)
• edges OUT-IN: interhemispheric edges in quadrant 3 (Q3)
6. Select operation “Set(n)” for edges OUT-IN, set the value to 0 and then press Apply.
The inter-hemispheric connections are gone. Do not forget to select all the nodes again before
saving your new matrix. To do so click the select all button in the selection dropdown.
9. Once you have your new matrix, you can launch the connectivity visualizers and check that these connections
are not there any more.
Warning:
• TVB does not handle unknowns such as NaNs or Infs.
• If your connectivity matrix contains negative values, such as -1 values you should either set these values
to zero or an estimated value based on your research assumptions.
Viewers
Connectivity 3D Edges
This connectivity visualizer allows you to see the structural information as a base model part of TVB.
4.6. Connectivity 69
User Guide, Release 2.3-16437
The 3D semi-transparent surface around the connectivity nodes, whether it is the cortical surface or the outer-skin,
is used just for giving space guidance.
You can select an individual node and right-click on it to activate the incoming or outgoing edges.
For each node you can choose a different color to apply to its edges.
Figure 4.86: Preview for Connectivity Viewer 3D Edges - Coloring incoming / outgoing edges
Connectivity 2D Viewer
A 2D representation of the connectivity matrix nodes and edges.
There are three main views (projections):
• Left sagittal view
• Transverse view
• Right sagittal view
Nodes are drawn as circles and the connections as lines. Only the selected nodes are shown.
4.6. Connectivity 71
User Guide, Release 2.3-16437
To display the measures in the 3D view check the Metrics details checkbox. Nodes will be displayed as colored
spheres. The size of the sphere is proportional to the measure labeled Shapes Dimensions. The color comes from
the current color scheme and is determined by the measure labeled Node Colors.
Figure 4.88: 3D view of a connectivity measure. Node size is defined by the Indegree. Node color is defined by
node strength.
To display the measures in the 2D views click the Show all button.
Nodes are draws as circles, their size proportional to the measure labeled Shapes Dimensions. Their color is
determined by a threshold and the measure labeled Node Colors. Nodes with values above the threshold will be
red and those whose value are below the threshold will be green.
Tip:
If you wish to change:
• the color threshold,
4.6. Connectivity 73
User Guide, Release 2.3-16437
Figure 4.89: Preview of 2D Connectivity Viewer (left lateral view). Node size is defined by the Indegree. Node
color is defined by node strength, threshold is 40.
Space-Time
This is a three-dimensional representation of the delayed-connectivity structure (space-time) when combined with
spatial separation and a finite conduction speed. The connectome consists of the weights matrix giving the strength
and topology of the network and the tract lengths matrix gives the distance between pair of regions. When setting a
specific conduction speed, the distances will be translated into time delays. The space-time visualizer disaggregate
the weights matrix and each slice corresponds to connections that fall into a particular distance (or delay) range.
The first slice is the complete weights matrix. Click on any of the subsequent slices to see the corresponding 2D
matrix plot.
4.6. Connectivity 75
User Guide, Release 2.3-16437
Figure 4.92: Connections that are between 0 and 2.84 ms, for a conduction speed of 9 mm/ms
Figure 4.93: Connections that are between 5.68 and 8.53 ms, for a conduction speed of 9 mm/ms
4.6. Connectivity 77
User Guide, Release 2.3-16437
FIVE
TheVirtualBrain has several flavors of scripting interfaces. These are powerful programmatic interfaces. Unlike
the GUI they are not meant be used remotely and their leaning curve is steeper.
They are a great tool to build a reproducible workflow. The sequence of actions performed in the GUI are recorded
as operations but a python script using the console interface is more detailed and exact.
From these interfaces you also have full access to the API’s of TVB.
The interfaces differ in what shell is used and in how many TheVirtualBrain services they use.
79
User Guide, Release 2.3-16437
To work interactively in the Python shell you need a few tvb modules, so typing something like the following will
be useful in this profile:
from tvb.simulator.lab import *
The above line will import all the scientific simulator modules as well as some datatypes that wrap important data
as the Connectivity matrix and cortical Surface. Afterwards, you can use the terminal as a regular python shell.
The script (distribution) is located in the bin folder and it has platform specific terminations.
The distribution script can be used to launch other profiles as well. The WEB_PROFILE will start the web
interface. The following has the same effect as tvb_start
$ ./distribution.sh start WEB_PROFILE
Using the distribution script allows you to give additional options. The -reset option will clean the TheVirtualBrain
folder before starting the web interface
$ ./distribution.sh start WEB_PROFILE -reset
SIX
The primary purpose of The Virtual Brain platform is to simulate whole brain dynamics. A simulation pipeline
has different stages. The most fundamental stage is building a realization of a computational model which we
call a large-scale brain network model. This model is constituted by a set of structural and functional components
linked together, completely creating a particular model of the brain.
The following document is a generic description of what we often call a “minimal structural dataset for TVB” and
“a complete dataset”. The aim of this document is to specify the different pieces of data required to derive the
structural skeleton/substrate of a BNM. Hopefully, experts in the field of data acquisition will help us completing
and improving our description.
A complete dataset should:
• provide the history of the acquisition/processing protocols (traceability);
• be in a standard format to perform analysis with different toolboxes;
• have the Minimal Structural Dataset to derive a self-consistent set of files used in TheVirtualBrain. This
minimal dataset will permit users to build large-scale brain network models and save their simulated data
under different output modalities (eg, EEG, MEG, fMRI).
• increase reproducibility of the results.
Note: the following definitions are not definitive, if you come across with a better categorization, please let us
know.
83
User Guide, Release 2.3-16437
they came and how they were processed is a bad practice and only detrimental for your own research project
(takes a lot of time and it’s not reproducible). We can’t provide any meaningful help to integrate/check or validate
incomplete datasets.
Ideally, any volumetric data (e.g., in NIFTI format), surface data (e.g., GIFTI format) or combination thereof
(e.g., CIFTI format) should be provided in their RAW format, and if any pre-processing was performed on the raw
data, associated data such as the region centres and parcellation mask should be provided in the same coordinate
system as the cortical mesh (i.e., self-consistent dataset). The meaning of the (x,y,z) coordinates depends entirely
on how the volumetric file was generated. It is possible to set any coordinate system you want (“native”, “mni”,
“talaraich”) depending on the processing you apply to your data. A region centre, for example, would be a single
spatial location in 3D. This location is specified by three numbers (x,y,z), these numbers should ideally represent
mm and must be relative to an origin (x=0, y=0, z=0). The “same coordinate system” means that the origin is in the
same location relative to the head, and that the axis(x,y,z) points in the same direction with the same orientation.
Note: Add references to the libraries and software that are available for NIFTI-1 TVB also has a
reader. Not the same case for NIFTI-2 and CIFTI. FieldTrip is the only one providing CIFTI i/o
functionality.
In the case of a parcellation mask, each voxel contains an integer corresponding to a specific region (numeric
labeling). This means, assuming voxels of 2x2x2 mm, the mask would consist of roughly 100x100x100 (ie, 1
million) voxels. The range of the integer number in each of these voxels should correspond to the number of
regions (or rows ) in the parcellated connectivity matrix. Some voxels may contain no number or say -1, to
specify that that piece of space doesn’t belong to a region, for example if it lies outside of the head. These type of
conventions should be specified and documented. A list with the region names/labels and corresponding integer
index should be provided.
How should region labels and names look like provided with the mask?
A region label is a short unique identifier, a region or area name usually refers to a human readable
description. Examples for one region/name would be something like ‘label: RM-TCpol_R’ / ‘name:
right temporal polar cortex’. Ideally, a reference to the original atlas/template should be provided as
well. Notice that the correspondence between integer values in the parcellation mask and anatomi-
cal/human readable labels should be provided if they are not specified in the volume file.
Are region labels essential?
From view point of the implementation of The Virtual Brain the labels are essential.
The surfaces describing a subject’s head: skin, skull, cortical surface. See the description below.
A Minimal Structural Dataset For TVB:
All 3D coordinates should be consistent, i.e., vertices, parcellation masks, and region centres should
be in the same units, axis orientations, alignment, etc.
A minimally-complete connectivity data set for TVB
should include the following:
• Mesh surface for the cortex (regularised, continuous and complete per
hemisphere, that is, there should be no holes in the surface and it should be possible to
unambiguously define an inside and an outside, in other words, each hemisphere should
be topologically spherical):
• vertices (Cartesian (x,y,z))
• triangles (triplets of indices into the vertices array, TRIANGLES, but not
generalised polygons)
• Parcellation:
– Spatial mask, 3D, PROPERLY ALIGNED WITH THE SURFACE, i.e. coor-
dinates, orientation should be IN THE SAME SPACE.
– Labels for all regions composing the parcellation/connectivity data.
– A clear delineation, if not explicit in the labels, between cortical regions and
subcortical structures.
• Region centres (Cartesian (x,y,z), consistent with surface, mask, etc.), for all regions
composing the parcellation/connectivity data.
• Connectivity (DSI):
– Connection strength/s between regions.
– Tract length between regions.
Ideally
For a complete structural dataset, we should also have:
• Connectivity: mainly Connection strength between regions.
– This should include information specifying the directionality. That is, if the data is
provided as a matrix rather than a file format including meta-data such as graphml,
directionality should be clearly and unambiguously specified.
• Mesh surfaces for:
– inner-skull: boundary between the brain and the skull,
– outer-skull: the boundary of between the skull and the skin
– outer-skin: boundary surface between the skin and the air (for EEG/MEG monitors)
• Basic additional information:
– Units: tract lengths, coordinates etc (mm).
– Units: strength/weights units, (au) if none.
– additional relevant information...
Guidelines to import the data into TVB
Currently we have some guidelines describing what data fields and in which format users can import
different components of a complete dataset (connectome, surface, sensors, gain matrix for eeg, etc...).
• MRtrix: https://www.mrtrix.org/
• CAmino: http://cmic.cs.ucl.ac.uk/camino/
• BrainVisa: http://brainvisa.info/
MRI Processing/Analysis/Modeling platforms:
• SPM: http://www.fil.ion.ucl.ac.uk/spm/
• Fieldtrip: http://fieldtrip.fcdonders.nl/
• Brainstorm: http://neuroimage.usc.edu/brainstorm/
Data exchange/db platforms:
• The Human Connectome Project: http://www.humanconnectome.org/data/
• XNAT: http://xnat.org/
Glossary
Space Coordinate systems:
• MNI (we encourage to use this one)
• Talaraich
• ref: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined
Atlases:
• In order to compare different brains, it is necessary to register them to a common space by using a
template.
• See http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases
Structural Anatomical Parcellations:
• Kotter (macaque)
• Broadmann
• FSL AAL 90
• Hagmann (based on Desikan)
SEVEN
The purpose of this chapter is to provide some details about the way TheVirtualBrain instance/installation can
exchange data with other TheVirtualBrain instances, or with other applications available in the neuroscience com-
munity. Currently, there are several applications that can analyze and record brain activity in different formats,
and one of the goals of TheVirtualBrain is to allow users from different backgrounds to have quick access to their
recorded data.
To achieve this, we have implemented some mechanisms to IMPORT / EXPORT data at different levels and
formats:
• Project - As you may know, TheVirtualBrain data is organized in projects and one of the options is to
transfer projects (with attached data) entirely between TheVirtualBrain installations. This mechanism can
be used only between TheVirtualBrain applications, and no other external tools.
• Simple Data - This feature allows you to transfer independent data (e.g. surface, connectivity, time series)
between two TheVirtualBrain instances or between TheVirtualBrain and an external application. As you
may note later, depending on the targeted application, data can be exchanged in a custom TheVirtualBrain
format or a commonly used format used in the neuroscience community (e.g. H5, GIFTI, NIFTI ...)
Warning: During export and import operations TheVirtualBrain does not apply any space transformation, so
users have to ensure their data (especially in case of import) is generated/stored in the same space.
TheVirtualBrain‘s default project contains data in a space where the nose is pointing in the direction of -y and
the left ear in the direction of +x. The space is right handed: +z points up.
Before proceeding with more details about data exchange, it would be helpful to give you an idea how TheVirtu-
alBrain stores its data. Basically there are two major storage areas:
1. Database - where general information/metadata and relations between stored elements are stored (e.g. as-
signment of data to a project, data metadata - creation date, owner, etc...)
2. Disk - here we store “the real” data in a HDF5 format (http://www.hdfgroup.org/HDF5). This means that
for each data type (e.g. surface, connectivity, time series) we store on the disk, we have a folder containing
a HDF5 / H5 file which contains all data (e.g. vertices, triangles, etc.). This format has the following
advantages which made it an optimal solution for our product:
• can store huge pieces of data and can access it very fast (even random access)
• can organize data in a tree structure (groups and leaves)
• allows assignment of metadata on every level
• is a format agreed upon by the community and can be used/opened with different tools/languages
(Python, Matlab, java, C++ ...)
An important aspect of TheVirtualBrain storage is that each data/datatype has a GUID, which makes it unique on
every system where that data exists.
93
User Guide, Release 2.3-16437
File Format
Export results are a ZIP file (named: date + project name), containing in a folder structure all the details about the
project. More specifically, it contains:
• A root level XML file with details about the project itself
• Folders for each operation performed as part of the project
• Operation folder contains a view model H5/HDF5 file with details of the operation and a set of H5/HDF5
files for each data type generated during that operation.
Note: each of the H5 files has a structure as described above in TheVirtualBrain Storage section.
File Format
To import a project, the user has to provide a ZIP with the same structure like the one described above for ‘Export
Project’.
Important: The same project cannot be imported multiple times on the same machine, because each project/data
has a unique identifier (GUID).
http://www.mathworks.com/help/matlab/ref/hdf5read.html
Note: The HDF5 functionality referenced above was only introduced in Matlab 2011a.
Note: In the future other data formats might be supported as export format from TVB, but for now, the HDF5 is
the only format available at export time.
Warning: In case the imported data includes/represents a surface, TheVirtualBrain does an extra check
regarding the number of vertices of that surface. Basically you can not import into TheVirtualBrain a surface
that has more vertices than a MAX value.
This MAX value is defined and can be changed in the Application Settings area, depending on the configura-
tion/performance of your hardware.
File Format
1. If user uploads a ZIP file, the system has to decide if it represents a datatype with links or a datatype group.
More specifically, if it finds folders inside the zip file, it will know it is a DatatypeGroup import, otherwise
it is an import with links.
2. If user uploads a simple HDF5/H5 file, the system assumes that a simple data type is imported and tries to
process the file accordingly. Basically it reads the metadata stored in the root node group and determines
the data type (e.g. connectivity, time series ...). Based on the detected type of data, the rest of the details are
filled and the object is stored in the database.
File Format
For import, TheVirtualBrain users can upload either .nii or .gz files containing NIFTI data in the format specified
by [http://www.nitrc.org/projects/nifti]
File Format
During import, the user might upload either a TXT file or a zipped TXT in bz2 format. This TXT file should
contain data separated by spaces and grouped as follows:
1. each line contains details of a sensor
2. for each sensor there are four or seven columns
• first column represents the name / label of the sensor
• next three columns represents the position of sensor (x, y, z)
• next three columns (if present) represents the orientation of sensor. These are required only for MEG
sensors.
File Format
ZIP file should include files with the following naming schema and format:
1. If any file name contains “weight”, it will be considered as the container for connectivity weights and the
parse process expects the following format:
• text file containing values separated by spaces / tabs
File Format
The uploaded ZIP file should contain files with a specified naming schema and format as follows:
1. If any file name contains “vertices” it will be considered as a container for surface vertices and parse process
expects the following format:
• this is a space separated values file
• each row represents position of a vertex
• each row should have three columns (x, y, z as float values)
2. If any file name contains “normals” it will be considered as a container for surface vertices normals and
parse process expects the following format:
• this is a space separated values file
• each row represents a vertex normal
• each row should have three columns (with float values)
3. If any file name contains “triangles” it will be considered as a container for surface triangles and parse
process expects the following format:
• this is a space separated values file
• each row represents a triangle
• each row should have three columns (int values) - each value representing the index of a vertex from
the vertices array. This indices could be ZERO based or not, depending on the source which generated
the surface. The user is required to specify this at import time.
There are systems/applications that generate and store surface data in two parts: for left and right side. If this is
the case, the imported ZIP file is expected to contain text files with the same naming and format, but the name
should contain the letter “r” or “l” at the end of the suffix (e.g. <trianglesl.txt> and <trianglesr.txt>)
File Format
An overview of the OBJ file format can be found on Wikipedia TVB supports only a subset of the specification,
meaning that only geometry data is considered and accepted forms for faces attributes are: triangles or quads. We
ignore at import time features such as texture coordinates, materials and groups.
File Format
This is a standard format, supported by a large community so all details about it and samples can be found here:
http://www.nitrc.org/projects/gifti
Note: At this moment TheVirtualBrain supports only import of data from a single .gii file. It does not handle
cases when metadata is defines in .gii (XML) file and real data in external files.
File Format
For this upload we expect a text file (possibly compressed with bz2). The text file should have no headers, only
numeric values separated with spaces.
The file is expected to hold a vector of length number of vertices in the Cortical Surface. The numeric values
should be in the interval (0...n-1), where n is the number of regions in the connectivity.
File Format
For this upload we expect a single text file, with numeric values, space and line separated. The numeric values in
the uploaded file should hold a matrix of size (n, m). n is the number of sensors, and m is the number of nodes.
When the projection matrix we want to import is a Surface Projection Matrix, m will be the number of vertices in
the target Cortical Surface. When the projection matrix is a region-level one, m will be the number of regions in
the Connectivity. Having headers in the text file is not accepted. An incorrect number of values (lines or rows) in
the Projection Matrix will also raise an exception.
EIGHT
COPYRIGHT NOTICE
8.1 CITATION
When using The Virtual Brain for scientific publications, please cite it as follows:
Paula Sanz Leon, Stuart A. Knock, M. Marmaduke Woodman, Lia Domide, Jochen Mersmann, Anthony R.
McIntosh, Viktor Jirsa (2013) The Virtual Brain: a simulator of primate brain network dynamics. Frontiers in
Neuroinformatics (7:10. doi: 10.3389/fninf.2013.00010)
101