Skip to content

Instantly share code, notes, and snippets.

@rsnk96
Created November 8, 2018 19:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsnk96/51089ccba99498c05d7267969879f90f to your computer and use it in GitHub Desktop.
Save rsnk96/51089ccba99498c05d7267969879f90f to your computer and use it in GitHub Desktop.
Script to build RTK and ITK on Ubuntu with Python Wrappers
#!/bin/bash
sudo apt-get install git cmake build-essential bison -y
sudo apt-get install gcc-4.8 g++-4.8 -y # For nvcc
mkdir ITK_RTK
# Install ITK
git clone git://itk.org/ITK.git
cd ITK && git checkout v4.13.0 && cd ../
mkdir -p ITK-bin && cd ITK-bin
cmake -D ITK_LEGACY_SILENT=1 --D ITK_WRAP_PYTHON=1 ../ITK
# D ITK_USE_FFTWD=1 -D ITK_USE_FFTWF=1
make -j
ITK_BIN_DIR=$(pwd)
cd ../
# Install RTK with SimpleRTK and Python
git clone git://github.com/SimonRit/RTK.git
cd RTK && git checkout v1.4.0 && cd ../
mkdir -p RTK-bin && cd RTK-bin
cmake -D BUILD_EXAMPLES=1 -D BUILD_SIMPLERTK=1 -D WRAP_PYTHON=1 \
-D ITK_DIR=$ITK_BIN_DIR -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_CXX_FLAGS=-fPIC -D CMAKE_C_FLAGS=-fPIC \
-D CUDA_CUDA_LIBRARY=/usr/local/cuda/lib64/stubs/libcuda.so ../RTK
make -j
./bin/HelloWorld
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment