Download‎ > ‎

Compile DSI Studio on Windows/Mac/Linux

Compile DSI Studio on Windows




1. Download Qt MinGW


Download qt-opensource-windows-x86-1.6.0-8-online.exe at https://www.qt.io/download-open-source/ and install [Qt 5.4][msvc2013 64-bit OpenGL] and [Qt 5.4][msvc2013 32-bit OpenGL] as well as [Tools][Qt Creator]

2. Download Visual Studio Community 2013


       Download VS2013 at https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx and install it.

3. Download DSI Studio source code, boost library, and TIPL library 


Download DSI Studio source code at https://github.com/frankyeh/DSI-Studio

Download boost library 1.57 at http://www.boost.org/users/history/version_1_57_0.html and unzip the file in a directory

There is no need to build boost for DSI Studio. Just copy the header files under the DSI_STUDIO_DIRECTORY/boost.

You also need to download TIPL  (https://github.com/frankyeh/TIPL) and put them under DSI_STUDIO_DIRECTORY/image. 

4. Build DSI Studio

        To run DSI Studio you may also need to download template files from the zip files provided from the download page.

Compile DSI Studio on Mac



1. Install Xcode


Xcode can be downloaded from https://developer.apple.com/downloads/index.action

Once should note that if you compile it on an older version of Mac, e.g. 10.5. Leopard. You may need to figure out the right version of Xcode for your system. Xcode 3.1.4 is the latest version that runs on 10.5 Leopard. If you already have that on your system DVDs, then you don't need to download it. Otherwise there are a fair number of bug fixes, so you may find 3.1.4 valuable.


        The newest version Xcode may not contain gcc for building boost library. To get gcc, open Xcode and select [Xcode] [preference].        
        Under the download tab, install the command line tools.

2. Install Qt


Download Qt installer at https://www.qt.io/download-open-source/ and install it. 

Download Qt creator from qt-project.org. 

3. Download DSI Studio source code, boost library, and TIPL library 


Download DSI Studio source code at https://github.com/frankyeh/DSI-Studio

Download boost library 1.57 at http://www.boost.org/users/history/version_1_57_0.html and unzip the file in a directory

There is no need to build boost for DSI Studio. Just copy the header files under the DSI_STUDIO_DIRECTORY/boost.

You also need to download TIPL  (https://github.com/frankyeh/TIPL) and put them under DSI_STUDIO_DIRECTORY/image. 


5. Build DSI Studio


Open Qt creator, load the dsi_studio.pro file and turns to the projects page->manage Kits. Under Qt version tab, you need to add in the complied qmake, which can be found in the Qt installation folder (under QTDIR/bin). Then under Kits tab, manually add a new make tool, select GCC X86_64 (use GCC X86_32 for 32-bit) for compiler, and the Qt version is the one that is just built.

Change build configuration to "Release". Run build all. it should build DSI Studio

6. Download accessory files

        You may need to download atlas and template from any packages listed in the DSI Studio download page. The template should be placed at dsi_studio.app/Contents/MacOS/dsi_studio whereas the atlas placed under dsi_studio.app/Contents/MacOS/dsi_studio/atlas

Compile DSI Studio on Unbuntu


A instruction is available at http://www.nemotos.net/?p=1878

Additional instruction for Linux Fedora

#
# Installiation Instruction for Linux Fedora
# By West, John at Indiana University – Purdue University Indianapolis
# 2013/02/15



The compiling was pretty much exactly the same. The difference is packages needed as prereqs are different in Fedora than in Ubuntu.

From step 1.1

> sudo apt-get install qt5-qmake qt5-dev-tools ---> sudo yum install qt qt-devel qt-create (NOTE: I installed qt-create while we were debugging, so that may not be necessary)

From step 3

> sudo apt-get install git ---> sudo yum install git
> sudo apt-get install libboost-all-dev ---> sudo yum install boost boost-dev
> sudo apt-get install zlib1g zlib1g-dev ---> sudo yum install zlib zlib-dev

I should also mention that this was done on Fedora 17 (possible other versions may have different issues) and that I installed the Nvidia drivers (replacing nouveau - open source nvidia drivers in Fedora) using the instructions on the following website: http://www.if-not-true-then-false.com/2012/fedora-17-nvidia-guide/ . Note, I followed the akmod-nvidia instructions under step 4. I'm not sure if doing kmod or kmod-PAE would affect things. Instructions for other Fedora versions are available as well.

Only other difference is that for Fedora (17 at least) qmake and qmake-qt4 are one in the same but only qmake-qt5 is provided as a link. So I had to use the qmake-qt4 command in step 8:

So in step 8:

> qmake ../src becomes qmake-qt5 ../src

Also, please note that the environment variable defined in step 11.3 did not work for the template. I had to store the template (NTU90_QA.nii.gz) in the same directory as the dsistudio executable.



Another instruction from Pete Hurd:

# installing DSI studio on Fedora 22 -Pete Hurd, Sept 2015.
# note: John West's notes has these packages ending in "dev" rather than "devel"

sudo dnf install qt qt-devel
sudo dnf install git
sudo dnf install boost boost-devel
sudo dnf install zlib zlib-devel
sudo dnf install qt5-qtbase-devel
sudo dnf install mesa-libGLU-devel
sudo dnf install gcc-c++

# vanilla 'sudo dnf install qt5-qtbase-devel' tried to downgrade a shedload of things, then failed....

sudo dnf install qt5-qtbase-devel-5.5.0

cd src
mkdir image
cd ..

# hit 'download' link in https://github.com/frankyeh/TIPL to download TIPL-master.zip,
# then unzip it and put the contents in 'image', so that that the file image.hpp is in the 'image' subdir.

mkdir build
cd build/
qmake-qt5 ../src

# then edit Makefile to add flag -std=c++11 to CXXFLAGS to allow 'auto' to work in the new school way

make

 DSI Studio needs several template images named HCP1021xxxx and a mask file named brain_mask.nii.gz. The other atlas files are optional. If included, they should be placed under a subfolder named atlas. You may find these files at https://www.dropbox.com/s/rq5khgmoyiye0op/dsi_studio_other_files.zip?dl=0

Additional note for RedHat and CentOS


   You may need to modify dsi_studio.pro

   include -lboost_thread-mt instead of -lboost_thread

   (information provided by Miro Drahos)


Installation Instruction for Debian

# contributed by Olivier Kaloudoff <debian@kalou.net>

To install DSI-Studio on your Debian system;
If you are using the squeeze (aka stable) distribution, add the 3 lines below to your /etc/apt/sources.list

# For DSI-Studio

deb http://s.kalou.net/apt wheezy main deb-src http://s.kalou.net/apt wheezy main
Then, perform
sudo apt-get update sudo apt-get install dsi-studio
If you are using the wheezy (aka testing) distribution, add the 3 lines below to your /etc/apt/sources.list # DSI Studio and boost backports
deb http://s.kalou.net/apt squeeze main deb-src http://s.kalou.net/apt squeeze main
Then, perform
sudo apt-get update sudo apt-get install dsi-studio




Comments