From dd0911d46bbdfdd653779213e4b26bcd5d94e260 Mon Sep 17 00:00:00 2001 From: wetzels <wetzels@rhrk.uni-kl.de> Date: Wed, 14 Sep 2022 14:57:49 +0200 Subject: [PATCH] Added hint on usage of SetInputArrayToProcess(), since this function has to be called with current versions of ttk. --- ex8/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ex8/README.md b/ex8/README.md index 4a0d3a0..2aafbdc 100644 --- a/ex8/README.md +++ b/ex8/README.md @@ -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`. -- GitLab