Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Minimalist VTK-based python TTK example pipeline, including:
-# The computation of a persistence curve
-# The computation of a persistence diagram
-# The selection of the most persistent pairs of the diagram
-# The pre-simplification of the data according to this selection
-# The computation of the Morse-Smale complex on this simplified data
-# The storage of the output of this pipeline to disk.

This example reproduces the Figure 1 of the TTK companion paper:
"The Topology ToolKit", 
J. Tierny, G. Favelier, J. Levine, C. Gueunet, M. Michaux.,
IEEE Transactions on Visualization and Computer Graphics,
Proc. of IEEE VIS 2017.


To run this example, either install TTK using Conda (Linux and OSX) or manually install TTK on your system.

Using Conda
===========
0) Install either miniconda (https://docs.conda.io/en/latest/miniconda.html) or 
   anaconda (https://www.anaconda.com/distribution/) on your system.

1) Create a conda environment and install the 'topologytoolkit' package from conda-forge:
$ conda create -n ttk
$ conda activate ttk
$ conda install -c conda-forge topologytoolkit

2) From the current directory, enter the following command (omit the '$' character):
$ ./example.py ../data/inputData.vtu


Manual Installation
===================
First install TTK on your system (https://topology-tool-kit.github.io/installation.html).

Next, before launching the script, make sure that you properly define the following environment variables:
- PYTHONPATH (where TTK VTK python modules are installed)

For instance, under Linux, with Python 3.10, this can be done as follows, assuming that you installed ParaView and TTK to /usr/local:
$ export PYTHONPATH="/usr/local/lib/python3.10/site-packages/"

Then, from the current directory, enter the following command (omit the '$' character):
$ ./example.py ../data/inputData.vtu