Building BrainSuite

Building BrainSuite16a1

The source code for BrainSuite is available on the download page. Except where otherwise noted, the source code is provided under a GPL v2 license.

System/Compiler Requirements

C++11 compiler

We have built the official releases using the following compilers on the following platforms:

We recommend using these compilers to ensure cross-platform consistency.

Qt Toolkit

The Qt toolkit is available from: http://www.qt.io/developers/.
The current official BrainSuite16a1 builds use version 5.6.1 of the Qt Toolkit.

zlib

zlib v. 1.2.8 is included in the 3rd Party directory of the BrainSuite source code package.
Available from http://www.zlib.net

Source Tree

Unzip the source file BrainSuite16a1_src.zip, which will unpack the BrainSuite16a1_src folder. Within this folder are the following subfolders:

  • BrainSuite16a1 The source code for the BrainSuite graphical user interface.
  • corticalextraction The core programs and routines used for BrainSuite’s cortical surface extraction functionality.
  • curvelib A set of classes for operating on curve data (e.g., sulcal curves or diffusion streamlines)
  • diffusion A set of command line tools and classes used for processing diffusion MRI data
  • include A set of header files used by BrainSuite
  • vol3d A set of classes for operating on 3D volumetric image data
  • surflib A set of classes for operating on surface mesh data
  • 3rdParty Third party libraries and headers used by BrainSuite

Mac & Linux

Mac & Linux

You will need zlib installed on your system. If you do not already have it, you may either download a new copy from zlib: http://www.zlib.net/ or use the one in the 3rdParty directory. Follow the build instructions for your particular machine. You will also need GNU make.

The command line tools and GUI can be built separately in either order.

Command Line

From the command line, navigate to the corticalextraction directory. Run the script ./buildall.sh to build the software. This will call a series of make files to compile: (1) the vol3d and surflib libraries; and (2) the individual cortical extraction routines. This will create a set of binaries in the directory corticalextraction/bin/$MACHTYPE, where $MACHTYPE is the system variable describing the type of machine on which you are compiling (e.g., x86_64-apple-darwin14, x86_64-pc-linux-gnu). You can also run

./buildall.sh install

to install these files to your home directory, ~/BrainSuite16a1/bin/$MACHTYPE. You may want to move these to ~/BrainSuite16a1/bin/ if you are not sharing your home directory on multiple machines.

The diffusion tools can be built in the same manner. Navigate to the diffusion directory and run

./buildall.sh install

which will build odfmax, htrack, conmat, and dwisplit.

You can also build each of the programs individually by navigating to the tools directory and calling make.

BrainSuite16a1 GUI

The GUI may be built using QtCreator. Open the BrainSuite16a1.pro file, located in the BrainSuite16a1 directory.

Windows

Windows

Command Line

Open the corticalextraction.sln file in Microsoft Visual Studio (VS2013). Build the libraries first, then the command line tools. To build the diffusion tools, open diffusion.sln in Microsoft Visual Studio. You must have already built the libraries in corticalextraction.sln.

BrainSuite16a GUI

The GUI may be built using QtCreator. Open the BrainSuite16a.pro file, located in the BrainSuite16a directory. The required zlib libraries must first be built using Microsoft Visual C++. Make sure you build the correct version for the type of build you are making in Qt, e.g., 32-bit vs. 64-bit, MD vs. MT, Release vs Debug. Qt is dynamically linked, so build the MD versions of zlib.

additional tools

CerebroHelper

The BrainSuite GUI calls a command line program named CerebroHelper. We recommend using the official releases of this program.

CerebroHelper uses the AIR libraries, which are available from the UCLA Brain Mapping Center website:

http://www.bmap.ucla.edu/portfolio/software/AIR/

Please note that those source files are under the AIR software license. We have included the source code for cerebrohelper in the corticalextraction/cerebrohelper directory. You will need to first download and build AIR. The cerebrohelper.cpp file will need to be compiled using the AIR header files and linked with libRPW.a.

To avoid platform and compiler differences, build the AIR libraries and cerebrohelper using the clang compiler or Microsoft Visual Studio C++.

For example, if AIR has been extracted and built at /path/to/AIR5.3.0/, then this command:

clang++ cerebrohelper.cpp -I /path/to/AIR5.3.0/ -L /path/to/AIR5.3.0/src -lRPW -o cerebrohelper

will build cerebrohelper on Mac or Linux.

Building SVReg and BDP

For instructions on building SVReg, please see:
http://brainsuite.org/processing/svreg/buildingsvreg/
For instructions on building BDP, please see http://brainsuite.org/processing/diffusion/building-bdp/