$wgGroupPermissions['user']['read'] = true; $wgGroupPermissions['*']['read'] = true; Installing CamiTK for Developpers on Linux - Forge Wiki
SCM

Installing CamiTK for Developpers on Linux

From Forge Wiki

Jump to: navigation, search

This page will help you to configure and install the CamiTK framework on (Debian based) Linux distribution with its dependencies.
This installation procedure can be divided into three parts: basic software installation, CamiTK's specific dependencies and the framework itself.




Contents


Prerequisites

Enable 3D acceleration


Moreover CamiTK will work better with 3D acceleration enabled on your Linux machine. On Ubuntu, for instance, go to system settings → additional drivers and install one of the proposed propriety driver.

Install a propriaty driver of your 3D card

If no drivers are proposed or no ones work, please refer to your Linux community helps.

Basic development softwares installation

You will find here the basic development softwares required to correctly configure and install CamiTK framework on your Linux distribution. Like we said before, specific command are given for the Debian distribution Ubuntu as it remains very popular.

C++ Compiler

First of all, as CamiTK is built in C++, you will need a C++ compiler installed on your system. You may install the GNU Compiler for C++ : g++

sudo apt-get install g++

CMake

Git

KDevelop

Last but not least, we highly recommend you to use an IDE to work on your project. On Ubuntu, we like to use KDevelop that you may install :

sudo apt-get install kdevelop

Setup your IDE

CamiTK dependencies libraries installation

Following instructions will help you, to quickly install CamiTK external libraries on your Linux distribution.

All-in-one command to install dependencies

The complete list of available pre-compiled packages depending on your Debian or Ubuntu distribution can be found here : [1].

Depending on your objectives you can - install camitk from the available package on your distribution. CamiTK version 3 is not recommended. Please use CamiTK version 4. - build camitk from source. If you have a recent version of Debian derived or Ubuntu, try this following first.

If your Linux distribution features the camitk package with the same version in its repositories, you may run the following command in a terminal:

sudo apt-get build-dep camitk

which will install all libraries dependencies required in order to use, build or work with CamiTK.

Note: you need to have the "main" source repository in your apt sources.list in order for this command to work properly

If the previous command generates this error:

E: Unable to find a source package for camitk

This means you are on a debian derived distrib that is does not provide a camitk package (this happened for example in Ubuntu 16.04). You will need to install the dependencies manually.

CamiTK4 and Debian jessie (oldstable)

On debian jessie (oldstable), VTK, gdcm and ITK need to be compiled from source.

  • First install the basic required packages
  • Then compile the required VTK (> 6.3)
  • Then compile the required gdcm
  • Then compile the required ITK


basic requirements
sudo apt-get install cmake cmake-gui qtbase5-dev libqt5xmlpatterns5-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools libqt5webkit5-dev xsdcxx libxerces-c-dev
mkdir dependencies
cd dependencies


VTK-6
wget http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz
tar xf VTK-6.3.0.tar.gz
mkdir build-VTK
cd build-VTK
cmake ../VTK-6.3.0 -DBUILD_DOCUMENTATION=FALSE -DBUILD_EXAMPLES=FALSE -DBUILD_SHARED_LIBS=TRUE -DBUILD_TESTING=FALSE -DVTK_Group_Qt=TRUE -DVTK_QT_VERSION=5 -DModule_vtkGUISupportQt=TRUE -DModule_vtkGUISupportQtOpenGL=TRUE -DModule_vtkGUISupportQtSQL=TRUE -DModule_vtkgl2ps=TRUE -DCMAKE_INSTALL_PREFIX="/usr/local" -DVTK_RENDERING_BACKEND=OpenGL
make
sudo make install
cd ..
gdcm
wget -O GDCM-2.6.9.tar.gz https://github.com/malaterre/GDCM/archive/v2.6.9.tar.gz
tar xf GDCM-2.6.9.tar.gz
mkdir build-GDCM
cd build-GDCM
cmake ../GDCM-2.6.9 -DGDCM_BUILD_SHARED_LIBS=TRUE -DGDCM_USE_VTK=TRUE -DCMAKE_INSTALL_PREFIX="/usr/local"
make
sudo make install
cd ..
ITK
wget http://iweb.dl.sourceforge.net/project/itk/itk/4.9/InsightToolkit-4.9.1.tar.xz
tar xf InsightToolkit-4.9.1.tar.xz
mkdir build-ITK
cd build-ITK
cmake ../InsightToolkit-4.9.1 -DBUILD_SHARED_LIBS=TRUE -DBUILD_EXAMPLES=FALSE -DBUILD_TESTING=FALSE  -DCMAKE_INSTALL_PREFIX="/usr/local"
make
sudo make install
cd ..

CamiTK 4 on Ubuntu 16.04 (LTS)

For CamiTK 4, in order to install all the dependencies manually, just type:

sudo apt-get install cmake cmake-gui libvtk6-dev libvtk6-qt-dev qtbase5-dev libqt5xmlpatterns5-dev libqt5opengl5-dev qttools5-dev-tools xsdcxx libinsighttoolkit4-dev libfftw3-dev libgdcm2-dev libvtkgdcm2-dev xvfb xauth

Note: there is a missing dependency in the vtk package shipped with Ubuntu 16.04. To fix this:

sudo apt-get install libproj-dev

Also note that for Ubuntu 16.04 you need up-to-date Qt packages (default Qt package that shipped with Ubuntu 16.04 will crash).

You can also try this:

cd /tmp
wget -O control https://tracker.debian.org/media/packages/c/camitk/control-4.0.4-2
mk-build-deps -t "apt-get -y --no-install-recommends" -i "/tmp/control"

(This will use the control files that is used to build the CamiTK 4.0.4 package on debian, deduce the needed dependencies and install all current dependencies)

CamiTK 4 on Debian Stretch or later, Ubuntu 17.04 or later

This should install the dependencies automatically:

sudo apt-get build-dep camitk


Manually install dependencies

If you are not on a debian based distribution, or if the all-in-one commands above did not work, you need to manually install the required libraries one by one, but take care of which version you choose.

For CamiTK 4.x and up:

For CamiTK prior to version 4.x:

If you plan to use CamiTK image processing content (store within the CEP Imaging), please install:

  • ITK ITK4 for version 4.x and up, ITK3 for versions prior to 4.x

If you plan to use CamiTK biomechanical content (store within the CEP Modeling), you may install:

Install CamiTK

To install CamiTK on your system, you may install directly the package (if available in your repositories) or compile CamiTK manually.

Package from Debian repositories

  • Starting from Ubuntu 13.04 and any Debian Jessie-based Linux, you can also install the already compiled library and its development dependencies:


sudo apt-get install camitk-imp libcamitk3-dev


This will not get you the latest version of the code, but the latest packaged stable release (expect a 6 months lag on Ubuntu).

Install CamiTK from the source

Install additional content

Tutorials

Non free content

Create your own project

Powered By FusionForge