How-to build DSI Studio for Ubuntu 14.04 or later

DSI Studio is an open-source diffusion MRI analysis tool. We need to compile the software for Linux.
Note for Compile is found here, but it is a liitle bit out-of-date.
I could successfully finish compile the DSI Studio for Ubuntu 14.04 and 16.04. Below is what I did.

  1. Install gcc-5 and g++-5 (for Ubuntu 14.04)
  2. DSI Studio needs gcc-5 and g++-5 for compile. We can install them via PPA.

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt-get update
    sudo apt-get install g++-5
  3. Link gcc and g++ to gcc-5 and g++-5 (for Ubuntu 14.04)
  4. Just installing gcc-5 and g++-5 won’t have any effects on the machine.
    You can check the version of gcc and g++ by typing gcc –version and g++ –version

    gcc --version
        gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
    g++ --version
        g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

    In order to make gcc-5 and g++-5 available, we need to do the following;

    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10

    You should see something like;

    update-alternatives: using /usr/bin/g++-5 to provide /usr/bin/g++ (g++) in auto mode
  5. Install necessary files for compile
  6. We also need to install the following;

    sudo apt-get install qt5-qmake qt5-default
    sudo apt-get install git libboost-all-dev zlib1g zlib1g-dev

    Some may need to install libqt5opengl5-dev (Thank you Steven Baete for the Feedback!)

    sudo apt-get install libqt5opengl5-dev
  7. Prepare a working directory
  8. Prepare a working directory. We save files in this directory.

    mkdir dsistudio
  9. Get the Windows version of DSI Studio
  10. Download the Windows version of DSI Studio from this link and save it under working directory (dsistudio).
    Filename should be “”

  11. Get the source code from GitHub
  12. Now we get the source code of DSI Studio from Github. We also need “frankyeh-TIPL-xxxxxx(revision number).zip” to be downloaded. After unzipping, rename the folder as “tipl”, and move under src. (N.B. tipl used to be “image”, but it seems Frank changed the source. 16-Aug-2018)

    cd dsistudio
    git clone -b master git:// src
    mv frankyeh-TIPL-xxxxxxx tipl
    mv tipl src
  13. Compile
  14. Prepare a directory for build and compile.

    mkdir build
    cd build
    qmake ../src

    If it goes well, you should find dsi_studio under build directory.
    You may remove unnecessary files with make clean.

    make clean
  15. Packaging
  16. Windows version zip file has atlas and other files included. We make use of it.
    DLL files are for Windows, so we delete all of them.

    cd .. # Now you should be in the "dsistudio" directory
    cd dsi_studio_64
    find . -name '*.dll' -exec rm {} \;
    rmdir iconengines imageformats platforms printsupport
    rm dsi_studio.exe
    cp ../build/dsi_studio .
  17. Run DSI Studio
  18. Now you can run DSI Studio from the terminal.


    If everything works, the command brings up DSI Studio.

Print Friendly, PDF & Email

14 thoughts on “How-to build DSI Studio for Ubuntu 14.04 or later

  1. Hi,

    When I check gcc version, it returned:

    gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    g++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

    So I skipped step 1. and step 2.

    But ‘make’ returned this error:

    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/mainwindow.ui -o ui_mainwindow.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/tracking/tracking_window.ui -o ui_tracking_window.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/reconstruction/reconstruction_window.ui -o ui_reconstruction_window.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/dicom/dicom_parser.ui -o ui_dicom_parser.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/simulation.ui -o ui_simulation.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/view_image.ui -o ui_view_image.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/manual_alignment.ui -o ui_manual_alignment.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/tracking/tract_report.ui -o ui_tract_report.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/tracking/color_bar_dialog.ui -o ui_color_bar_dialog.h
    ../src/tracking/color_bar_dialog.ui: Warning: Z-order assignment: ” is not a valid widget.
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/tracking/connectivity_matrix_dialog.ui -o ui_connectivity_matrix_dialog.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/tracking/atlasdialog.ui -o ui_atlasdialog.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/dicom/motion_dialog.ui -o ui_motion_dialog.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/filebrowser.ui -o ui_filebrowser.h
    ../src/filebrowser.ui: Warning: The name ‘layoutWidget’ (QWidget) is already in use, defaulting to ‘layoutWidget1’.
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/connectometry/createdbdialog.ui -o ui_createdbdialog.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/connectometry/individual_connectometry.ui -o ui_individual_connectometry.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/connectometry/match_db.ui -o ui_match_db.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/connectometry/db_window.ui -o ui_db_window.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/connectometry/group_connectometry.ui -o ui_group_connectometry.h
    /usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/regtoolbox.ui -o ui_regtoolbox.h
    g++ -c -m64 -pipe -fpermissive -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../src -I. -I../src/libs -I../src/libs/dsi -I../src/libs/tracking -I../src/libs/mapping -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o main.o ../src/main.cpp
    In file included from ../src/mainwindow.h:6:0,
    from ../src/main.cpp:9:
    ../src/libs/vbc/vbc_database.h:5:25: fatal error: tipl/tipl.hpp: No such file or directory
    compilation terminated.
    Makefile:887: recipe for target ‘main.o’ failed
    make: *** [main.o] Error 1

    Thank you

    • Hi,

      I came across the similar error before. In my case, it was due to the wrong version of TILP-master.

      Please make sure you download the latest version of TILP-master.

      Other than that, please ask Frank Yeh, the developer of DSI studio.

  2. Hello,

    I have a new problem now. When I type ./dsistudio in the build directory. It shows up an Error window [Failed to load template file at]. Do you know how to solve this error message?

    • Dear Po-yu,

      Did you download windows version of DSI-Studio? Template files should be in there.

  3. Dear Frank and Kiyotoka,

    I am trying to compile DSI studio in my Ubuntu 16.04 but I encounter a problem on step 7 “qmake ../src”

    ~/dsistudio/build$ qmake ../src
    Could not find qmake configuration file linux-g++.
    Error processing project file: ../src/

    I tried to find the answers on the Internet but these answers do not work for me.

    Please guide me to install your software.


    • Dear Po-Yu,

      The error message indicates that you have problems with qmake.

      Could you tell me the result of the following command?

      $ qmake –version

      Best regards,


      • pkao@Formosa:~$ qmake -version
        QMake version 3.0
        Using Qt version 5.6.2 in /home/pkao/anaconda2/bin/lib

        • Dear Po-Yu,

          In my circumstance,

          $ qmake –version
          QMake version 3.0
          Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu

          In your circumstance, qmake in anaconda2 will be used, which causes problems.

          So easiest workaround might be to use the full path for qmake

          $ /usr/bin/qmake ../src

          If it doesn’t go well, please show me the result of followoing command

          $ which qmake

          Then I will be able to show you how to switch the different version of qmake in your circumstance.

          • Hi Kiyotaka,

            It works for me now. Thanks for your helping.


          • Dear Po-Yu,

            Glad to know that the workaround works for you.

            Best regards,

  4. Dear Frank and Kiyotoka,

    Thank you again Frank for the wonderful software, and thank you Kiyotoka for the installation instructions. I just compiled dsi_studio on my new Linux Mint 18.2 installation.
    The instructions were quite complete, except that I also needed to install the package libqt5opengl5-dev (error message: “qtOpenGL/QGLWidget: No such file or directory”).

    I thought I’d post this here to help the next person,

    Best regards,


    • Dear Steven,

      Thank you for the feedback! I updated the article according to your suggestion.

      Best regards,

  5. This is the developer of DSI Studio. Could I include you instruction on the DSI Studio website? I will acknowledge the source here. Thank you!

    • Dear Frank,

      Of course Yes! Thank you very much for developing such a wonderful software.
      I always build DSI-studio as I wrote in my post, so I hope it might help those who struggle building DSI studio for Ubuntu.

      Best regards,


このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください