Installation Instructions

Deformetrica is a command-line software. Currently, there is no binaries released. To use Deformetrica, you need to download the source files and compile them on your own machines.

Deformetrica is written in C++ and depends on generic multi-plateform libraries. Theoretically, it could be compiled on any OS. We have compiled it on 64-bit OS, more particularly on CentOS 5.x, Fedora 20, Ubuntu 12.04 LTS, MacOS 10.8 and 10.9. Please, if you have troubles in compiling on different architectures.

You will find below the instructions for downloading, compiling and executing Deformetrica on Unix-based system.

Since the version 2.1, Deformetrica benefits from CUDA to increase the performance of some computations. If you want to benefit from this acceleration, all you need to do is to dispose of a CUDA-enabled GPU (list available here) and to have CUDA installed on your computer. Deformetrica has been tested on CUDA 5.0 and higher.

For Ubuntu users, you will have to install the following packages prior to compiling:

~$ sudo apt-get install build-essential freeglut3 freeglut3-dev

(freeglut3* contains OpenGL and build-essential contains tools for compilation).

Dependencies

Deformetrica depends on the following libraries:

It also uses

  • the software CMake (at least version 2.8)

to generate makefiles for the compilation of Deformetrica.

Moreover, Deformetrica needs the FFTW library to perform Fast Fourier Transforms and the latter is included in ITK but not activated by default.

Instructions

If you have already ITK and VTK installed:

  • Check that you compiled ITK with the flags USE_FFTWF = ON and USE_FFTWD = ON.
  • Check that you compiled VTK with the flags Module_vtkWrappingTools = ON (for VTK >= 6.0).
  • Go to deformetrica-[version]/deformetrica/bin/ and execute the following command lines, replacing PATH_TO_ITK and PATH_TO_VTK by the path of your ITK and VTK libraries on your machine:
    ~$ cmake -D ITK_DIR=PATH_TO_ITK -D VTK_DIR=PATH_TO_VTK ../app
    ~$ make

Now, the executable commands ShootAndFlow2, ShootAndFlow3, sparseMatching2, sparseMatching3, sparseAtlas2 and sparseAtlas3 are in your current folder. The suffix 2 or 3 is for the dimension: 2 for data in 2D and 3 for data in 3D.

Optionally, you can compile utilities. Go to deformetrica-[version]/utilities/vtk/ and execute the following command lines:

  • ~$ cmake -D ITK_DIR=PATH_TO_ITK -D VTK_DIR=PATH_TO_VTK ./
    ~$ make

This generates executable files in this folder, which you will need in the Tutorials.

If you don’t have ITK, VTK or CMake installed:

  • If you want to compile on a Linux-based system, simply run the installation script: ~$ ./install_deformetrica.sh. Note that it may take a while, since ITK is fairly long to compile.
  • Otherwise, follow the steps:
    1. Download CMake 2.8.12 (the current latest stable release) here
    2. In a Terminal, go to where CMake has been downloaded and run
      ~$ tar -zxvf cmake-2.8.12.tar.gz
      ~$ mkdir cmake
      ~$ cd cmake-2.8.12/
      ~$ ./bootstrap --prefix=../cmake
      ~$ make
      ~$ make install
    3. Download ITK 4.5.1 (the current latest stable release) here and move it to: deformetrica-[version]/deformetrica/bin/
    4. In a Terminal, run:
      ~$ cd deformetrica-[version]/deformetrica/bin/
      ~$ tar -zxvf InsightToolkit-4.5.1.tar.gz
      ~$ mkdir ITKb
      ~$ cd ITKb/
      ~$ cmake -D USE_FFTWD=ON -D USE_FFTWF=ON ../InsightToolkit-4.5.1/
      ~$ make
    5. Download VTK 6.1.0 (the current latest stable release) here and move it to: deformetrica-[version]/deformetrica/bin/
    6. In a Terminal, run:
      ~$ tar -zxvf VTK-6.1.0.tar.gz
      ~$ mkdir VTKb
      ~$ cd VTKb/
      ~$ cmake -D Module_vtkWrappingTools=ON ../VTK-6.1.0/
      ~$ make
    7. Eventually, run:
      ~$ cd ../
      ~$ cmake -D ITK_DIR=ITKb -D VTK_DIR=VTKb ../app
      ~$ make
    8. To check if no error occurs, you can run: make test
  • Then, compile the utilities by going to deformetrica-[version]/utilities/vtk/ and running in a Terminal:
    ~$ cmake -D ITK_DIR=../../deformetrica/bin/ITKb -D VTK_DIR=../../deformetrica/bin/VTKb ./
    ~$ make

Note:
If CUDA is present, you will certainly have the following message at the compilation :
ptxas /tmp/tmpxft_00006c34_00000000-20_GpuConv1D.compute_11.ptx, line 353; warning : Double is not supported. Demoting to float
ptxas /tmp/tmpxft_00006c34_00000000-17_GpuConv1D.compute_12.ptx, line 353; warning : Double is not supported. Demoting to float

The compiler is tying to find the adequate compute capability of your GPU and since double precision started from 1.3 compute capability, don’t worry about the message.

 

Comments are closed.