DTI-TK

Diffusion Tensor Imaging ToolKit

DTI-TK Logo

Source Code

DTI-TK is an open source project. The source code repository is currently hosted on NITRC. This page describes how you can gain access to the repository, download the source code, and compile DTI-TK yourself.

Access the repository

To access the source code,

  • join NITRC, if you are not already a NITRC user
  • send a request to join NITRC DTI-TK project. Your request will usually be approved in a day or two. Alert: The system does NOT send the approved users a confirmation message. Instead, you can check if your name now appears on the list of users on the NITRC DTI-TK summary page.

Download the source code

To download the source code, you need a CVS client software installed on your computer. On a Linux machine, you will need to have the Development Tools installed; on a MacOSX machine, you will need to install the fink. These softwares will be required for compiling the source code.

You can check if CVS is installed by running, in a command line interface,

which cvs

If CVS is installed and in your path, you should get a response like

/usr/bin/cvs
(The exact output depends on your setup.)

Once CVS is installed, you can download the source code with the following commands:

  • Create a directory of your choice to house the source code. The commands below use the setup I have on my machine.
mkdir /Users/huiz/devel/DTI-TK
cd /Users/huiz/devel/DTI-TK
  • Retrieve the source code with CVS
export CVS_RSH=ssh
cvs -d :ext:developername@www.nitrc.org:/cvsroot/dtitk checkout dtitk
NOTE: You need to
  • substitute developername with your own NITRC user name
  • make sure a ssh client is installed on your machine.
  • make sure you have a live internet connection.
  • provide your NITRC password when prompted

If everything goes okay, you should see the following

cvs checkout: Updating dtitk
U dtitk/CMakeLists.txt
U dtitk/CPackOptions.cmake.in
U dtitk/CPackSetup.cmake
U dtitk/CTestConfig.cmake
....

Compile the source code

DTI-TK can be compiled from source with the following steps:

NOTE: The command examples use the setup on my machine. So remember to adapt according to your local setup.

  • Make sure that you have the following softwares installed on your system:
    • CMake
    • ITK (Version 4 series only and set ITKV3_COMPATIBILITY to ON with ccmake)
    • VTK
ITK and VTK will need to be compiled from source with cmake. If you don't have experience with doing this, please refer to the ccmake instructions below (as a guide only, since details differ).
  • Change to the directory where you have downloaded the DTI-TK source
cd /Users/huiz/devel/DTI-TK
  • Create and change to a new directory called rel.build
mkdir rel.build
cd rel.build
  • Create the required makefile with ccmake, which is an interactive cmake client, in rel.build.
ccmake ../dtitk
The steps involved here are:
  • Press 'c' to initiate the configuration process.
  • Set the buid type (CMAKE_BUILD_TYPE) to RELEASE. (You can navigate to a different variable with the up/down arrow and press the return key to toggle the editting mode)
  • If ITK installation directory (ITK_DIR) is not found (NOT FOUND), set the variable to the correct directory.
  • Do the same for VTK installation directory (VTK_DIR).
  • Set the installation directory (CMAKE_INSTALL_PREFIX) to /usr/local/dtitk. (To set this variable, you may need to reveal the advanced option by pressing 't') If this is a shared workstation, you may not have the write permission to this directory. In this case, you need to set it to a different directory.
  • Press 'c' again, if you have made any changes.
  • Press 'g' to generate the makefile required. If you do not see 'g' as an available key to press (listed at the bottom of the ccmake interface), one or more required variables may not be set or set correctly.
  • Compile the source code now with make
make
  • Install the resulting binary to the target installation directory
make install
  • The installation directory is set above with ccmake.
  • Make sure you have the write permission to the installation directory. You may be able to gain access with sudo make install if it is your own machine. Otherwise ask your system administrator for help, or change the installation directory to one that you have the write permission (need to re-run ccmake).

What next?

Don't forget that you still need to follow the installation tutorial after this, although just from the step 3 and onward.

Page last modified on April 25, 2014, at 05:56 AM

    SourceForge.net Logo   Valid XHTML 1.0 Transitional