volume graphics (lecture 5 : contour tree / contour spectrum) lecture notes acknowledgement : j....

45
Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University

Upload: savannah-harrell

Post on 15-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Volume Graphics(lecture 5 : Contour Tree / Contour Spectrum)

lecture notes acknowledgement : J. Snoeyink, C. Bajaj

Bong-Soo Sohn

School of Computer Science and Engineering

Chung-Ang University

Page 2: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Contour Tree

h(x,y)

x

y

• Definition : a tree with (V,E)– Vertex ‘V’

• Critical Points(CP) (points where contour topology changes , gradient vanishes)

– Edge ‘E’: • connecting CP where an infinite contour class is created and CP where the

infinite contour class is destroyed.• contour class : maximal set of continuous contours which don’t contain

critical points

Page 3: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Properties• Display of Level Sets Topology (Structural Information)

– Merge , Split , Create , Disappear , Genus Change (Betti number change)

• Minimal Seed Set Generation

• Contour Segmentation– A point on any edge of CT corresponds to one contour component

Page 4: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Contour tree

20

25

0

2520

0

Optimal Single-Resolution Isocontouring

Page 5: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

Minimal Seed Set Contour Tree

f

Optimal Single-Resolution Isocontouring

Page 6: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

Minimal Seed SetContour Tree(local minima)

f

Optimal Single-Resolution Isocontouring

Page 7: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

Minimal Seed SetContour Tree

(local maxima)

f

Optimal Single-Resolution Isocontouring

Page 8: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

Minimal Seed Set Contour Tree

fEach seed cell corresponds to a monotonic

path on the contour treeEach seed cell corresponds to a monotonic

path on the contour tree

Optimal Single-Resolution Isocontouring

Page 9: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

Minimal Seed Set Contour Tree

f

For a minimal seed set each seed cell corresponds to a path that is not covered by

any over seed cell

For a minimal seed set each seed cell corresponds to a path that is not covered by

any over seed cell

Optimal Single-Resolution Isocontouring

Page 10: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

Minimal Seed Set Contour Tree

f

Current isovalue

Each connected component of any isocontour corresponds exactly to one

point of the contour tree

Each connected component of any isocontour corresponds exactly to one

point of the contour tree

Optimal Single-Resolution Isocontouring

Page 11: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

Range sweep

Optimal Single-Resolution Isocontouring

Page 12: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Evolution of level sets

• Watch contours of L(v) as v increases

Page 13: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Evolution of level sets

7 89

10

56

4

3

12

Contour tree

Page 14: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Evolution of level sets

7 89

10

56

4

3

12

Contour tree

Page 15: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Evolution of level sets

7 89

10

56

4

3

12

Contour tree

Page 16: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Evolution of level sets

7 89

10

56

4

3

12

Contour tree

Page 17: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Evolution of level sets

7 89

10

56

4

3

12

Contour tree

Page 18: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Evolution of level sets

Contours appear, merge, split, & vanish

7 89

10

56

4

3

12

Contour tree

Page 19: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Morse theory & Contour trees

• Karron et al 95, digital Morse theory• Bajaj et al 97–99, seed sets• Van Kreveld et al 97, 2-D contour tree• Tarasov & Vyalyi 98, 3-D contour tree

Page 20: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

How to compute contour trees without sweeping all level sets

• Build join and split trees

• Merge to form contour tree

• Works in all dimensions...

Page 21: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

The join tree

• Represents set {p | f(p) >= x}

• Can be computed w/out the surface of the level set.

7 89

10

56

4

1

Page 22: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Join tree construction

• Sort data by value

• Maintain union/find for comp. of {p | f(p) >= x}

7 89

10

56

4

Page 23: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Union/Find

• Data structure for integers 1..n supporting:

– Initialize() each integer starts in its own group• for i = 1..n, g(i) = i;

– Union(i,j) union groups of i and j• g(Find(i)) = Find(j);

– Find(i) return name of group containing i• group = i; • while group != g(group), group = g(group); // find group• while i != group,

{nx = g(i), g(i) = group, i = nx} // compress path

• Does n union/finds in O(n a(n)) steps [T72]

Page 24: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Join tree construction

• Sort data by value

• Maintain union/find for comp. of {p | f(p) >= x}

• O(n+ t·α(t) ) after sort

7 89

10

56

4

1

Page 25: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

The split tree

10

3

12

• Represents the set {p | f(p) <= x}

• Reverse join tree computation

Page 26: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Merge join and split trees

10

3

12

7 89

10

56

4

1

7 89

10

56

4

3

12

Page 27: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Merge join and split trees

• Algorithm

Page 28: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

1. Add nodes from other tree

• Nodes have correct up degree in join & down degree in the split tree.

7 89

10

56

4

1

7 89

10

56

4

3

12

3

2

Page 29: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

2. Identify leaves

• A leaf in one tree, with up/down degree < 1 in other tree

7 89

10

56

4

1

7 89

10

56

4

3

12

3

2

Page 30: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

3. Add to contour tree

• A leaf in one tree, with up/down degree < 1 in other tree

7 89

10

56

4

1

7 89

10

56

4

3

1

33

2

Page 31: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

3. Add to contour tree

7 89

10

56

4

1

7 89

10

56

4

3

1

33

2

Page 32: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

3. Add to contour tree

7 89

10

56

4

7 89

10

56

4

3

1

33

2

Page 33: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

3. Add to contour tree

• Note that 4 is not a leaf

7 89

10

56

4

7 89

10

56

4

1

3

2

4

Page 34: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

3. Add to contour tree

• The merge time is proportional to the tree size; much smaller than the data

89

10

56

4

89

10

56

4

1

3

2

4

7

5

Page 35: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

4. Ends with Contour tree

7 89

10

56

4

3

12

Page 36: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Advantages

• Doesn’t need the surface structure to build the contour tree.

• The merge becomes simple, and works on a subset of the points

• The tree structure can advise where to choose the threshold value

• Can cut diff. branches at diff. values.

Page 37: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Flexible contouring

• Threshold diff. areas at diff. values

Page 38: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Flexible contouring

• Threshold diff. areas at diff. Values

• Guided by the Contour Tree

7 89

10

56

4

3

12

Page 39: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Contour Spectrum

• User Interface

• Signature Computation

• Real Time Quantitative Queries

• Topological Information

• Semi-Automatic Isovalue Selection

Page 40: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Input 3D Fuction

• Consider a terrain of which you want to compute the length of each isocontour and the area contained inside each isocontour.

Page 41: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Contour Spectrum :GUI for static data

• Plot of a set of signatures (length, area, gradient ...) as functions of the scalar value .

Page 42: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Contour Spectrum :GUI for time-varying data

(,t ) --> c

The color c is mapped to the magnitude of a signature function of time t and isovalue low

high

mag

nitu

de

Page 43: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Isovalue Selection

Copyright: Chandrajit Bajaj, CCV, University of Texas at Austin

• The contour spectrum allows the development of an adaptive ability to separate interesting isovalues from the others.

Page 44: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Signature Computation

– The length of each contour is a c0 spline function.

The area inside/outside each

isocontour is a C1 spline function.

Page 45: Volume Graphics (lecture 5 : Contour Tree / Contour Spectrum) lecture notes acknowledgement : J. Snoeyink, C. Bajaj Bong-Soo Sohn School of Computer Science

Signature Computation

• In general the size of each isocontour of a scalar field of dimension d is a spline function of d-2 continuity.

• The size of the region inside/outside is given by a spline function of d-1 continuity