This version of the plugin, represents a complete overhaul, refactoring and redesign of the previous version. Major new features include the functionality of browsing the opened VMRs, support for protocol files (with some restrictions), new interactive plots and numerous of bug triages and fixes.


The purpose of the plugin, is to provide an extra layer in the analysis of brain connectivity, through a graph theoretical approach. It is comprised of two distinct entities, one is the brainnets, and the other, the plugin itself. brainnets is our in-house library for dealing with graph networks. The backbone network algorithms and features are implemented in this library. The plugin on the other, acts as GUI and glue between BrainVoyager 21.x and brainnets. It helps the user load the requested data, configure an analysis pipeline, compute and report different graph features and metrics, and visualize the results in an interactive manner.

Basic concepts of Graph Theory

Here shortly, we will give the basic concepts and notations for graph theoery as usually used. For more comprehensive materials on the topic, the interested readers are encouraged to consult (Sporns, 2010).

A set of vertices (or nodes) \(V\) and their associated edges (or connections) \(E\), make up a graph structure \(G = (V, E)\). The edges \(E\) can be either weighted (\(W\)) or binary (\(B\)) in which case they just indicate the presence of a connection between the nodes. Moreover, we can further distinguish the types edges based on the directionality of the connections, directed (\(D\)) or undirected(\(U\)).

Below is a sample connectivity matrix (weighted) and its representation as a graph structure. For the adjacency matrix, notice the symmetricity,which also implies undirectionality. For the graph, notice that the lines’ weights are relative to the connections’ weights as well as their color.


The minimum required version, is BrainVoyager 21.x. Make sure you have the plugin installed into the proper directory and it’s visible and accessible in the Plugins menu. Also, you have to have currently opened your VMR files beforehand. The plugin will fetch the the list of currently opened VMR files and prompt the user to select which one to work with. In case you load a VMR after you execute the plugin, it will not show up.

Supported formats

File formats

The curernt version supports VMR/VTC and VOI files. The protocol (PRT) files, for now support triggers only in Volume Resolution. Also, the begin and end volume must be identical. For example, consider the contents of the following protocol file, how the triggers are defined:

NrOfConditions:     4

  31   31
  65   65
  75   75
  89   89
Color: 255 0 0

This setup is experimental, and we plan to make it more robust.

Transformation spaces

We have tested ACPC, MNI and TAL/aTAL spaces with different datasets.


The voxels are accessed without any interpolation (i.e. trilinear) whether or not the resolution of the VMR/VTC pair is a match. In any case the voxels are access directly by their X, Y, Z coordinates (transformed into the target space). Consider the following pairs of resolutions:

VMR VTC Behavior
1x1x1 1x1x1 If both resolutions match, the resulting time series will be identical with BrainVoyager.
3x3x3 1x1x1 The accessed voxels will be different from BrainVoyager because we do not (for the time being) interpolate the values of the voxels (i.e. trilinear).


The latest version of the plugin, supports an array of settings stored externally in an ini file. The ini file must be named cganalysis_plugin.ini and placed in the same directory with the plugin (i.e. ~/Documents/BVExtensions/Plugins64/).

The contents of the plugin may look like the following:



In the future more settings will be exposed to the user.

Group plugin

The settings in this group are of general nature. For example enabling verbose logging capabilities for the plugin, or the number of threads to use.

For now it is a placeholder.

Group brainnets

The settings in this group affect and control some aspects of the library brainnets.

  • Saving matrices and time series.

    Variable Default Value Accepted Values Description
    dump_all false true or false Enables/disables the dumping of the matrices.
    dump_output_dir c:/Temp/ An existing directory

    The produced files in sequence are:

    # Step Filename Description
    #1 connectivity_ts.csv Extracted time series; they will be used for estimating the connectivity.
    #2 correlation_mtx_0.csv Estimated connectivity matrix.
    #3 correlation_mtx_0_treatment_pass_1.csv 1st treatment pass; filter positive, negative or absolute values from the connectivity matrix.
    #4 correlation_mtx_0_treatment_pass_2.csv 2nd treatment pass; replace NaNs and INFs with 0.0.
    #5 correlation_mtx_0_mst.csv Optional, the MST-filtered matrix.

    The final connectivity matrix is given by Step #4, or if enabled, Step #5.

Tab: Data

Below, is the main window you will be prompted with, when you execute the plugin. You will have to load a pair of VTC / VOI files and provide a sample name for the current analysis. It is recommended to fill in a short, meaningful name.

You may also, optionaly, load and use a protocol (PRT) file. If there is such a protocol referenced in the VTC file, it will be loaded and linked automatically. In case you use a protocol, the connectivity matrices will be estimated invdividually for each condition.

In either case, in case of an error occuring (i.e. the transformation spaces do not match, or the resolution is not supported) you will be promted to take action.

As soon as all the files have been loaded successfuly, you will no longer be able to load other file on the specific subject.

Loading Data