The source code for BDP is available on the download page. Except where otherwise noted, the source code is provided under a GPL v2 license.
We have built the official releases using the following compilers on the following platforms:
- Mac: clang, Apple LLVM version 7.0.0 (clang-700.0.72)
included with XCode.
- Windows: Microsoft Visual C++ 2013 compiler
MSVC 2013 express edition available for free from Microsoft
- Linux: clang 3.4
We recommend using these compilers to ensure cross-platform consistency.
BDP is currently written in a mainly in Matlab. In order to compile SVReg Matlab code into an executable, we need Image Processing Toolbox and Compiler Toolbox. The Parallel computing toolbox is recommended.
To compile BDP, open Matlab and navigate to the
src\packaging_tools folder of the repository. The two main functions that you’d need are:
CompileBDPMexFiles.m: compiles mex functions.
CompileBrainSuiteDiffusionPipeline.m: compiles Matlab code and generates executables.
Unzip the source file BDP16a_src.zip. Within this folder are the following subfolders:
- BDP_statistics The source codes for statistics computation.
- data_handling_tools Codes for data input and outputs.
- diffusion_tools Source codes implementing algorithms for diffusion imaging.
- helper_tools Source codes for general utilities.
- 3rdParty Third party libraries used by BDP
- image_registration_tools Source codes for image registration tools in BDP
- main_functions Main wrapper source code for BDP
- mat_files Mat files read by BDP at runtime
- optimization Source codes for optimization methods used by BDP
- operators Source codes for generating matrices for operators used by BDP
- visualization_tools Scripts for visualization of outputs by BDP
It will compile all required mex functions. Note that you should change the
generated Makefile in Linux and Mac to use clang instead of gcc.
The MATLAB code for BDP can be compiled to generate packages by running following:
CompileBrainSuiteDiffusionPipeline --package 99aRC9 --build 9999
where, `99aRC9` is the name of release and `9999` is four digit build number. This will generate relevant tarball/zip for distribution. Note that above step requires `mcc` command from MATLAB Compiler toolbox.