Algorithms for Visualization: Constructing Contour Trees 1 - - PowerPoint PPT Presentation

algorithms for visualization constructing contour
SMART_READER_LITE
LIVE PREVIEW

Algorithms for Visualization: Constructing Contour Trees 1 - - PowerPoint PPT Presentation

Algorithms for Visualization: Constructing Contour Trees 1 Raghavendra G S PhD Student, Visualization and Graphics Lab, CSA, IISc. July 6th, 2017 1 Hamish Carr, Jack Snoeyink, and Ulrike Axen. Computing contour trees in all dimensions.


slide-1
SLIDE 1

Algorithms for Visualization: Constructing Contour Trees 1

Raghavendra G S

PhD Student, Visualization and Graphics Lab, CSA, IISc.

July 6th, 2017

1Hamish Carr, Jack Snoeyink, and Ulrike Axen. “Computing contour trees in all dimensions.” Computational Geometry 24.2

(2003): 75-94. Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 1 / 45

slide-2
SLIDE 2

Introduction

Introduction

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 2 / 45

slide-3
SLIDE 3

Introduction

Scientific Visualization

2http://www.cc.gatech.edu/scivis/tutorial/linked/whatisscivis.html

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 3 / 45

slide-4
SLIDE 4

Introduction

Scientific Visualization

Scientific Visualization (SciVis)2 is the representation of data graphically as a means of gaining understanding and insight into the scientific data.

2http://www.cc.gatech.edu/scivis/tutorial/linked/whatisscivis.html

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 3 / 45

slide-5
SLIDE 5

Introduction

Why algorithms for SciVis?

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 4 / 45

slide-6
SLIDE 6

Introduction

Why algorithms for SciVis?

Automate the process/minimize human intervention.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 4 / 45

slide-7
SLIDE 7

Introduction

Why algorithms for SciVis?

Automate the process/minimize human intervention. Spatio-temporal nature of data.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 4 / 45

slide-8
SLIDE 8

Introduction

Why algorithms for SciVis?

Automate the process/minimize human intervention. Spatio-temporal nature of data.

Huge data size.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 4 / 45

slide-9
SLIDE 9

Introduction

Why algorithms for SciVis?

Automate the process/minimize human intervention. Spatio-temporal nature of data.

Huge data size.

Real-time visualization.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 4 / 45

slide-10
SLIDE 10

Introduction

Today’s Agenda

Visualization Scientific Visualization (Data with geometry information) Information Visualization (Data without geomtery information) Scalar Field Visualization Vector Field Visualization T ensor Field Visualization Tree/Graphs/Network Visualization T ext/Document Visualization Isosurfaces T

  • pological Methods

Contour Trees

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 5 / 45

slide-11
SLIDE 11

Background

Background

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 6 / 45

slide-12
SLIDE 12

Background

Some background

Scalar fields.

f : R2,3 − → R

Isovalue.

Real value v in the range.

Level sets.

All points p ∈ R2,3 s.t. f (p) = v Can have many components.

Isosurfaces.

When the domain is R3

Topological Structures.

Stick figures. Succinct representation of the functions.

Figure: Top Scalar field defined on R2 a Middle Isocontours and contour treeb

afrom Wikipedia bfrom Rephael Wagner,

“Isosurfaces: geometry, topology, and algorithms”, 2013. Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 7 / 45

slide-13
SLIDE 13

Background

The data

Continuity? Data representation. Dividing cubes into tetrahedra. Triangulation. Linear interpolation.

Figure: Top Example mesh/grid a Bottom Dividing a cubeb

afrom Wang et al. “Three-dimensional DC anisotropic

resistivity modelling using finite elements on unstructured grids”. Geophys J Int 2013.

bfrom Rephael Wagner

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 8 / 45

slide-14
SLIDE 14

Background

More about Isosurfaces

Figure: Left: Data set. Right:Isosurfaces.3

3from Alexandru Telea, “Data visualization: principles and practice”. CRC Press, 2014.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 9 / 45

slide-15
SLIDE 15

Background

More about Isosurfaces

Figure: Marching cubes lookup table.4

4from Wikipedia

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 10 / 45

slide-16
SLIDE 16

Contour trees

Contour trees

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 11 / 45

slide-17
SLIDE 17

Contour trees

Problems/Why contour trees?

Figure: Need for contour tree.5

5from Rephael Wagner,“Isosurfaces: geometry, topology, and algorithms”, 2013.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 12 / 45

slide-18
SLIDE 18

Contour trees

What are contour trees?

We can see how the level sets evolve by changing the isovalues

Figure: Evolution of level sets6

6from J.Snoeyink,C Bajaj

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 13 / 45

slide-19
SLIDE 19

Contour trees

What are contour trees?

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 14 / 45

slide-20
SLIDE 20

Contour trees

What are contour trees?

Contour tree tracks the changes in the connectivity of level sets of the function.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 14 / 45

slide-21
SLIDE 21

Contour trees

What are contour trees?

Contour tree tracks the changes in the connectivity of level sets of the function. It has set of nodes where connectivity of level sets change.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 14 / 45

slide-22
SLIDE 22

Contour trees

What are contour trees?

Contour tree tracks the changes in the connectivity of level sets of the function. It has set of nodes where connectivity of level sets change. It has set of edges which connects these nodes in a meaningful manner.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 14 / 45

slide-23
SLIDE 23

Contour trees

What are contour trees?

Running Example

Figure: Evolution of level sets7

7from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 15 / 45

slide-24
SLIDE 24

Contour trees

What are contour trees?

Running Example

Figure: Evolution of level sets8

8from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 16 / 45

slide-25
SLIDE 25

Contour trees

What are contour trees?

Running Example

Figure: Evolution of level sets9

9from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 17 / 45

slide-26
SLIDE 26

Contour trees

What are contour trees?

Running Example

Figure: Evolution of level sets10

10from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 18 / 45

slide-27
SLIDE 27

Contour trees

What are contour trees?

Running Example

Figure: Evolution of level sets11

11from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 19 / 45

slide-28
SLIDE 28

Contour trees

What are contour trees?

Running Example

Figure: Evolution of level sets12

12from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 20 / 45

slide-29
SLIDE 29

Contour trees

More background

Link.

Lower link (LL). Upper link (UL).

Critical points.

Maxima (Empty UL). Minima (Empty LL). Saddle (UL/LL not simply connected).

Identifying by Lower links Nodes of Contour tree are all critical points.

Minimum Regular Saddle Maximum

Figure: Top Link in Triagulationsa Middle/Bottom Classification based on LLb

afrom Wikipedia bfrom slides by Julian Tierny

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 21 / 45

slide-30
SLIDE 30

Contour trees

Evolution in terms of Critical points

Minima = ⇒ Level set component is created. Maxima = ⇒ Level set component is destroyed. Saddle = ⇒ Level set components split or join.

Figure: Contour Tree13 Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 22 / 45

slide-31
SLIDE 31

Algorithm

Algorithm

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 23 / 45

slide-32
SLIDE 32

Algorithm

Join tree + Split tree = Contour Tree

Join tree. Split tree.

Figure: Join tree + Split tree = Contour Tree14

14from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 24 / 45

slide-33
SLIDE 33

Algorithm

Algorithm

15from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 25 / 45

slide-34
SLIDE 34

Algorithm

Algorithm

Construct Join tree.

15from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 25 / 45

slide-35
SLIDE 35

Algorithm

Algorithm

Construct Join tree. Construct Split tree.

15from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 25 / 45

slide-36
SLIDE 36

Algorithm

Algorithm

Construct Join tree. Construct Split tree. Merge them to get Contour tree.

15from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 25 / 45

slide-37
SLIDE 37

Algorithm

Algorithm

Construct Join tree. Construct Split tree. Merge them to get Contour tree.

Figure: Join tree + Split tree = Contour Tree15

15from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 25 / 45

slide-38
SLIDE 38

Algorithm

Some observations and details

Joins are easy to track but splits aren’t. Why/how?

16from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 26 / 45

slide-39
SLIDE 39

Algorithm

Some observations and details

Joins are easy to track but splits aren’t. Why/how? Notice that Split tree is actually Join tree for the function swept in

  • pposite direction.

16from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 26 / 45

slide-40
SLIDE 40

Algorithm

Some observations and details

Joins are easy to track but splits aren’t. Why/how? Notice that Split tree is actually Join tree for the function swept in

  • pposite direction.

Use Union-Find (UF) to track joins.

Figure: Join tree + Split tree = Contour Tree16

16from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 26 / 45

slide-41
SLIDE 41

Algorithm

Algorithm for Join/Split Tree

Sort all the vertices in the domain based on function values.

Figure: Algorithm17

17from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 27 / 45

slide-42
SLIDE 42

Algorithm

The output

Figure: Algorithm18

18from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 28 / 45

slide-43
SLIDE 43

Merging trees

Merging trees

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 29 / 45

slide-44
SLIDE 44

Merging trees

How to merge?

19from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 30 / 45

slide-45
SLIDE 45

Merging trees

How to merge?

Remember retrieving binary trees using two traversals?

19from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 30 / 45

slide-46
SLIDE 46

Merging trees

How to merge?

Remember retrieving binary trees using two traversals? Nodes have correct up degree in split and down degree in the join tree.

19from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 30 / 45

slide-47
SLIDE 47

Merging trees

How to merge?

Remember retrieving binary trees using two traversals? Nodes have correct up degree in split and down degree in the join tree. Leaf in one tree has up/down degree ≤ 1 in other tree.

19from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 30 / 45

slide-48
SLIDE 48

Merging trees

How to merge?

Remember retrieving binary trees using two traversals? Nodes have correct up degree in split and down degree in the join tree. Leaf in one tree has up/down degree ≤ 1 in other tree.

Figure: Observations for merging.19

19from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 30 / 45

slide-49
SLIDE 49

Merging trees

Merge Algorithm

Initialize CT to be an empty graph on vertices of JT. Construct a queue of leaves.

if updegree(vi) in ST + lowdegree(vi) in JT ≤ 1 enqueue.

While QueueSize > 1

Dequeue first vertex vi from the Queue. If vi is the upper leaf, find incident arc (vi, vj) ∈ ST Else find incident arc (vi, vj) ∈ JT Add (vi, vj) to CT Remove vi from both JT and ST. If vj is a leaf then Enqueue vj.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 31 / 45

slide-50
SLIDE 50

Merging trees

Merge Algorithm

Running Example

Figure: Working of Merge algorithm20

20from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 32 / 45

slide-51
SLIDE 51

Merging trees

Merge Algorithm

Running Example

Figure: Working of Merge algorithm21

21from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 33 / 45

slide-52
SLIDE 52

Merging trees

Merge Algorithm

Running Example

Figure: Working of Merge algorithm22

22from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 34 / 45

slide-53
SLIDE 53

Merging trees

Merge Algorithm

Running Example

Figure: Working of Merge algorithm23

23from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 35 / 45

slide-54
SLIDE 54

Merging trees

Merge Algorithm

Running Example

Figure: Working of Merge algorithm24

24from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 36 / 45

slide-55
SLIDE 55

Merging trees

Merge Algorithm

Running Example

Figure: Working of Merge algorithm25

25from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 37 / 45

slide-56
SLIDE 56

Merging trees

Merge Algorithm

Running Example

Figure: Working of Merge algorithm26

26from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 38 / 45

slide-57
SLIDE 57

Analysis

Analysis

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 39 / 45

slide-58
SLIDE 58

Analysis

Runtime Analysis

Running time for data containing n vertices and N simplices/triangles, is given by O(n log n + Nα(N)). O(n log n) for the initial sorting of the vertices based on function values. O(Nα(N)) is for the union find algorithm. What about correctness? Skipped due to time constraint.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 40 / 45

slide-59
SLIDE 59

Application

Application

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 41 / 45

slide-60
SLIDE 60

Application

One application

Flexible Isosurfaces

Figure: Flexible Isosurfaces27

27from Hamish Carr et al.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 42 / 45

slide-61
SLIDE 61

Conclusion

Conclusion

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 43 / 45

slide-62
SLIDE 62

Conclusion

Conclusions

Conclusions We have a simple algorithm for constructing contour trees. Works for all dimensions. based on split/join trees followed by a merging algorithm.

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 44 / 45

slide-63
SLIDE 63

Conclusion

Thank You

Raghavendra G S (VGL CSA, IISc) Constructing Contour Trees July 6th, 2017 45 / 45