Optimal Isosurface Extraction from Irregular Volume Data addendum P. Cignoniy, C. Montaniy, E. Puppoz, R. Scopignox y
Istituto per l’Elaborazione dell’Informazione - Consiglio Nazionale delle Ricerche z
Istituto per la Matematica Applicata – Consiglio Nazionale delle Ricerche x
Istituto CNUCE – Consiglio Nazionale delle Ricerche
October 24, 1996
1 MOTIVATIONS This addendum reports some late results on an improved, stand-alone implementation of the technique for isosurface extraction described in (Cignoni et al., 1996). Results reported in (Cignoni et al., 1996) suffered from an overhead due to a strict integration of the isosurface extraction module with our prototypal multiresolution volviz system TAn, which is based on a tetrahedral representation (TAn is descibed in (Cignoni et al., 1995), and available on the public domain at http://miles.cnuce.cnr.it/cg/TAn.html).
2 IMPLEMENTATION With respect to the algorithm presented in (Cignoni et al., 1996) we have introduced optimized criteria to further reduce the fitting time:
precalculation of normals on dataset vertices; hash indexing over isosurface vertices and normals. Isosurface Normals Given an irregular scalar volume dataset represented by a tetrahedral mesh, we compute gradients of the scalar field at the vertices of the mesh as a preprocessing step. The gradient of the scalar field within each tetrahedron t of the mesh is assumed constant, and it is the gradient of the linear interpolation of the field at the vertices of t. The gradient at each vertex v is pre-computed as the weighted average of normalized S. Maria, 46 - 56126 Pisa ITALY, Email: fcignoni,
[email protected] dei Marini, 6 (Torre di Francia) - 16149 Genova, ITALY, Email:
[email protected] 4 Via S. Maria 36, 56126 Pisa, ITALY, Email:
[email protected] 2 Via
3 Via
1
gradients at all tetrahedra incident at v, where weight for the contribution of a tetrahedron t is given by the solid angle of t at v. The normal at a vertex of the isosurface w is computed during isosurface extraction by linear interpolation of gradients at the endpoints of the edge where w lies. Hash indexing Redundant computation during the extraction of both coordinates and normals of vertices of the isosurface is avoided through a common technique based on hash indexing. Edges of the mesh that define vertices of the isosurface are used as access keys of a hash table built at each isosurface extraction. Each time an active edge of a tetrahedron is processed, the hash table is inquired. If the edge is not present in it, then coordinates and normal of the corresponding isosurface vertex are computed, and stored into the hash table; otherwise, such values are simply read from the hash table. A further advantage of this technique is that the resulting isosurface is directly encoded as an indexed mesh (i.e., an array of vertices plus an array of triples of indices).
3 EXPERIMENTAL RESULTS The new code was tested against the following dataset: Fighter an unstructured dataset built on the Langley Fighter, reporting the result of a wind tunnel model simulation at NASA Langley Research Center. SOD an electron density map of the active site of SOD (superoxide dismutase). This is a regular dataset, provided courtesy of Duncan McRee, Scripps Clinic, La Jolla, CA. Bluntfin a curvilinear dataset, which represents the the airflow over a flat plate with a blunt fin rising from the plate. Provided courtesy of Nasa Ames Res. Center. All three test datasets were represented by adopting a 3D Delaunay triangulation. Numerical results have been obtained on an SGI Indigo (200MHz R4400 cpu, 16K instruction and 16K data caches, 1MB secondary cache, 32MB RAM). Table 1 reports data on the datasets used and on the associated interval trees: the size of the datasets (n, the number of sites); the number m of intervals, which is equal to the number of tetrahedral cells; the depth and the number h of nodes of the interval tree; and the time (in seconds) required to build this data structure. Table 2 reports the efficiency of the interval tree in isosurface fitting. The first two columns of the table specify the threshold selected and the number of facets fitted. Columns 3, 4, and 5 show the times (in CPU seconds) required to extract the isosurface without and with the use of the interval tree, and the corresponding speedup, respectively. The last column reports the average number of facets extracted per second on a set of one hundered extractions with random threshold. Figures 1 and 2 show how the use of the interval tree, together with a hashing strategy, permits to obtain times increasing linearly with the size of the output (number of facets in the isosurface). Figure 3 shows the speedup obtained with the use of the interval tree against an approximation of the fraction of volume data that contains the isosurface (ratio between
2
Dataset Nasa Fighter SOD Bluntfin
nodes (n) 13,832 32,768 40,960
Interval Tree IT depth IT nodes (h) 15 12,538 7 88 16 28,022
intervals (m) 70,125 176,687 224,874
IT build time 1.50 4.64 5.34
Table 1: Data on the interval tree for test datasets (times are CPU seconds on SGI R4400 200 MHz). Dataset Bluntfin 224K cells
SOD 176K cells
Fighter 70K cells
Fitting parameters thresh. facets 3.5 4,123 3.0 5,965 2.5 7,811 2.0 11,742 1.5 16,458 1.0 31,782 35 3,603 30 4,587 25 5,596 20 7,766 15 13,845 10 28,683 2.50 977 2.25 4,698 2.00 10,386 1.75 21,381 1.50 38,588 1.25 48,404
IT off 0.27 0.28 0.29 0.32 0.36 0.46 0.22 0.22 0.23 0.25 0.29 0.40 0.08 0.11 0.16 0.25 0.39 0.46
Timings IT on Speedup 0.02 13.5 0.04 7.0 0.05 5.8 0.08 4.0 0.12 3.0 0.25 1.8 0.02 11.0 0.03 7.3 0.04 5.7 0.05 5.0 0.10 2.9 0.23 1.7 0.01 8.0 0.03 3.6 0.08 2.0 0.17 1.4 0.33 1.1 0.40 1.1
Avg. facets per second
138k
123k
119k
Table 2: Fitting times on test datasets, with and without the interval tree (in CPU seconds). the number of fitted facets an the number of cells); obviously, greatest speedups are obtained on isosurfaces of small size, i.e. when the traversal phase dominates the whole extraction process.
4 CONCLUSIONS We have presented and tested a speedup method for isosurface extraction that is based on the interval tree. The method achieves optimal output-sensitive time complexity in extracting active cells, while it requires a moderate memory overhead on realistic data structures for irregular volume data (tetrahedral models).
3
Sod 0.8 Hash & IT no Hash & IT no Hash & no IT
0.7 0.6
Secs
0.5
0.4
0.3 0.2
0.1
0 0
10000
20000
30000 40000 Isosurface Facets
50000
60000
70000
Figure 1: Timing for Sod dataset
ACKNOWLEDGEMENTS This document is available in .ps format at our web site (http://miles.cnuce.cnr.it/cg/bibliography.html). This work was partially founded by the Progetto Coordinato“Modelli multirisoluzione per la visualizzazione di campi scalari multidimensionali” of the Italian National Research Council (CNR). We wish to thank those who have made available on the public domain the datasets used in the evaluation of the proposed techniques.
References Cignoni, P., Montani, C., Puppo, E., and Scopigno, R. (1995). Multiresolution Modeling and Visualization of Volume Data. Technical Report 95-22, Istituto CNUCE – C.N.R., Pisa, Italy. Cignoni, P., Montani, C., Puppo, E., and Scopigno, R. (1996). Optimal isosurface extraction from irregular volume data. In Proceedings of IEEE 1996 Symposium on Volume Visualization, page (in press). ACM Press.
4
Nasa Fighter 0.5 Hash & IT no Hash & IT no Hash & no IT
0.45 0.4 0.35
Secs
0.3 0.25 0.2 0.15 0.1 0.05 0 0
5000
10000 15000 20000 25000 30000 35000 40000 45000 50000 Isosurface Facets
Figure 2: Timing for Fighter dataset
Fighter Sod Bluntfin
14
12
Speedup
10
8
6
4
2
0 0
0.1
0.2
0.3 0.4 Volume Fraction
0.5
Figure 3: Speedup vs. Volume Fraction (triangles / cells )
5
0.6
0.7