Applications

The applications module is where all end-user applications live. Python files in this modules should be executable. This module also contains the configuration files used in braviz.readAndFilter.config_file.

This page will contain an overview of the scripts located in this module and some guidelines on creating new applications. For documentation from the user point of view please look at

Visual Analytics with Braviz

The braviz menu

The braviz menu is the main entry point for users. It provides an overview of the available tools and provides access to them. But it also performs several important tasks on the background.

When an application icon is clicked in the menu, it spawns a new python interpreter with a command line similar to

python -m braviz.applications.<app_name> <scenario_id> <server_broadcast> <server_receive>

The parameters are

  • app_name : The application script
  • scenario_id : The id of the initial scenario to load in the application. It is 0 if called from the main icon, or the corresponding id if called from the scenarios dialog
  • server_broadcast : The address that will be used for broadcasting messages.
  • server_receive : The address in which the broker will receive messages

Notice that the broadcast and receive addresses will be printed when the server starts. You may use this addresses to connect to the server from external applications.

For an overview of the menu from the user point of view

see Braviz Menu

Graphical applications

Visualize geometry

Subject Overview

Subject overview screenshot

Visualize geometrical data from a single subject with tabular data as context.

See User documentation.

Sample Overview

Sample overview screenshot

The sample_overview application can load geometric data for several subjects in the same display. Visualizations are created as scenarios in the subject overview application. They are arranged in rows with respect to a nominal variable and sorted from left to right with respect to a real variable.

See User documentation.

Explore fMRI

Explore fmri screenshot

This application specializes in fMRI data. It shows a timeline with the experiment design and the raw bold signal at the bottom.

See User documentation.

Check Registration

Check registration screenshot

Compare two images in order to check if a registration algorithm was successful or to compare images from different subjects.

See User documentation.

Create geometry

ROI Builder

Roi builder screenshot

Position spherical ROIs in the different subjects. Sphere positions and size can be interpolated using one of the common spaces as intermediate stop. Images and cortical surfaces can be used as guides to position the sphere. Fibers and scalar values inside the sphere are shown to the user.

See User documentation.

Logic bundles

Logic bundles screenshot

Define new fiber bundles based on ROIs, segmented structures and logical operations.

See User documentation.

Measure

Measure application screenshot

Perform linear measurement over an orthogonal plane.

See User documentation.

Statistics

Anova

Anova application screenshot

Fit anova regressions, and visualize the results, based on the variables in the database. It uses rpy2 to connect with the R statistical software where the actual calculation takes place.

See User documentation.

Linear Model

Linear model application screenshot

Fit linear models and visualize the results, with the database variables. Variable normalization and model fitting are done in R via rpy2.

See User documentation.

Correlations

Correlations application screenshot

Explore a dataset looking for potential correlations.

See User documentation.

Parallel Coordinates

Parallel coordinates application screenshot

Explore relationships among several variables using a parralel coordinates display.

See User documentation.

Utilities

Import from excel

Import variables from an excel file into the database

See User documentation.

Export to csv

Export variables from the database into a csv file

See User documentation.

Sample select dialog

Select sub-samples and crate new sub-samples.

See User documentation.

Command line applications

Parse spss files

Access a spss *.sav file to read variables and metadata, specifically

  • variable descriptions
  • variable types
  • nominal variable labels
  • numerical variable values
  • textual variable values

To see help on this command, call it with the -h flag.

usage: parse_spss_file.py [-h] [-d] [-m] [-c] [-s] [-v] spss_file index_col

Import data from spss files

positional arguments:
  spss_file       Path to a spss file (usually with .sav extension)
  index_col       Variable containing subject indices

optional arguments:
  -h, --help      show this help message and exit
  -d, --data      Read numerical data
  -m, --meta      Read variable descriptions, type, and labels for nominal
                  variables
  -c, --comments  Read text variables as comments for each subject
  -s, --save      Add the read information to the database
  -v, --verbose   Print data to the terminal

Warning

Using the -s will overwrite existing values in the database

Calculate descriptors

Calculate geometric descriptors from segmented structures (ASEG only) in all available subjects. The results are saved into a database called descriptors.sqlite in the dynamic data root (see braviz.readAndFilter). The geometric descriptors are

  • Volume
  • Surface Area
  • Length of longest axis
  • Length of second longest axis
  • Length of third longest axis

All three axes are orthogonal. The output database contains a single table called “descriptors” with columns: subject, structure, volume, area, d1, d2 and d3.

The application takes as argument the number of processes to use in the calculation, for example to split the job on 4 processes use

python -m braviz.applications.calculate_descriptors 4

Populate cache

Fill the braviz disk cache (see braviz.readAndFilter.cache) with commonly used data. The script takes as argument the number of processes to use. For example, to use 3 processes call it like

python -m braviz.applications.calculate_descriptors 3

Braviz web server

Launches the Tornado web server. It will listen for http requests on port 8100.

Notice that D3 visualization applications like parallel_coordinates will attempt to launch the server process if it is not found. It should not be required to launch it manually.

The server is capable or relying braviz communication messages (see Braviz Inter Application Communication) to web applications.

For compatibility it takes the same arguments as the applications launched from the menu, but ignores the scenario argument.

Import comments

Reads textual comments from an excel table and uploads them to the subject comment (see User Data) field of the data base.