Topology ToolKit


Installation
Please find below detailed instructions for the installation of TTK from sources, under Linux (default target platform).

These specific notes describe the installation procedure used by TTK's continuous integration to build, install and test TTK under Github's virtual machines running Ubuntu 26.04.

If you are an advanced user and you do not wish to install ParaView (TTK's main user interface), you still have the possibility to install TTK without ParaView support (although we highly recommend to activate it).
In that case, simply download TTK as describded in section 1, install the dependencies as detailed in section 2 and finally, directly jump to section 6 ("Configuring, building and installing TTK").
Examples showing how to use TTK libraries from your own VTK code can be found on this page.

If you are an advanced user and you do not even wish to install VTK, you still have the possibility to install TTK without VTK support (although we highly recommend to activate it).
In that case, simply download TTK as describded in section 1, install the optional dependencies as detailed in section 2 and finally, directly jump to section 6 ("Configuring, building and installing TTK").
Examples showing how to use TTK libraries from your own C++ code can be found on this page.

Most users will want to activate TTK's ParaView support.

The remainder of these notes describe the installation of the version 1.4.0 of TTK along with the version 6.1.1 of ParaView. Other versions of either software packages may require slight variations in the installation procedure.

1. Downloads

TTK builds on top of ParaView for its main user interface. Thus, you will first need to download ParaView's source code. Note that TTK plugins for ParaView will only work with a version of ParaView compiled from source. Thus, if you already installed ParaView with a binary copy, you may need to un-install it before proceeding. Next, download TTK from our download page.

2. Installing the dependencies

Several dependencies will need to be installed in order to compile ParaView and TTK from source. Please enter the following commands in a terminal to install them (please see the documentation of your package manager if your operating system is not Ubuntu Linux):

sudo apt install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev qtxmlpatterns5-dev-tools libqt5x11extras5-dev libqt5svg5-dev libgl1-mesa-dev libxcursor-dev ninja-build dpkg-dev libboost-system-dev


Note that these commands will also trigger the installation of the (numerous) dependencies of these components.

Optional dependencies

In order to enjoy the complete set of TTK features, we also recommend to install the following, optional dependencies, with the following command:

sudo apt install -y libcgal-dev libeigen3-dev libgraphviz-dev libqhull-dev libsqlite3-dev libspectra-dev libtbb-dev libwebsocketpp-dev libzfp-dev graphviz python3-sklearn zlib1g-dev


3. Preparing the sources

Move the tarballs to a working directory (for instance called ~/ttk) and decompress them by entering the following commands in a terminal (this assumes that you downloaded the tarballs to the ~/Downloads directory):

mkdir ~/ttk
mv ~/Downloads/ParaView-v6.1.1.zip ~/ttk/
mv ~/Downloads/ttk-1.4.0.zip ~/ttk/
cd ~/ttk
unzip ParaView-v6.1.1.zip
unzip ttk-1.4.0.zip

You can delete the tarballs after the source trees have been decompressed by entering the following commands:

rm ParaView-v6.1.1.zip
rm ttk-1.4.0.zip

4. Patching the ParaView source tree

In order to enjoy the complete set of TTK features, we recommend at this stage to patch the ParaView source tree. This step is optional. To proceed, go to the patch directory and apply it as follows:

cd ~/ttk/ttk-1.4.0/paraview/patch
./patch-paraview-6.1.1.sh ~/ttk/ParaView-v6.1.1/

5. Configuring, building and installing ParaView

a) Configuration

To enter the configuration menu of ParaView's build, enter the following commands:

cd ~/ttk/ParaView-v6.1.1/
mkdir build
cd build
cmake-gui ../

The configuration window opens. Click on the "Configure" button to proceed. Select the "Ninja" generator. Once the configuration is finished, you may want to enable additional build options (OSPRay, MPI, etc) to your liking (see the ParaView build documentation for further details). Note that certain options require the installation of additional dependencies.

Next, click on the "Generate" button and close the configuration window when the generation is completed.

b) Build

Now you can start the compilation process by entering the following command (this will take a LONG time):

ninja

c) Installation

Once the build is finished, enter the following command to install your build of ParaView on your system:

sudo ninja install

6. Configuring, building and installing TTK

a) Configuration

To enter the configuration menu of TTK's build, enter the following commands:

cd ~/ttk/ttk-1.4.0/
mkdir build
cd build
cmake-gui ../

The configuration window opens. Click on the "Configure" button to proceed. Select the "Ninja" generator. At this stage, under Linux, TTK's build should be automatically configured correctly by default and Linux users can click on the "Generate" button.
Once the generation is completed, close the configuration window.

If you are an advanced user and you do not wish to activate TTK's ParaView support, set the CMake variable TTK_BUILD_PARAVIEW_PLUGINS to OFF. Examples showing how to use TTK libraries from your own VTK code can be found on this page.

If you are an advanced user and you do not even wish to activate TTK's VTK support, set the CMake variables TTK_BUILD_STANDALONE_APPS and TTK_BUILD_VTK_WRAPPERS to OFF. Examples showing how to use TTK libraries from your own C++ code can be found on this page.

b) Build

Now you can start the compilation process by entering the following command (this will take a LONG time):

ninja

c) Installation

Once the build is finished, enter the following command to install your build of TTK on your system:

sudo ninja install

Note that, in addition to the installation of TTK plugins for ParaView, the above command also installed a collection of standalone TTK programs that can be used outside of ParaView, either as command line tools or VTK-based graphical user interfaces. To list them, enter the following commands (this assumes that you did not modify the default TTK installation path, /usr/local/):

ls /usr/local/bin/*Cmd
ls /usr/local/bin/*Gui

7. Setting up environment variables

At this point, for an optimal user experience, we recommend users to define the following environment variables (in particular, when using TTK with python). Under Ubuntu Linux, this can be done by entering the following commands:

echo "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib" >> ~/.bashrc
echo "export PV_PLUGIN_PATH=${PV_PLUGIN_PATH}:/usr/local/bin/plugins/" >> ~/.bashrc
echo "export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python3.14/site-packages/" >> ~/.bashrc
source ~/.bashrc

Note that if you decided to change the default installation path of ParaView and TTK, you will need in the above commands to replace /usr/local by your custom installation path.

8. Checking your TTK installation

If you applied all the above steps successfully (including step 4), you can now open a terminal and type the following command to load your TTK-patched ParaView:

paraview

At this point, you should see the following TTK startup screen:



On this screen, clicking on the "Example Visualizations" link should bring you to the TTK built-in example screen:



From there, clicking on one of the three buttons should generate one of the following three visualizations:







If this is the case, congratulations!
You have just successfully installed TTK on your system!

If you have not applied the optional step 4 of this installation procedure, certain TTK features will not be accessible from ParaView and the above built-in examples will not be available in your ParaView build. However, most of TTK features should still work as expected.

Now, please visit our tutorial page to watch video tutorials showing how to use TTK with ParaView with concrete examples and how to use it from your own Python or C++ code or how to extend TTK by writing up your own module!