Skip to content

Instantly share code, notes, and snippets.

@pabloduque0
Last active January 14, 2018 13:44
Show Gist options
  • Save pabloduque0/7101675751381183dcbc9486be309480 to your computer and use it in GitHub Desktop.
Save pabloduque0/7101675751381183dcbc9486be309480 to your computer and use it in GitHub Desktop.
Installing ITK + VTK Debian

Pre-requisites:

Depending on what you have/have not installed you might need to install many other dependencies here.

sudo apt-get install libpng12-dev libtiff4-dev

ITK

Download source from: https://sourceforge.net/projects/itk/postdownload?source=dlp

tar xzvf InsightToolkit-4.13.0.tar.gz

mv InsightToolkit-4.13.0/ ITK/

cd ITK

mkdir build

cd build

cmake -DBUILD_DOXYGEN=OFF -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DCMAKE_BACKWARDS_COMPATIBILITY=2.4 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_DOXYGEN=OFF -DITK_USE_KWSTYLE=OFF -DITK_BUILD_ALL_MODULES=ON -DModule_ITKVtkGlue=ON ..

sudo make -j6 sudo make install

VTK + QT

git clone git://vtk.org/VTK.git VTK

cd VTK

mkdir build

Download QT from:

https://www1.qt.io/download-open-source/?hsCtaTracking=f977210e-de67-475f-a32b-65cec207fd03%7Cd62710cd-e1db-46aa-8d4d-2f1c1ffdacea

sudo chmod +x qt-unified-linux-x64-3.0.1-online.run

./qt-unified-linux-x64-3.0.1-online.run

Follow UI installation and get back to the build directory we created previously for VTK.

cmake -DVTK_QT_VERSION:STRING=5 -DQT_QMAKE_EXECUTABLE:PATH=/pathtoqt/5.7/gcc_64/bin/qmake -DVTK_Group_Qt:BOOL=ON -DCMAKE_PREFIX_PATH:PATH=/pathtoqt/5.7/gcc_64/lib/cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Release ..

make -j6

sudo make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment