In Roni Yagel and Hans Hagen, editors,. IEEE Visualization ´97, pages 167â175. IEEE, Novem- ber 1997. [3] H. Carr, J. Snoeyink, and U. Axen. Computing con-.
On the Topology of the Level Sets of a Scalar Field. Valerio Pascucci Lawrence Livermore National Laboratory
Abstract This paper introduces the first algorithm for the construction of the Contour Tree of a 3D scalar field augmented with the Betti numbers of each contour component. The scheme has time complexity and auxiliary storage, where is the number of cells in the domain of the field. Previous schemes [11, 10, 3] computed only the Contour Tree which accounts for the number of components of each isosurface but does not make a distinction among isosurfaces of different topology. For example a toroidal isosurface is not differentiated from a spherical one.
1 Introduction Scalar fields are used to represent data in different application areas like geographic information systems, medical imaging or scientific visualization. One fundamental visualization technique for scalar fields is the display of isocontours: that is sets of points of equal scalar value. For example in terrain models isolines are used to highlight regions of equal elevation. In medical CT scans an isosurface can be used to show and reconstruct the separation between bones and soft tissues. In molecular modeling the representation of the interaction energy between two molecules is a scalar field defined over a six dimensional configuration space. The six dimensions are the three translational and the three rotational degrees of freedom of the relative positions of the two molecules. The isocontours of the field represent all the configurations energetically equivalent. The domain of a scalar field is typically a geometric mesh and the field is provided by associating each vertex in the mesh with a sampled scalar value. If the mesh is a simplicial complex then a piecewise linear field is naturally defined by interpolating linearly, within each simplex, the scalar values at the vertices. The Contour Tree is a graph that represents the relations between the connected components of the isocontours in a scalar field. Two connected components that merge together (as one changes continuously the isovalue ) are represented as two arcs that join in a node of the graph. The pre-computation of the Contour Tree allows to collect structural information relative to the isocontours of the field. This can be used for example to speedup the computation of the
isosurface [11]. The display [2] of the Contour Tree provides the user with direct insight on the structure of the field. Extensions beyond the 3D case [3] are particularly useful because for higher dimensional data [1] the traditional rendering schemes are less intuitive. Especially in those cases the complementary display of the Contour Tree would enhance the user interaction time necessary to “understand” the structure of the data. One fundamental limitation of the Contour Tree is the lack of additional information regarding the topology of the contours. In high pressure chemical simulations [9] hydrogen bonds between the atoms cannot be represented in a traditional way, but can be characterized by isosurfaces of potential fields. The Contour Tree provides important information regarding the clustering of atoms into molecules but fails to discriminate between linear chains and closed rings (or more complex structures) that have different physical behaviors. The approach in [7] computes the Betti numbers of each isosurface extracted to characterize explicitly its topology. Computationally, such an approach becomes very expensive since it requires the explicit computation of the isosurface itself. If applied as a preprocessing stage to precompute all the Betti numbers of all the isocontours in a complexity. scalar field, it would have The first efficient technique for Contour Tree computation in 2D was introduced by de Berg and van Kreveld in [4]. The algorithm proposed has complexity. A simplified version with same complexity in 2D and complexity in higher dimension was proposed by van Kreveld et al. in [11]. This new approach is also used as a preprocessing for an optimal isocontouring algorithm. It computes a small seed set from which any contour can be tracked in optimal running time. The approach has been improved by Tarasov and Vyalyi [10] achieving complexity in the 3D case by a three pass mechanism that allows to resolve the different types of criticalities. Recently Carr, Snoeyink and Axen [3] presented and elegant extension to the general dimensional case based on a two pass scheme that builds a merge-tree and a split-tree that are successively composed into a unique Contour Tree. The aptime complexity in proach achieves any dimension. This paper introduces a new algorithm for the construction in 3D of an augmented Contour Tree where each arc of the tree is associated with the Betti numbers of each conof a mesh, in this case the tour. The first Betti number
isosurface, is the number of its connected components. The second number is the number of tunnels of the mesh. is the number of voids enclosed in The third number the mesh. With the Betti numbers one provides a complete topological characterization of all the isosurfaces. The algorithm provides this additional topological information worst case computation time. within a
of . The function value of the extremum is associated with the leaf nodes of . Each interior vertex of represents the merging and/or splitting of two or more contours for continuous The function value at which a changes of . split/merge occurs is associated with the node. Each arc of represents a contour that remains isolated for ranging between the function values associated with the extremes of the arc.
2 The Contour Tree Consider a scalar field defined as a pair , where is a real valued function and is the domain of . In the following the domain mesh is assumed to be a simplicial complex with vertices The functo be the tion is restricted within each simplex linear interpolation of its values at the vertices. In other is completely defined by the mesh words the field and the set of scalar values where . Since is connected (or processed one connected component at a time) the range of is a simple closed interval with and
Figure 1 shows a 2D scalar field with the associated Contour Tree. Note that the Contour Tree is not a complete 21 21
12
17
20 19
10
18 17
19 11
5
15
13 13
8
20
15
10 14
For simplicity of presentation is also assumed to be a -manifold with boundary ( is a - -manifold) homeomorphic to a -ball. This assumption holds in most practical cases and technically can be removed (making the following discussion more complicated). One fundamental way to study the field is to extract its level sets. For a given scalar the level set of isovalue is defined as the inverse image of onto through :
We call each connected component of the level set a contour. One aspect that is well understood in Morse theory [8] is the evolution of the homotopy types of the contours of while changes continuously in . The points at which the topology of a contour changes are called critical points and the corresponding isovalue is called critical value. The critical points are usually assumed to be isolated. This assumption is not satisfied in general but can be enforced by a small perturbation of the function values . This perturbation procedure is here weakened by simply assuming that the function values are sorted from the smallest to the largest so that This can be enforced with an preprois used to recessing. In the following the order of the solve non-isolated criticalities using the filtration technique of [5]. We follow the notation of [3] and define the Contour Tree as a graph whose vertices are associated each with a function value and whose connectivity represents the relation among the contours of as follows. Each leaf of represents a local extremum where a contour is created or destroyed, for continuous changes
18
16
8
4 5
4
Figure 1: (a) 2D triangular mesh with the contours of the saddles. (b) Corresponding contour tree. Morse graph of since the topological changes of a single contour are not recorded. A more intuitive way to characterize the Contour Tree is the following informal definition: Definition 1 The Contour Tree of is the graph obtained by contracting each contour of to a single point. In the following we show how the Contour Tree can be efficiently computed and augmented in 3D with the complete topological information of each contour. In particular we mark each arc of the tree with the Betti numbers of the corresponding component specifying if it is open or closed and the number of its tunnels. This implies that additional nodes are added to dividing each arc at the critical points where the topology of the corresponding contour changes. For example the event of a contour changing its topology from a sphere to a torus would not be noted in the basic Contour Tree but is registered in this augmented Contour Tree.
3 Construction of the Contour Tree This section gives an outline of the algorithm for the construction of the augmented Contour Tree. More details can be found in [11]. Here we just remark the aspects that allow to avoid complexity degradation in the 3D case while computing the additional topological information.
3.1 Algorithm Outline The algorithm used to build the augmented Contour Tree is based on two successive sweeps of the data (after sorting the vertices by function value). Sweep 1. The mesh is processed from maximum function value to minimum function value. In this stage a set of “merge simplices” are marked. Sweep 2. The mesh is processed from minimum function value to maximum function value. In this stage the Contour Tree is constructed and the Betti numbers of all the contours are reported. We build a filtration of the domain mesh such that processing the simplices in the filtration order is equivalent to sweeping the level sets of . Once this goal is achieved one can identify the set of simplices where contours merge with the filtration technique used in [5] and apply the original Contour Tree construction scheme in [11] maintaining running time in any dimension. This because the tandem search can be formed as in the 2D case starting from the simplex of the filtration where the contours would first merge. Moreover the second sweep tracks the connectivity of the contours allowing one to determine their Betti numbers, as described below, without penalty on the time complexity of the scheme.
3.2 Tracking the Betti Numbers Since we traverse and maintain the level sets we also have the opportunity to count the number of the simplices of any dimension that they contain. In particular in 3D we count the number of vertices, edges and triangles in each contour. Moreover we count the number of boundary edges. Each contour is by definition one connected component of , so its first Betti number is 1. The last Betti number is 0 if the number of boundary edges is greater than 0 (one open surface). Otherwise the ( can be greater contour is a closed surface with than 1 only at the critical values). The second Betti number is be computed as in [7] from the linear equation given by the Euler number of the surface: (1) is the number of -cells in . During the where second sweep we maintain a count of the values by processing the vertices by increasing function value. At each step one vertex is selected and the contours are updated within the set of simplices incident to . In this way each simplex is processed one time for each of its vertices. Since and , the only unknown in (1) is . We dewe know termine from this equation the current vale of so that each
contour is completely characterized topologically. Notice that this allows to determine indirectly what are the additional critical points of the field that do not cause the merge or split of any contour. Figures 2 and 3 show an example of scalar field and corresponding augmented Contour Tree. Figures, 4, 5 and 6 show the same Contour Tree enlarged three times and divided in three pages. Attached to each arc in the tree you can see the three Betti numbers of each component (the first is always 1). The sequence of values on the left report the critical values of the scalar field. If required the method allows also to compute the Betti numbers of contours at the critical values. Observe that, for is a deformasome sufficiently small, the level set tion retract of the region enclosed between and In other words and have the same Betti numbers. Consequently we use the algorithm in [5] to compute the Betti numbers of incrementally with a filtration of that starts from and fills . The resulting output provides the Betti numbers of
4 Conclusions In this paper we have introduced a new efficient algorithm for the pre-computation of all the Betti numbers of all the contours in a scalar field. The algorithm generates the Contour Tree structure augmented with the combinatorial characterization of each contour allowing a better understanding of the structure of scientific datasets. The worst case which is close to complexity of the scheme is of the currently best scheme that the builds only the Contour Tree [3]. The difference of our scheme from the previous approaches is that here we use the filtration technique for tracking the topological changes of the contours in a mesh instead of performing explicit resolution of the singularities. Previous schemes computing only the Contour Tree account only for the number of components of each isosurface but do not make a distinction among isosurfaces of different topology. We plan to exploit this added information for improved interfaces oriented to the visualization of scientific data.
5 Acknowledgments Special thanks go to Ken Joy and Herbert Edelsbrunner for the interesting discussions that helped developing this work. Thanks also go to Peter Lindstrom for his review and constructive comments that helped to improve the presentation of this paper. This work was performed under the auspices of the U.S. Department of Energy by Lawrence Livermore National Laboratory under contract no. W-7405-Eng-48.
1.0000
19447
0.9848
19411
0.9486
19349
0.9399
19332
0.9015
19259
(1, 4, 0)
(1, 3, 0)
(1, 5, 0)
(1, 3, 0)
0.8963
19245
19244
19243
19246
(1, 4, 0)
0.8927
19238 (1, 0, 1)
0.8884
(1, 0, 0)
(1, 0, 0)
0.8378
(1, 0, 0)
19063 (1, 4, 0)
(1, 0, 0)
0.8378
19062
0.8366
, isosurface (d)
(1, 0, 0)
19218
19059 (1, 3, 0)
0.7703
18940
0.6144
18561
(1, 4, 0)
(1, 1, 0)
0.5919
18463 (1, 0, 1)
0.5787
18365 (1, 3, 0)
0.5725
18328
(1, 3, 0)
0.5693
18307 (1, 0, 1)
0.5666
18293
0.5647
(1, 5, 0)
(1, 2, 0)
0.5612
18280
18258
(1, 5, 0)
0.5538
18214
0.5511
18197
0.5503
18190
0.5503
18189
0.5503
18188
(1, 7, 0)
(1, 9, 0)
(1, 11, 0)
(1, 13, 0)
(a)
(b)
(1, 2, 0)
(1, 11, 0)
0.5503
18185 (1, 9, 0)
0.5472
18151 (1, 5, 0)
0.5471
(1, 0, 0)
18146 (1, 3, 0)
0.5402
18088
0.5365
18059
(1, 1, 0)
0.4991
17809 (1, 3, 0)
0.4839
(1, 3, 0)
17630
0.4757
17544
0.4735
17521
0.4726
(1, 2, 0)
(1, 4, 0)
0.4714
, isosurface (c)
17507
17496
0.4602
17374
0.4579
17350
0.4552
17320
(1, 0, 0)
(1, 3, 0)
0.4506
17258
0.4498
(1, 5, 0)
17249 (1, 0, 0)
(1, 0, 0)
0.4485
17233 (1, 0, 0)
0.4476
(1, 2, 0)
17221 (1, 6, 0)
0.4475
17220
0.4472
17216
(1, 6, 0)
0.4465
(1, 0, 0)
0.4457
17210
(1, 2, 0)
(1, 7, 0)
0.4451
17200
17187
0.4431
17155 (1, 8, 0)
0.4403
(1, 0, 0)
17107
0.4388
17087 (1, 6, 0)
0.4388
(c)
(d)
17086 (1, 3, 0)
(1, 8, 0)
0.4374
17066 (1, 6, 0)
0.4340
(1, 0, 0)
0.4331
17015
17007 (1, 8, 0)
Figure 2: (a) Tetrahedral mesh, (b-d) three isosurfaces of isovalues 0.264, 0.456 and 0.765
0.4317
16984
(1, 0, 1)
0.4205
16814
0.4179
16766
0.4173
16758
0.4123
16663
(1, 7, 0)
(1, 8, 0)
(1, 6, 0)
(1, 8, 0)
0.4119
References
(1, 2, 0)
16656
0.4073
(1, 10, 0)
0.4044
16484
0.4039
16471
16557
(1, 12, 0)
0.4012
(1, 0, 1)
(1, 10, 0)
16402 (1, 0, 0)
[1] C. L. Bajaj, V. Pascucci, G. Rabbiolo, and D. R. Schikore. Hypervolume visualization: a challenge in simplicity (color plate p. 172). In Proceedings of the 1998 Symposium on Volume Visualization (VOLVIS98), pages 95–102, New York, October 19–20 1998. ACM Press.
0.4000
11042 (1, 18, 0)
0.3934
10949 (1, 19, 0)
0.3914
10937 (1, 17, 0)
0.3802
10836
(1, 0, 1)
(1, 17, 0)
0.3801
10835 (1, 17, 0)
0.3677
10701
0.3604
(1, 19, 0)
0.3485
10622
10490 (1, 18, 0)
0.3341
10315
0.3148
10107
(1, 16, 0)
(1, 15, 0)
0.3086
10045
(1, 0, 1)
(1, 14, 0)
0.3042
[2] C. L. Bajaj, V. Pascucci, and D. R. Schikore. The contour spectrum. In Roni Yagel and Hans Hagen, editors, ´ pages 167–175. IEEE, NovemIEEE Visualization 97, ber 1997.
(1, 0, 1)
9989 (1, 15, 0)
0.2848
9752
0.2836
9735
(1, 17, 0)
0.2743
, isosurface (b)
(1, 0, 1)
(1, 15, 0)
(1, 0, 0)
(1, 0, 0)
9635 (1, 0, 0)
0.2696
9571 (1, 14, 0)
0.2614
9481 (1, 1, 0)
0.23
(1, 0, 1) (1, 14, 0)
0.2520
9354
9168
(1, 0, 1)
(1, 14, 0)
0.2240
9029 (1, 0, 0)
[3] H. Carr, J. Snoeyink, and U. Axen. Computing contour trees in all dimensions. In Proceedings of the eleventh annual ACM-SIAM symposium on Discrete algorithms, pages 918–926, January 2000. [4] M. de Berg and M. van Kreveld. Trekking in the alps without freezing or getting tired. Algorithmica, 18(3):306–323, July 1997.
0.2193
(1, 16, 0)
0.2170
(1, 0, 1)
8973
(1, 0, 1)
8948
0.2137
(1, 17, 0)
0.2024
8755
0.2011
8740
0.2004
8730
8905
(1, 19, 0) (1, 0, 1)
(1, 21, 0)
(1, 20, 0)
0.2000
5269
5501
0
5484
6742
5434
5243
5272
4020
4009
Figure 3: Global view of the Contour Tree of the scalar field shown in Figure 2. On the left the sequence of critical values of the field.
[5] C. J. A. Delfinado and H. Edelsbrunner. An incremental algorithm for betti numbers of simplicial complexes on the 3-sphere. Computer Aided Geometric Design, 12(7):771–784, 1995. ISSN 0167-8396. [6] H. Edelsbrunner, D. Letscher, and A. Zomorodian. Topological persistence and simplification. In Proceeding of The 41st Annual Symposium on Foundations of Computer Science. IEEE, November 2000. [7] S. F. Konkle, P. J. Moran, B. Hamann, and K. I. Joy. Fast methods for computing isosurface topology with betti numbers. Submitted to Proceedings of Dagstuhl 2000, F. Post, G. Neilson and G.-P. Bonneau, eds. [8] J. Milnor. Morse Theory, volume 51 of Annals of Mathematics Studies. Princeton University Press, 1963. [9] E. Schwegler, G. Galli, and F. Gygi. Water under pressure. Physical Review Letters, 84(11):2429–2432, 2000. [10] S. P. Tarasov and M. N. Vyalyi. Construction of contour trees in 3d in o(n log n) steps. In Proceedings of the fourteenth annual symposium on Computational geometry, pages 68–75, Minneapolis, June 1998. ACM. [11] M. van Kreveld, R. van Oostrum, C. L. Bajaj, V. Pascucci, and D. R. Schikore. Contour trees and small seed sets for isosurface traversal. In Proceedings of the 13th International Annual Symposium on Computational Geometry (SCG-97), pages 212–220, June 1997. Extended version. Techincal report UCRL-JC132016 Lawrence Livermore National Laboratory.
1.000000
19447
0.984800
19411
0.948643
19349
0.939922
19332
0.901531
19259
(1, 4, 0)
(1, 3, 0)
(1, 5, 0)
(1, 3, 0)
0.896352
19245
19244
19243
19246
(1, 4, 0)
0.892751
19238 (1, 0, 1)
0.888429
(1, 0, 0)
(1, 0, 0)
(1, 0, 0)
19218
0.837859
19063 (1, 4, 0)
(1, 0, 0)
0.837845
19062
0.836650
19059
0.770309
18940
0.614412
18561
(1, 3, 0)
, isosurface (d)
(1, 4, 0)
(1, 1, 0)
0.591994
18463 (1, 0, 1)
0.578788
18365 (1, 3, 0)
0.572567
18328
(1, 3, 0)
0.569308
18307 (1, 0, 1)
0.566670
18293
0.564775
(1, 5, 0)
(1, 2, 0)
0.561228
18280
18258
(1, 5, 0)
0.553868
18214
0.551198
18197
0.550396
18190
0.550375
18189
0.550371
18188
(1, 7, 0)
(1, 9, 0)
(1, 11, 0)
(1, 13, 0)
(1, 2, 0)
(1, 11, 0)
0.550349
18185
0.547229
18151
(1, 9, 0)
(1, 5, 0)
0.547197
(1, 0, 0)
18146 (1, 3, 0)
0.540215
18088
0.536576
18059
(1, 1, 0)
0.499174
17809
0.483981
17630
(1, 3, 0)
(1, 3, 0)
Figure 4: Top part of the Contour Tree in Figure 3.
0.475754
0.473563
17544
17521
0.472653
(1, 2, 0)
0.471482
(1, 4, 0)
17496
0.460232
17374
0.457983
17350
0.455291
17320
(1, 0, 0)
(1, 3, 0)
0.450642
17258
0.449810
(1, 5, 0)
17249 (1, 0, 0)
(1, 0, 0)
0.448558
17233 (1, 0, 0)
0.447601
(1, 2, 0)
17221 (1, 6, 0)
0.447595
17507
17220
(1, 0, 0)
0.550349
18185
0.547229
18151
(1, 9, 0)
(1, 5, 0)
0.547197
(1, 0, 0)
18146 (1, 3, 0)
0.540215
18088
0.536576
18059
(1, 1, 0)
0.499174
17809
0.483981
17630
(1, 3, 0)
(1, 3, 0)
0.475754
17544
0.473563
17521
0.472653
(1, 2, 0)
0.471482
(1, 4, 0)
17496
0.460232
, isosurface (c)
17374
0.457983
17350
0.455291
17320
(1, 0, 0)
(1, 3, 0)
0.450642
17258
0.449810
(1, 5, 0)
17249 (1, 0, 0)
(1, 0, 0)
0.448558
17233 (1, 0, 0)
0.447601
(1, 2, 0)
17221 (1, 6, 0)
0.447595
17220
0.447237
17216
(1, 6, 0)
0.446573
(1, 0, 0)
0.445784
17210
(1, 2, 0)
(1, 7, 0)
0.445170
17200
17187
0.443143
17155 (1, 8, 0)
0.440314
(1, 0, 0)
17107
0.438881
17087 (1, 6, 0)
0.438808
17086 (1, 3, 0)
(1, 8, 0)
0.437469
17066 (1, 6, 0)
0.434082
(1, 0, 0)
0.433167
17015
17007 (1, 8, 0)
0.431795
16984
(1, 0, 1)
0.420524
16814
0.417977
16766
0.417334
16758
0.412343
16663
(1, 7, 0)
(1, 8, 0)
(1, 6, 0)
(1, 8, 0)
0.411947
(1, 2, 0)
16656
0.407371
(1, 10, 0)
0.404450
16484
0.403976
16471
16557
(1, 12, 0) (1, 0, 1)
Figure 5: Central part of the Contour Tree in Figure 3. 0.401234
(1, 10, 0)
16402
(1, 0, 0)
0.400000
11042 (1, 18, 0)
0.393432
10949 (1, 19, 0)
0.391441
10937 (1, 17, 0)
0.380205
10836
(1, 0, 1)
(1, 17, 0)
0.380132
10835
0.367726
10701
(1, 17, 0)
0.360412
0.348500
17507
(1, 19, 0)
10490 (1, 18, 0)
0.334107
10315
0.314857
10107
(1, 16, 0)
10622
(1, 7, 0)
0.417977
16766
0.417334
16758
0.412343
16663
(1, 8, 0)
(1, 6, 0)
(1, 8, 0)
0.411947
(1, 2, 0)
16656
0.407371
(1, 10, 0)
0.404450
16484
0.403976
16471
16557
(1, 12, 0)
0.401234
(1, 0, 1)
(1, 10, 0)
16402 (1, 0, 0)
0.400000
11042 (1, 18, 0)
0.393432
10949 (1, 19, 0)
0.391441
10937 (1, 17, 0)
0.380205
10836
(1, 0, 1)
(1, 17, 0)
0.380132
10835
0.367726
10701
(1, 17, 0)
0.360412
(1, 19, 0)
0.348500
10622
10490 (1, 18, 0)
0.334107
10315
0.314857
10107
(1, 16, 0)
(1, 15, 0)
0.308622
10045
(1, 0, 1)
(1, 14, 0)
0.304221
(1, 0, 1)
9989 (1, 15, 0)
0.284845
9752
0.283673
9735
(1, 17, 0)
0.274397
(1, 0, 1)
(1, 15, 0)
(1, 0, 0)
(1, 0, 0)
9635 (1, 0, 0)
0.269626
9571
0.261448
9481
, isosurface (b)
(1, 14, 0)
(1, 1, 0)
0.252038
0.235669
(1, 0, 1) (1, 14, 0) 9354
9168
(1, 0, 1)
(1, 14, 0)
0.224044
9029 (1, 0, 0)
0.219343
(1, 16, 0)
0.217062
(1, 0, 1)
8973
(1, 0, 1)
8948
0.213713
(1, 17, 0)
0.202426
8755
0.201129
8740
8905
(1, 19, 0) (1, 0, 1)
(1, 21, 0)
0.200421
8730 (1, 20, 0)
0.200000
5269
5501
0
5484
6742
5434
5243
5272
4020
4009
Figure 6: Bottom part of the Contour Tree in Figure 3.