Parameterizing Marching Cubes Isosurfaces with

3 downloads 0 Views 760KB Size Report
parameterization consists of a planar triangulation which is isomorphic (maps ... to generalized barycentric coordinates (see [2], [24], [5], [6], [15] ) and planar ...
G. M. Nielson, L. Zhang, K. Lee, A. Huang, Parameterizing Marching Cubes Isosurfaces with Natural Neighbor Coordinates, In: Advances in Geometric Modeling and Processing 2008, LNCS, 4975, pp. 315-328, Springer 2008. ISBN 978-3-540-79245-1, www.springerlink.com/content/978-3-540-79245-1/

Parameterizing Marching Cubes Isosurfaces with Natural Neighbor Coordinates Gregory M. Nielson1 , Liyan Zhang2 , Kun Lee3 and Adam Huang4 2

1 Arizona State University, Tempe, AZ, USA Nanjing University of Aeronautics and Astronautics, Nanjing, China 3 Handong Global University, Pohang, Kyungbuk, South Korea 4 National Taiwan University Hospital, Taipei, Taiwan

Abstract. The triangular mesh surfaces (TMS) which result form the Marching Cubes (MC) algorithm have some unique and special properties not shared by general TMS. We exploit some of these properties in the development of some new, effective and efficient methods for parameterizing these surfaces. The parameterization consists of a planar triangulation which is isomorphic (maps one-to-one) to the triangular mesh. The parameterization is computed as the solution of a sparse linear system of equations which is based upon the fact that locally the MC surfaces are functions (height-fields). The coefficients of the linear system utilize natural neighbor coordinates (NNC) which depend upon Dirchlet tessellations. While the use of NNC for general TMS can be somewhat computationally expensive and is often done procedurally, for the present case of MC surfaces, we are able to obtain simple and explicit formulas which lead to efficient computational algorithms. Keywords: Marching Cubes, Parameterization, Natural Neighbor Coordinates.

1 Introduction Triangle mesh surfaces (TMS) have become widely used as a convenient method of representing surfaces. The need for parameterizations of these surfaces has been well established in the literature. Methods which are nearly isometric (see [12]) and which approximately preserve area (see [2]), angles (see [9], [10], [20]), or shape (see [3]) have recently been discussed. Additional interest is based upon a strong connection to generalized barycentric coordinates (see [2], [24], [5], [6], [15] ) and planar graphs (see [7], [22], [23]). The particular triangle mesh surfaces which are produced by the Marching Cubes (MC) algorithm represent a growing and important special subset of TMS. These special TMS have some interesting and special properties not shared by general TMS. We exploit some of these properties in order to develop some efficient and effective methods for parameterizing these surfaces. In a nutshell: 1. We first note that with the proper edge choices (see [17]), the surface segment of a MC surface consisting of all triangles containing a vertex and all its neighbors (the

315

1-ring or star) is a single-valued function (height-field) relative to a domain perpendicular to the edge (of the 3D rectilinear lattice) containing the vertex. See Fig. 2. 2. Next, we represented the domain point of the vertex in terms of the domain points of its neighbors using natural neighbor coordinates (NNC). This yields the domain point of a vertex as a convex combination of the domain points of its neighbors. See Fig. 4. One of the unique contributions here is the fact that we are able to obtain simple, explicit representations (see Eq. (2) ) which can be contrasted with the usual procedural approach used for NNC. 3. Next, this same linear constraint (convex combination) is imposed on the corresponding points in the parameter domain. The solution of this linear system, along with boundary constraints, yields a parameterization. 4. We further enhance the efficiency of the technique by noting that is sufficient to parameterize a subset (tiling) of the surface with edges on the 4*-network. The 4*network is a subset of the edges of the MC surface lying on a collection of mutually orthogonal planes. See Fig. 1.

2 Parameterization using Nearest Neighbor Coordinates Prior to the specifics of our particular method, we include some general background and notation that will be used. In general, the geometry of a triangular mesh surface S , consists of a list of vertices Pn = (xn , yn , zn ), n = 1,L, N . The topology consists of a list of triple indices specifying the triangles of S, N T = { (i, j, k ) : Vi ,V j ,Vk are vertices of triangle of S }. It is also useful to specify the topology with an edge list, N e = { (i, j ) : Vi ,V j is an edge of S } . For the most part, we

are interested in triangular mesh, isosurfaces with boundaries which are topologically equivalent to a disc. We use ∂S to denote the polygonal boundary and the collection of indices of the vertices on the boundary is denoted by N ∂ . A planar parameterization of S consists of a polygon bounded, planar domain Q containing the points Qn = (s n , t n ), n = 1,L, N which correspond one-to-one to the points Pn of S. The boundary of Q is denoted by ∂Q with boundary indices, N ∂Q exactly the same as N ∂ and the topology of S inherited by Q must be a valid 2D triangulation. This means that the triangles Qi , Q j , Q k , (i, j, k ) ∈ N T collectively cover P and only intersect at the common edges. The parameterization is the piecewise linear map, Φ , which maps each triangle of Q to the corresponding triangle of S. The map is one-to-one and onto. Input to marching cubes algorithms consists of a three dimensional array of values Fi , j ,k = F (iΔx, jΔy , kΔz ) representing samples of a function over a rectilinear grid

316

consisting of lattice points

{ (iΔx, jΔy, kΔz), i = 1,L, N ; j = 1,L, N x

y

; k = 1,L, N z }. For

a given threshold value, α , the MC algorithm produces a triangular mesh surface which separates the lattice points with Fi , j , k > α from those with Fi , j , k ≤ α . The basic strategy of the MC algorithm consists of producing fragments of the surface one voxel (lattice cell) at a time. Details for the implementation of the MC algorithm including how to obtain the topology information by only one pass through the voxels can be found in [16]. We now make some observations about the special structure of the triangular mesh surfaces produced by the MC algorithm. Let S be the triangular mesh surface produced by the MC algorithm and consider the planar slices of S: X i = S ∩ { ( x, y, z ) : x = iΔx }, i = 1,L, N x , Y j = S ∩ { ( x, y, z ) : y = jΔy }, j = 1,L, N y ,

Z k = S ∩ { ( x, y , z ) : y = kΔz }, k = 1,L, N z . These three collections form a mutually orthogonal network of planar, polygon curves lying on the surface S. Each vertex Vi ∈ S is at the intersection of exactly two of these planar polygons; one from one of the collection of planar curves and the other from a collection that is orthogonal to it. An example of the 4*-network is shown in Fig. 1. We note that the valence of each vertex in the 4*-network is always four (except on the boundary) and the polygon patches are those provided by the various cases of the MC algorithm and will have 3, 4, 5 or 6 vertices. For a general Pi we denote the four neighbor points as PN , PS , i

PE i and PWi .

For example, if

i

Pi = ( jΔx, kΔy, z ) then PN = ( jΔx, y , z ), y > kΔy , i

PS = ( jΔx, y, z ), y ≤ kΔy PW = (x, kΔy , z ), x > jΔx, PE = (x, kΔy, z ), x ≤ jΔx . This is i

i

i

illustrated in Fig. 2.

Fig. 1. The Marching Cubes triangular mesh surface is shown on the left and the 4*-network is shown on the right.

317

PN i

PWi

PEi

Pi

PSi

Fig. 2. The notation for the vertices of the 4*-network is illustrated. Also it is noted that the full star (1-ring) is a single-valued function relative to the plane perpendicular to the edge containing Pi = ( jΔx, kΔy , z ) .

It has previously been established (see [4] & [18] ) that it is sufficient to only utilize the topology (edge connectivity) of the 4* network for a parameterization of a MC isosurface. This means that we only have to solve a linear system of the form Q i = C N Q N + C S Q S + C E Q E + CW QW , i ∉ N ∂ i

i

i

i

i

i

i

i

Qi ∈ ∂ , i ∈ N ∂

(1)

where CN ≥ 0, CS ≥ 0, CE ≥ 0, CW ≥ 0 , C N + C S + C E + CW = 1 . i

i

i

i

i

i

i

i

The solution of (1) will lead to a tiling which can be subsequently triangulated leading to a parameterization of the MC surface S . See Fig. 3. We now set out to define the coefficients, C N , CS , CE , CW . With Fig. 2 in mind, we project the points i

i

i

i

PN , PS , PE and PW onto the domain plane perpendicular to the edge of the 3D i

i

i

i

lattice containing Pi and move to a local coordinate system where we introduce the

values N i , S i , E i and Wi so that domain point (0, N i ) corresponds with PN ;

(0, Si )

i

corresponds with PS ; (Wi ,0) corresponds with PW and (Ei ,0) corresponds i

i

with PE and the domain point (0,0) corresponds with the point Pi . i

illustrated in Fig. 4.

318

This is

PNi PWi

QWi

Pi

PEi

Qi

QNi

Q Si

PSi

Q Ei Fig. 3. Center image shows the tiling of the 4*-Network which will lead to a parameterization of the MC triangular mesh surface.

319

(0, N i )

(Wi ,0)

( E i ,0 )

(0,0)

(0, Si )

Fig. 4. The domain points of the 4*-network points.

We now need to compute the natural neighbor coordinates (NNC) of domain point in terms of the domain points of the 4* neighbors. That is, we need the coefficients C N , C S , C E , CW so that

(0,0)

i

i

i

i

(0,0) = CN (0, Ni ) + CS (0, Si ) + CE (Ei ,0) + CW (Wi ,0) i

i

i

i

i = 1,L, N ; i ∉ N ∂ .

Before we proceed, we regress with a short discussion on natural neighbor coordinates (NNC) (see [14]). Given a collection of planar points (xi , yi ) , the

Dirichlet tile τ (xi , y i ) for the point (xi , yi ) is the region consisting of all those points which are closer to (xi , yi ) than any other point in the collection. Two existing points are called neighbors if their tiles share a common edge. Let (x, y ) be an arbitrary point in the convex hull of the collection of points. If this point is inserted into the tessellation, it then acquires it own tile τ (x, y ) , made of portions of tiles of existing points, called neighbors of (x, y ) . This is illustrated in Fig. 5. Assume that (x, y ) has m neighbors (x1 , y1 ),L, (xm , ym ) . Now let u (x, y ) be the area of that portion of the Dirichlet tile τ (x, y ) . Moreover, let ui (x, y ) be the area of that portion of the Dirichlet tile τ (x, y ) that intersects the tile τ (xi , y i ) , the NNC is then defined to be

ui (x, y ) for i = 1,L, m . In the case where the u (x, y ) collection of points consist of only three points, then NNC are the barycentric coordinates. In the same manner that barycentric coordinates give rise to piecewise linear interpolation over triangulated domains. The NNC can be used to define a function which interpolates to dependent values Fi at (x i , y i ) . This interpolant has been discussed by Sibson [21], Watson [26] and Boissonnat et al. [ 1].

the ratio of these two areas, namely

320

Fig. 5. The Dirichlet tiles of existing points are shown and the Dirichlet tile of the inserted point is boldly outlined.

From Fig. 6, we can easily see that

C Xi =

AX i AN i + AEi + AWi + ASi

,

X = N , S , E, W

and so we need only compute the areas AN , AE , AW and AS . Two of these i

i

i

i

regions are triangles and two are trapezoids and so we have AN =

− 2 Ei2Wi Si + 2 EiWi 2 Si − N iWi Si2 + N i Ei Si2 8EiWi

AE =

N iWi Si2 − N i2Wi Si 8EiWi

AW =

N i2 Ei Si − N i Ei Si2 8EiWi

AS i =

2 N i Ei2Wi − 2 N i EiWi 2 + N i2Wi Si − N i2 Ei Si 8EiWi

i

i

i

AN + AE + AW + AS = i

i

i

(2)

(Ei − Wi )(N i − Si ) 4

i

321

We have left the above expressions unsimplified in order to more fully reveal the symmetry involved. The formulas of (2) are based upon Fig. 6 and therefore assume that N i Si ≥ EiWi . For the other case, symmetric formulas based upon switching the roles of N i , Si and Ei ,Wi must be used and subsequently simplified for efficient implementation.

(0, N i )

(Wi ,0)

(0,0) AWi

( E i ,0 )

AN i

ASi

AEi

(0, Si ) Fig. 6. The Domain points of the 4*-network vertices and the Dirichlet tile of the domain points of

Pi

is boldly outlined. The four intersection areas are labeled.

3 Examples We show several examples that illustrate the use of this new method of parameterizing MC isosurfaces. The new method does not apply to general TMS and only applies to TMS within the context of the MC algorithm. Consequently, all of the examples here have an underlying field function from which the TMS is extracted by means of the MC algorithm (see [16]). If an extracted TMS is manipulated (e. g. an affine map is applied), then the embedding of the TMS in its rectilinear lattice must be reestablished prior to the application of the present method. 3.1 Geometric Representation of a Casting of a Mechanical Part

The need to parameterize the geometry of mechanical parts arises often in CAD applications. An example, using the techniques described here is shown in Fig. 7 and Fig. 8.

322

Fig. 7. The left image shows the MC isosurface of the geometry of a casting for the fabrication of a mechanical part. The right image illustrates the parameterization with one of the collection of 4*-network curves.

Fig. 8. The images illustrate the use of the parameterization for re-sampling the surface. This not only illustrates a practical use (tool path control) of the parameterization, but also a method for graphically assessing the quality of a particular parameterization.

3.2 Brain Morphology and Flattening by Parameterization

The term “flattening” has been used in the medical imaging field to convey the concept of mapping the surface of an object of interest to a planar domain (see [8], [11]). For example, with functional magnetic resonance (fMR) data it is possible to observe neural activity deep within the folds or sulci of the brain cortical surface using brain flattening techniques. There is also the potential use of flattening

323

techniques in virtual colonoscopy where “the approach favored by pathologists, which involves cutting open the tube represented by the colon, and laying it out flat for comprehensive inspection” is simulated (Haker et al. [9], [10]). One approach to this flattening process is to use the parameterization techniques described here. We illustrate this possibility with an example that utilizes a volume data set that is available from the Surgical Planning Laboratory at Brigham and Women’s Hospital, www.spl.harvard.edu. It is data that has been segmented from a MRI scan representing a brain which has had a tumor removed. (See Warfield et al. [27]). It consists of a binary array of size 124 × 256 × 256 with a value of Fijk = 1 indicating the presence of brain matter and a value Fijk = 0 representing anything other than brain material. The MC algorithm can be used to compute a triangular mesh surface at threshold (say) 0.5 that will separate all lattice points in the volume from those outside the volume. This surface utilizes the midpoints of edges and it rather blocky and difficult to perceive. Using some recently developed techniques (see [19]), we can obtain a smoother surface that has the same topology (edges) as the midpoint surface. This surface has vertices on the same edges as the midpoint surface, but the actual positions are chosen so as to optimize (subject to constraints) an energy/cost functional used to measure global smoothness. The left image of Fig. 9 shows the midpoint surface for a down-sampled volume data set of size 62 × 128 × 128 . Even though our algorithms have no problems at the higher resolution, the graphs illustrating the parameterization are too cluttered for this context and so a lower resolution model is used. Fig. 10 has views of the left and right hemispheres along with the respective parameterizations

Fig. 9. The left image show the midpoint separating surface for the segmented data. The right image is the smooth shroud (see [19]). This brain has had a tumor removed (see [27] & [13]).

324

Fig. 10. Parameterization of the left and right spheres of a segmented brain with a common boundary. This contour plot allows for the correspondence of “features” in the object and the parameterization.

Parameterizations conveniently lead to methods for mapping (morphing) one triangular mesh to another. If Qn = (sn , tn ) are the vertices of the parameter domain of a one surface, S , then we can sample a second surface, B , over the same triangulation and compute the vertices of the “in-between” surface as follows: V (S , B, α )n = αϕ S (sn , tn ) + (1 − α )φB (sn , tn ), 0 ≤ α ≤ 1

325

This process is illustrated in Fig. 11 where the sequence of mappings more fully reveals the relationship of geometric features of the surface of the brain. The parameter domain consists of a unit sphere. The common ellipse domain of the left and right hemispheres of Fig. 10 is mapped to a unit circle followed by the conformal stereographic projection to the sphere.

Fig. 11. A sequence of TMS morphing from a sphere to the brain revealing more fully the relationship of morphological features of the brain. The sphere TMS is “evaluated” over the brain surface using the spherical parameterization.

326

Illustrated in Fig. 12 is a comparison of the new NNC method and the method of [5] based upon mean value coordinates. The two parameterizations (one for the head and the other for the body) have a common boundary consisting of a 4*-network curve in the vicinity of the neck. The parameterization has been sampled over a uniform 64x64 grid. The mean value coordinate approach leads to larger quadrilaterals near the center and most deeply embedded portion of the parameterization.

Fig. 12. A parameterization is used to re-sample a surface. On the left, the new NNC parameterization is used and on the right the mean value coordinates (see [5]) are used. Acknowledgments. We wish to acknowledge the support of the Army Research Office under contract W911NF-05-1-0301. We wish to thank Aim@Shape for the data that led to the objects in Example 3.1. We wish to thank Drs. S. Warfield, M. Kaus, R. Kikinis, P. Black and F. Jolesz for sharing the tumor database. We wish to thank R. Holmes for his help and contributions.

References 1. Boissonnat, J. D., Cazals F.: Smooth surface reconstruction via natural neighor interpolation of distance functions, In: Proc. 16th Annu. Sympos. Comput. Geom., pp. 223232, 2000. 2. M. Desbrun, M. Meyer and P. Alliez, Intrinsic parameterizations of surface meshes, Eurographics, Computer Graphics Forum, Vol. 21, No. 2, 2002, pp. 666-911, 2002. 3. Floater, M. S, Parametrization and smooth approximation of surface triangulations, Computer Aided Geoemtric Design, Vol. 14, No. 3, pp. 231-250, 1997. 4. M. S. Floater, Parametric tilings and scattered data approximation, Intern. J. Shape Modeling, Vol. 4, pp. 165-182, 1998. 5. Floater, M. S., Mean Value Coordinates, Computer Aided Geometric Design, Vol. 20, No. 1, pp. 19-27. 2003.

327

6. Floater, M. S., Hormann, K., Parameterization of triangulations and unorganized points, in: Tutorial on Multiresolution in Geometric Modelling, A. Iske, E. Quak, & M. S. Floater (eds.), Springer, 287-314, 2002. 7. Floater, M. S., Hormann, K., Surface Parameterization: A Tutorial and Survey, in: Advances in Multiresolution for Geometric Modellling, N. A. Dodgson, M. S. Floater & M. A. Sabin (eds.), Springer, 2006. 8. Gu, X. Wang, Y., Chan, T. F., Thompson, P. M., Yau, S.-T., Genus zero surface conformal mapping and its applications to brain surface mapping, IEEE Trans. Med. Imaging, Vol. 23, No. 8, 949-958, 2004. 9. Haker, S., Angenent, S., Tannenbaum,A., Kikinis, R., Sapiro, G., Conformal surface parameterization for texture mapping, Transactions on Visualization and Computer Graphics 6, 181-189, 2000. 10. Haker, S., Angenent, S., Tannenbaum, A., Kikinis, R., 2000. Nondistorting flattening for virtual colonoscopy, Proceedings of MICCAI, Springer, 358-366. 11. Hong, W. Gu, X. Qiu, F. Jin, M., Kaufman, A. E., Conformal virtual colon flattening, Symposium on Solid and Physical Modeling , 85-93, 2006. 12. Hormann, K., Greiner, G., 2000. MIPS: an efficient global parametrizaton method, in: Curve and Surface Design: Saint-Malo 1999, P.-J. Laurent, P. Sablonniere, and L. L. Schumaker (eds.), Vanderbilt University Press, Nashville, 153-162, 1999. 13. Kaus, M., Warfield, S. K., Nabavi, A., Black, P. M., Jolesz, F. A., Kikinis, R., Segmentation of MRI of brain tumors, Radiology 218, 586-591. 2001 14. Lodha, S. and Franke, R., Scattered Data Techniques for Surfaces, In: Scientific Visualization Dagstuhl ’97, H. Hagen, G. Nielson, F. Post (eds.), pp. 181-222, 1999. 15. Meyer, M., Barr, A., Lee, H., and Desbrun, M., 2002. Generalized barycentric coordinates or irregular polygons, Journal of Graphical Tools 17, 13-22, 2002. 16. Nielson, G. M.: On Marching Cubes, IEEE Transactions on Visualization and Computer Graphics 9, 283-297, 2003. 17. Nielson, G. M., 2003b. MC*: Star functions for marching cubes, Proceedings of Visualization ’03, 59-66. 2003. 18. Nielson, G. M., L. Zhang, K. Lee, Lifting Curve Parameterization Methods to Isosurfaces, Computer Aided Geometric Design, Volume 21, pp. 751-756, 2004. 19. Nielson, G. M., Graf, G., Huang, A., Phliepp, M., Holmes, R., Shrouds: Optimal separating surface for enumerated volumes, VisSym ’03, Eurographics Association, 75-84, 2003. 20. Pinkall, U., Polthier, K., Computing discrete minimal surfaces and their conjugates, Exp. Math. 2, pp. 15-36, 1993. 21. Sibson, R., A Brief Description of Natural Neighbor Interpolation, In: D. V. Barnett, editor, Interpreting Multivariate Data, Pages 21-36, Wiley, New York, 1981 22. W. T. Tutte, Convex representation of graphs, Proc. London Math. Soc., Vol. 10, pp. 304320, 1960. 23. W. T. Tutte, How to draw a graph, Proc. London Math. Soc., Vol 13, pp. 743-768, 1963. 24. Wachpress, E., A Rational Finite Element Basis, Academic Press, 1975. 25. S. K. Warfield, M. Kaus, F. A. Jolesz, and R. Kikinis, Adaptive, Template Moderated, Spatially Varying Statistical Classification, Med Image Anal, Vol.4, No.1, pp. 43-55, 2000. 26. Watson, D. F. nngridr: an implementation of natural neighbor interpolation. David Watson, Claremont, Australia, 1994. 27. Warfield, S. K., Kaus, M., Jolesz, F. A., Kikinis, R., Adaptive, Template Moderated, Spatially Varying Statistical Classification, Med Image Anal 4, No.1, 43-55, 2000.

328

Suggest Documents