Electron Denisty, Isosurfaces and Contour Trees: Jack Snoeyink GCMB'07

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 36

Electron denisty, isosurfaces and contour trees

Jack Snoeyink GCMB07

Outline

Electron density (3D scalar fields) The topology of isosurfaces/level sets The Contour tree
Join tree + Split tree

Applications
Flexible contouring Contour simplification

Density data f:Domain R


My route into geometric computation in molec. bio. GIS: Geographic Information Systems
Terrain models Watersheds

Molecular Scene Analysis


J. Glasgow & S. Fortier (Queens)

From crystal to structure

Data from X-ray diffraction Electron density maps Threaded backbone ...

Density to surface

We start with the easiest of these steps... Assume we have density, e.g., from the Uppsala Electron Density Server

Level sets in density data

Many technologies give density samples: f(p) on a 3-D grid.


Define Level Sets, a.k.a. isosurfaces, L(v)={p | f(p) = v}. Requires interpolation.

Level sets in density data

Many technologies give density samples: f(p) on a 3-D grid.


Define Level Sets, a.k.a. isosurfaces, L(v)={p | f(p) = v}. Define Contour as a connected component of the level set.

The Marching Cubes algorithm extracts an isosurface


+

+ +

Test values at cube corners to identify cube edges that intersect the isosurface. 28 cases reduce to 14-16 cases by rotations. Make triangles to represent portion of level set in cube.

Lorensen & Cline 87, Marching cubes Nielsen & Hamma 91, fix ambiguities

Cases

Ambiguity in cases w/ separate loops

Contour following
+

Can follow contour if we know a start point. How to find start point?

Shinagawa et al. 91, extreme graph Cignoni et al. 95, interval tree Carr et al. 03, contour tree

Evolution of level sets

Watch contours of L(v) as v increases

Evolution of level sets

Contour tree 7 5 8

9
6

10

4
3 1 2

Evolution of level sets

Contour tree 7 5 8

9
6

10

4
3 1 2

Evolution of level sets

Contour tree 7 5 8

9
6

10

4
3 1 2

Evolution of level sets

Contour tree 7 5 8

9
6

10

4
3 1 2

Evolution of level sets

Contour tree 7 5 8

9
6

10

4
3 1 2

Evolution of level sets

Contour tree 7 5 8

9
6

10

4
3 1 2

Contours appear, merge, split, & vanish

Morse theory & Contour trees

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

How to compute contour trees without sweeping all level sets

Build join and split trees Merge to form contour tree Works in all dimensions...

The join tree

7
5

8
4

9
6

10

Represents set

{p | f(p) >= x}

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

Join tree construction


7
5 4

9
6

10

Sort data by value Maintain union/find for comp. of {p | f(p) >= x}

Union/Find

1 2 3 4 . . . 42

... n

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]

Join tree construction


7
5 4

9
6

10

Sort data by value Maintain union/find for comp. of {p | f(p) >= x} O(n+ t(t) ) after sort

The split tree

Represents the set


{p | f(p) <= x}

10

Reverse join tree computation


3 1 2

Merge join and split trees


9 6 4 3 1 1 10 10 7 10 6 4 3

1. Add nodes from other tree


7
5 4 8 9 6 10

7
5

8
4

9 6

10

3
1 2 1

3
2

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

2. Identify leaves
7
5 4 8 9 6 10

7
5

8
4

9 6

10

3
1 2 1

3
2

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

3. Add to contour tree


7
5 4 8 9 6 10

7
5

8
4

9 6

10

3
1 1

3
2

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

3. Add to contour tree


7
5 4 8 9 6 10

7
5

8
4

9 6

10

3
1 1

3
2

3. Add to contour tree


7
5 4 8 9 6 10

7
5

8
4

9 6

10

3
1

3
2

3. Add to contour tree


7
5 4 8 9 6 10

7
5

8
4

9 6

10

3
1 2

Note that 4 is not a leaf

3. Add to contour tree


8 5 4 9 6 5 4 10

9 6

10

7 5 4

3
1 2

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

4. Ends with Contour tree


10 6 4 3 1

Advantages

Doesnt 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.

Flexible contouring

Threshold diff. areas at diff. values

Flexible contouring

Threshold diff. areas at diff. Values Guided by the Contour Tree


7 5 4 8 9 10

3
1 2

You might also like