The source code for BrainSuite is available on the download page. Except where otherwise noted, the source code is provided under a GPL v2 only license. GUI source code is provided under a LGPL v2.1 only license for compatibility with Qt’s LGPLv3 license.
We have built the official releases using the following compilers on the following platforms:
- Mac: clang, Apple LLVM version 10 (clang-700.0.72)
included with XCode.
- Windows: Microsoft Visual C++ 2015 compiler
Visual Studio Express 2015 available for free from Microsoft
- Linux: clang 3.8
We recommend using these compilers to ensure cross-platform consistency.
The Qt toolkit is available from: http://www.qt.io/developers/.
The current official BrainSuite21a builds use version 5.15.2 of the Qt Toolkit.
zlib v. 1.2.11 is included in the 3rd Party directory of the BrainSuite source code package.
Available from http://www.zlib.net
Unzip the source file BrainSuite21a_src.zip, which will unpack the BrainSuite21a_src folder. Within this folder are the following subfolders:
- BrainSuite 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
Building on Mac OS X / 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.
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
to install these files to your home directory, ~/BrainSuite16a1/bin/$MACHTYPE. You may want to move these to ~/BrainSuite21a/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
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.
The GUI may be built using QtCreator. Open the BrainSuite21a.pro file, located in the BrainSuite directory.
Building on Windows
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.
The GUI may be built using QtCreator. Open the BrainSuite21a.pro file, located in the BrainSuite 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.
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:
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:
For instructions on building BDP, please see https://brainsuite.org/processing/diffusion/building-bdp/