Download

vmtk Latest release (1.3)

Binary Packages

Binary packages are available for Linux (Ubuntu, Fedora, Mint) 32bit and 64 bit, Mac OSX( > 10.10), and Windows 7/8/10 32bit and 64bit.
Other Linux distributions may be supported but vmtk is not guaranteed to work.
In case you can’t find a binary package for your operating system, please compile vmtk from source.

For further details, follow the instructions on installing binary packages.

New vmtk users might want to read the Getting Started guide.
To see a detailed list of changes for each version of vmtk please refer to the changelog.
The vmtk distribution is released under a BSD-like license.

Installing binary packages

Binary packages are supported by Orobix Srl.

Windows 7/8/10 : Before installing vmtk

If you have an older binary version of vmtk please remove it by double clicking on the vmtk entry in the uninstall program section of the windows control panel (add/remove program section).
If you have an older compiled from source version of vmtk simply delete the folder.

Before installing vmtk you need Python 2.7.x
Please be sure to download the proper architecture (32bit or 64bit).
How can I tell if my computer is running a 32-bit or a 64-bit version of Windows?

If you have Windows 7/8/10 64 bit, it is strongly advised to download and install Python 2.7-amd64bit.
If you have Windows 7/8/10 32 bit, you have to download and install Python 2.7-win32.

If you already have a Python 2.7 installed in your system and you dont’know if it is Python32bit or Python64bit just run the Python Idle GUI or the Python command line and read carefully the first line:

Python 32bit:

Python 2.7.x (default, Jan 22 2016, 09:24:18) [MSC v.1500 32 bit (Intel)] on win32

Python 64bit:

Python 2.7.x (default, Jan 22 2016, 09:24:24) [MSC v.1500 64 bit (AMD64)] on win32

In the case you try to install vmtk with a wrong python architecture the installer will tell you that it’s not able to found Python executable on your system.

Windows 7/8/10: Windows Installers

After you’ve downloaded the installer, just run it. It will take you through the installation stage, after which you’ll find a shortcut to vmtk in your desktop. Click on the vmtk icon, and you’ll see PypePad ready for use.

Note that, along with vmtk, the installer directly provides Python-wrapped vmtk and VTK classes, and vmtk, VTK, ITK dll’s and header files to develop new applications in Python and C++.

If you want to uninstall vmtk, double click on vmtk entry it in the uninstall program section of the windows control panel.

Mac OSX packages

If you have an older compiled from source, simply delete the folder and please remove any vmtk related environment variables you have set in your .bashrc file or .bash_profile or .profile
If you have an older version of vmtk installed as a python egg, please remove it by following instructions below:

If you installed vmtk 1.2 using egg distribution please remove it using pip. If you do not have pip, install it by typing:

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

You can check all python packages installed with:

pip freeze

To uninstall vmtk please type:

pip uninstall vmtk

To install vmtk binary distribution you need homebrew.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Remove older versions of vmtk installed with brew:

brew uninstall --force https://raw.githubusercontent.com/vmtk/vmtk/v1.3.2/distribution/homebrew/vmtk.rb
brew uninstall --force vtk
brew uninstall --force insighttoolkit

Install brew python

brew install python

Register brew science:

brew tap homebrew/science

Then install vmtk:

brew install https://raw.githubusercontent.com/vmtk/vmtk/v1.3.2/distribution/homebrew/vmtk.rb

Finally:

mkdir -p /Users/Username/Library/Python/2.7/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/Username/Library/Python/2.7/lib/python/site-packages/homebrew.pth

where Username is your user’s account name.

Linux packages

If you have an older compiled from source version of vmtk simply delete the folder and please remove any vmtk related environment variable you have set in your .bashrc file.
If you installed vmtk under ubuntu using apt-get install vmtk please remove it by typing:

sudo apt-get --purge remove vmtk

If you installed vmtk 1.2 using egg distribution please remove it using pip. If you do not have pip, install it by typing:

wget https://bootstrap.pypa.io/get-pip.py

python get-pip.py

You can check all python packages installed with:

pip freeze

To uninstall vmtk please type:

pip uninstall vmtk

We currently provide vmtk Linux packages (Ubuntu, Fedora, Mint) as python egg.
After you download the egg file you can install it using pip or setuptools.

Install vmtk using pip

sudo pip install path-to-vmtk-egg

or using easy_install

 wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python

If you don’t have wget, install it or manually download (right click and Save as…)ez_setup.py. Then type:

 sudo python ez_setup.py

Then simply type:

 sudo easy_install path-to-vmtk-egg

After installation you will have to manually set environment variables.

Last lines of the installation process will give you information about the installed location of vmtk:

Installed usr/local/lib/python2.7/dist-packages/vmtk-1.3-py2.7.egg
Processing dependencies for vmtk==1.3
Finished processing dependencies for vmtk==1.3

Use this information in order to setup your environment variables, e.g.:

Please pay attention to add / at the beginning of the VMTKHOME path.

VMTKHOME=/usr/local/lib/python2.7/dist-packages/vmtk-1.3-py2.7.egg
export PATH=$VMTKHOME/vmtk/bin:$PATH
export LD_LIBRARY_PATH=$VMTKHOME/vmtk/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$VMTKHOME/vmtk:$PYTHONPATH

Development version

You can grab the latest development version from the official vmtk git repository on Github. To clone this repository, make sure git is installed on your system and issue the following:

 git clone https://github.com/vmtk/vmtk.git

vmtk is now based on SuperBuild, a CMake feature that allows to automatically download and compile dependencies (in our case VTK and ITK). This makes the whole process a lot easier than it was up until version 0.9. Make sure you update your notes based on the instructions below.

Requirements

vmtk is cross-platform and will compile and work on Linux, Mac OSX and Windows. Most of the development is performed under Linux and Mac OSX, but feel free to update us on eventual issues on Windows.

In order to successfully compile and use vmtk, the following software has to be installed in your system:

  • Git (≥ 1.6)
  • Python (≥ 2.6, < 3.0)
  • CMake (≥ 2.8)
  • A C++ compiler

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

sudo apt-get install libxt-dev libgl1-mesa-glx libgl1-mesa-dev libglapi-mesa libosmesa-dev build-essential python-dev

For OSX users, due to python linking with VTK, homebrew python is required

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew update

brew install python

Build

Create a build directory and cd into it

mkdir vmtk-build
cd vmtk-build

Run CMake with the directory where the vmtk source tree is located as an argument e.g.

cmake ../vmtk

Or with the GUI

ccmake ../vmtk

or if you use the CMake GUI, point the source path to the vmtk source directory. Set CMake variables as appropriate (they have sensible defaults), configure and generate (for more details look at the CMake help pages). Once you’re done, you’ll find either Makefiles or a Visual Studio solution or an XCode project in the build directory, depending on your platform and compiler.

Start your compiler in your build directory, as your platform requires. Note that this will download and compile both VTK and ITK in the background, so it will typically take a long time. The build process will automatically install all build products in the vmtk-build/Install directory.

Environment variables

In order to properly run vmtk you have to set environment variables.

[Recommended] You can use the script vmtk_env.sh located in your vmtk-build/Install folder. It allows to set environment variables for your current running shell session. This is very useful if you have different versions of vmtk installed in your system:

source path-to-vmtk_env.sh

Otherwise you can permanently set environment variables by adding it to your .bash_profile or .bash_rc.

[Not Recommended] You can also manually add environment variables:

For Linux, add these lines to your .bashrc or .bash_profile file (in your home directory):

VMTKHOME=/path-to-vmtk-build/Install
export PATH=$VMTKHOME/bin:$PATH
export LD_LIBRARY_PATH=$VMTKHOME/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$VMTKHOME/lib/python2.7/site-packages:$PYTHONPATH

For OSX, add these lines to your .profile file (in your home directory):

VMTKHOME=/path-to-vmtk-build/Install
export PATH=$VMTKHOME/bin:$PATH
export DYLD_LIBRARY_PATH=$VMTKHOME/lib:$DYLD_LIBRARY_PATH
export PYTHONPATH=$VMTKHOME/lib/python2.7/site-packages:$PYTHONPATH

For Windows, set these variables into your PATH environment variable

PATH=path-to-vmtk-build\Install\bin;VMTKHOME\Install\lib;%PATH%
PYTHONPATH=path-to-vmtk-build\Install\lib\python2.7\site-packages;%PYTHONPATH%

Enjoy

Extra notes for installation under Windows 7/8/10 32bit or 64bit

As C++ compiler Microsoft Visual Studio Express (11 or later, free to download) is strongly suggested.
Please be sure to set “Release” flag instead of the default “Debug” flag in Visual Studio.
If you want to compile vmtk with a 64bit architecture you have to use Python-amd64 and you have to choose the Visual Studio amd64 version during cmake configuration.