Skip to content
Snippets Groups Projects
Commit dd0911d4 authored by wetzels's avatar wetzels
Browse files

Added hint on usage of SetInputArrayToProcess(), since this function has to be...

Added hint on usage of SetInputArrayToProcess(), since this function has to be called with current versions of ttk.
parent 56923d02
Branches
No related tags found
2 merge requests!2Exercise1,!1Exercise 1
......@@ -15,7 +15,7 @@ Your goal now is to create a contour tree to visualize the topology of the datas
For this task, we will use the topology toolkit, an extension of vtk which is available in anaconda by using `conda install -c conda-forge topologytoolkit`. You can then import it in python the same way as vtk.
We now want to use an advanced class of topological trees called ttkFTMTree. Create this tree and connect it to the dataset in the same way as always. You need to set the tree type of this class to type 2 (0: split tree, 1: join tree, 2: contour tree).
We now want to use an advanced class of topological trees called `ttkFTMTree`. Create this tree and connect it to the dataset in the same way as always. You need to set the tree type of this class to type 2 (0: split tree, 1: join tree, 2: contour tree).
We can then create an additional mapper and actor which takes the output of this tree and renders it in the same window as our original dataset. *Caution:* this tree may have multiple outputs, experiment a bit to find out which one you need.
......@@ -23,6 +23,8 @@ The result should look like this:
<img src="https://i.gyazo.com/9f65ce63818eda7eb28d2f26ccde8a6a.gif" width="400">
Depending on your version of TTK, you might have to manually set the scalar array on which the contour tree is computed (note that vtk grids are allowed to have multiple scalar or vector arrays attached). This is done through the `SetInputArrayToProcess` function, which `ttkFTMTree` inherits from `vtkAlgorithm`. The parameters you need here are `(0,0,0,0,<name of the array>)`. You can find documentation on this method in the vtk documentation of `vtkAlgorithm`.
**Summary of Tasks:** Use TTK to compute the contour tree for the given dataset and render the tree and the original domain together in the same window. Save your submission code as `task2.py`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment