SLIDE 1 QUALITY MESHING OF MEDICAL GEOMETRIES WITH HARMONIC MAPS
Emilie Marchandise1, Jean-François Remacle1, Christophe Geuzaine2
1 Université catholique de Louvain, Belgium. 2 Université de Liège, Belgium.
April 13, 2010
SLIDE 2 Two main research activities
Cardiovascular flow modeling: application to vascular bypasses (START-NHEMO Project) PhD Students: Marie Willemet, Emilie Sauvage
Quality meshing for medical geometries Today’s talk ...
SLIDE 3
What is Gmsh ?
OPEN SOURCE finite element grid generator with build-in CAD engine + post-processor. http://www.geuz.org/gmsh
SLIDE 4 Motivation
Biomedical Engineering: geometries are triangulations
Biomedical simulation requires high quality meshes Triangulations obtained from imaging techniques are of low quality
1 oversampled 2 non-delaunay triangulations
Recover high quality surface mesh from low-quality inputs Remeshing: Mesh adaptation Wang 2007, Bechet 2002, ... Parametrization of surface Floater 2005, Sheffer 2006, Marcum 1999, Levy 2004, ...
SLIDE 5 Motivation
Biomedical Engineering: geometries are triangulations
Biomedical simulation requires high quality meshes Triangulations obtained from imaging techniques are of low quality
1 oversampled 2 non-delaunay triangulations
Recover high quality surface mesh from low-quality inputs Remeshing: Mesh adaptation Wang 2007, Bechet 2002, ... Parametrization of surface Floater 2005, Sheffer 2006, Marcum 1999, Levy 2004, ...
SLIDE 6 Motivation
Biomedical Engineering: geometries are triangulations
Biomedical simulation requires high quality meshes Triangulations obtained from imaging techniques are of low quality
1 oversampled 2 non-delaunay triangulations
Recover high quality surface mesh from low-quality inputs Remeshing: Mesh adaptation Wang 2007, Bechet 2002, ... Parametrization of surface Floater 2005, Sheffer 2006, Marcum 1999, Levy 2004, ...
SLIDE 7 Motivation (2)
CAD data is not suitable for FE analysis
Geometric models of a landing gear CAD data issued form CATIATM
1 852 surface patches 2 we were unable to build a suitable
CFD mesh for that model
Reparametrize through existing patches could be highly useful
1 291 surface patches remaining 2 we were able to build a suitable
CFD mesh for that model
Remeshing: Cross-patch remeshing with based on cross-patch parametrization Marcum 1999, Aftomosis 1999
SLIDE 8 Motivation (2)
CAD data is not suitable for FE analysis
Geometric models of a landing gear CAD data issued form CATIATM
1 852 surface patches 2 we were unable to build a suitable
CFD mesh for that model
Reparametrize through existing patches could be highly useful
1 291 surface patches remaining 2 we were able to build a suitable
CFD mesh for that model
Remeshing: Cross-patch remeshing with based on cross-patch parametrization Marcum 1999, Aftomosis 1999
SLIDE 9 Motivation (2)
CAD data is not suitable for FE analysis
Geometric models of a landing gear CAD data issued form CATIATM
1 852 surface patches 2 we were unable to build a suitable
CFD mesh for that model
Reparametrize through existing patches could be highly useful
1 291 surface patches remaining 2 we were able to build a suitable
CFD mesh for that model
Remeshing: Cross-patch remeshing with based on cross-patch parametrization Marcum 1999, Aftomosis 1999
SLIDE 10
Surface parametrization
Parametrizing a surface S is defining a map u(x) x ∈ S ⊂ R3 → u(x) ∈ S∗ ⊂ R2 (1)
y u(x) v u ∂S1 ∂S2 x z S S∗
SLIDE 11 Surface parametrization
Parametrizing a surface S is defining a map u(x) x ∈ S ⊂ R3 → u(x) ∈ S∗ ⊂ R2 (1)
y u(x) v u ∂S1 ∂S2 x z S S∗
Remesh with surface parametrization
1 Compute the mapping u(x) 2 Remesh in the 2D space given the metric M = xT
,ux,u
3 Project the new mesh back to the 3D surface
SLIDE 12
Surface parametrization
Parametrizing a surface S is defining a map u(x) x ∈ S ⊂ R3 → u(x) ∈ S∗ ⊂ R2 (1)
y u(x) v u ∂S1 ∂S2 x z S S∗
Warning Surfaces should have same topology
SLIDE 13 Outline
1 Computing maps 2 Max-cut partitioning 3 Automatic remeshing 4 Quality meshing 5 FE Biomedical simulations
SLIDE 14 Outline
1 Computing maps 2 Max-cut partitioning 3 Automatic remeshing 4 Quality meshing 5 FE Biomedical simulations
SLIDE 15 Laplacian harmonic map
Minimize the Dirichlet energy: ED(u) = 1 2
|∇u|2 ds (2) This quadratic minimization problem is equivalent to solving the two Laplace equations: ∇2u = 0, ∇2v = 0,
(3) with Dirichlet and Neumann boundary conditions u = uD(x),
∂u ∂n = 0,
(4) The Radò-Kneser-Choquet theorem states that the harmonic mapping can be proven to be one-to-one, if surface S∗ is convex.
SLIDE 16 Laplacian harmonic map with FE’s
On the initial mesh, solve the Laplace equations with linear FE’s: uh(x) =
uiφi(x)+
uD(xi)φi(x) (5) Solve a linear system ¯ ¯ A ¯ ¯ ¯ ¯ ¯ ¯ A ¯ U ¯ V
¯ ¯
with Akj =
Choose appropriate BC’s uD(x), and vD(x): uD(xi) = cos(2πli/L) , vD(xi) = sin(2πli/L), (7)
SLIDE 17 Laplacian harmonic map with FE’s
On the initial mesh, solve the Laplace equations with linear FE’s: uh(x) =
uiφi(x)+
uD(xi)φi(x) (5) Solve a linear system ¯ ¯ A ¯ ¯ ¯ ¯ ¯ ¯ A ¯ U ¯ V
¯ ¯
with Akj =
Choose appropriate BC’s uD(x), and vD(x): uD(xi) = cos(2πli/L) , vD(xi) = sin(2πli/L), (7)
SLIDE 18 Laplacian harmonic map with FE’s
On the initial mesh, solve the Laplace equations with linear FE’s: uh(x) =
uiφi(x)+
uD(xi)φi(x) (5) Solve a linear system ¯ ¯ A ¯ ¯ ¯ ¯ ¯ ¯ A ¯ U ¯ V
¯ ¯
with Akj =
Choose appropriate BC’s uD(x), and vD(x): uD(xi) = cos(2πli/L) , vD(xi) = sin(2πli/L), (7)
SLIDE 19 Convex combination map ( Floater 1996)
Map the boundary nodes onto a well-known convex polygon (e.g init circle) and place every interior vertex ui be the barycenter of its neighbors: ui =
di
λkuj,
di
λk = 1, (8) Solve a linear system ¯ ¯ A ¯ ¯ ¯ ¯ ¯ ¯ A ¯ U ¯ V
¯ ¯
with Akj = 2 −1 −1 −1 2 −1 −1 −1 2 (10)
SLIDE 20
Conformal harmonic map
Conformal maps preserve the angles: Laplacian Conformal
SLIDE 21 Conformal harmonic map
Minimize the conformal energy: ELSCM(u) =
1 2
ds, (11) where ⊥ denotes a counterclockwise 90◦ rotation in S.
SLIDE 22 Conformal harmonic map
Minimize the conformal energy: ELSCM(u) =
1 2
ds, (11) where ⊥ denotes a counterclockwise 90◦ rotation in S. This minimization problem is equivalent to solving the following system:
¯ A ¯ ¯ C ¯ ¯ C T ¯ ¯ A
¯ U ¯ V
¯ ¯
where ¯ ¯ A is a symmetric positive definite matrix Akj =
and ¯ ¯ C antisymmetric matrix Ckj =
SLIDE 23 Conformal harmonic map
Minimize the conformal energy: ELSCM(u) =
1 2
ds, (11) where ⊥ denotes a counterclockwise 90◦ rotation in S. This minimization problem is equivalent to solving the following system:
¯ A ¯ ¯ C ¯ ¯ C T ¯ ¯ A
¯ U ¯ V
¯ ¯
where ¯ ¯ A is a symmetric positive definite matrix Akj =
and ¯ ¯ C antisymmetric matrix Ckj =
How to assign proper boundary conditions ?
SLIDE 24
Spectral Conformal harmonic map (Mullen 2008)
Instead of solving LCu = 0, make use of spectral therory: The eigenvector u∗ (Fiedler vector) associated to the smallest eigenvalue λ, i.e. LCu∗ = λu∗ is the solution to the constrained minimization problem: u∗ = argmin
u,ute=0,utu=1
utLCu (13) Use efficient eigensolvers (Lanczos iterations, Choleski decomposition)
SLIDE 25
Spectral Conformal harmonic map (Mullen 2008)
Instead of solving LCu = 0, make use of spectral therory: The eigenvector u∗ (Fiedler vector) associated to the smallest eigenvalue λ, i.e. LCu∗ = λu∗ is the solution to the constrained minimization problem: u∗ = argmin
u,ute=0,utu=1
utLCu (13) Use efficient eigensolvers (Lanczos iterations, Choleski decomposition) No need to pin down vertices (implicit constraints)
SLIDE 26 From continuous to discrete linear maps
Issues: undistiguisable coordinates triangle flipping triangle folding
H D
Harmonic Laplacian mapping
SLIDE 27
From continuous to discrete linear maps
Issues: undistiguisable coordinates triangle flipping triangle folding Harmonic Laplacian mapping
SLIDE 28
From continuous to discrete linear maps
Issues: undistiguisable coordinates triangle flipping triangle folding Conformal mapping
SLIDE 29 Limitations for such a mapping ?
Two topological conditions and one geometrical condition:
1 Surface of genus G = 0 2 Surface with at least one boundary b 3 Aspect ratio η = H/D < 4
How to compute those conditions ? The genus G of the surface is computed from the Euler-Poincaré theory: G = b +χ(S)−2 2 where b is the number of boundaries χ(S) is the Euler-Poincaré characteristic of the surface: χ(S) = #V −#E +#F
SLIDE 30 Limitations for such a mapping ?
Two topological conditions and one geometrical condition:
1 Surface of genus G = 0 2 Surface with at least one boundary b 3 Aspect ratio η = H/D < 4
How to compute those conditions ? The genus G of the surface is computed from the Euler-Poincaré theory: G = b +χ(S)−2 2 where b is the number of boundaries χ(S) is the Euler-Poincaré characteristic of the surface: χ(S) = #V −#E +#F
SLIDE 31 Outline
1 Computing maps 2 Max-cut partitioning 3 Automatic remeshing 4 Quality meshing 5 FE Biomedical simulations
SLIDE 32
Partitioning the initial triangulation
Figure: Partitionning a lung with (left) a recursive multilevel method (Metis) and (right) a max-cut partitionner.
SLIDE 33
Max-cut partitioning based on Laplace map (Alliez et al 2002)
Idea of Alliez: Define a split line that passes through the center of gravity and has the direction of the principal axis of inertia.
Figure: Partitioning a cylinder of aspect ratio η = 25.
SLIDE 34
Max-cut partitioning based on Laplace map (Alliez et al 2002)
SLIDE 35 Max-cut partitioning based on multiscale Laplace map
descending aorta carotid artery innominate aortic arch subclavian artery artery T ∗0,good T 0,good T ∗0,small
3
T ∗0,small
1
T ∗0,small
2
SLIDE 36 Max-cut partitioning based on multiscale Laplace map
13 20 31 40 10 51 50 61 62 11 41 u00(x) 00 ∂T1 30
SLIDE 37
Max-cut partitioning based on multiscale Laplace map
Figure: Examples of the multiscale Laplace partitioning method: aorta(left) and human airways (right).
SLIDE 38
Max-cut partitioning based on multiscale Laplace
a) b) c)
Figure: Remeshing of an arterial tree (a) with both the Laplacian harmonic map (b) and the conformal map (c).
SLIDE 39 Outline
1 Computing maps 2 Max-cut partitioning 3 Automatic remeshing 4 Quality meshing 5 FE Biomedical simulations
SLIDE 40 Automatic remeshing
a) b) c) Remeshing algorithm. Initial triangulation (G = 2,NB = 0) that is cut into different mesh partitions of zero genus, Remesh the lines at the interfaces between partition Compute harmonic map for every partition and remesh the partition in the parametric space (u(x) coordinates visible for
SLIDE 41
Automatic remeshing
Different mesh partitions of the skull in the parametric space (harmonic and conformal map)
SLIDE 42
Automatic remeshing
Different mesh partitions of a hemi-pelvis in the parametric space (conformal map)
SLIDE 43
Automatic remeshing
STL triangulations obtained from medical images (Left) that have been automatically remeshed with our automatic remeshing algorithm (Right).
SLIDE 44 Outline
1 Computing maps 2 Max-cut partitioning 3 Automatic remeshing 4 Quality meshing 5 FE Biomedical simulations
SLIDE 45
High quality meshing for the Laplacian harmonic map
Plot of the quality histogram with high mean quality ¯ κ = 0.94:
Remeshed 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.2 0.4 0.6 0.8 1 Frequency Aspect ratio STL
κ = α inscribed radius circumscribed radius = 4 sinˆ a sinˆ bsinˆ c sinˆ a +sinˆ b +sinˆ c , (14)
SLIDE 46 Which mapping is best ?
STL 0.002 0.004 0.006 0.008 0.01 0.012 0.1 0.2 0.3 0.4 0.5 Frequency Aspect ratio Harmonic map Conformal map Convex map STL 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.5 0.6 0.7 0.8 0.9 1 Frequency Aspect ratio Harmonic map Conformal map Convex map
SLIDE 47
Which mapping is best ?
Laplacian: Convex Initial mesh X-coord visible in map New mesh
SLIDE 48
High quality meshing
Comparisons with other techniques for surface remeshing: Local modifications (MAdLib) 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.2 0.4 0.6 0.8 1 Frequency Aspect ratio Harmonic map (Gmsh/meshadapt) Harmonic map (Gmsh/del2d) Local modifications (MeshLab) RIMLS (MeshLab) CPU time < 100s for mesh of 1.e6 elements
SLIDE 49
High quality meshing
Remeshed Harmonic map 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.2 0.4 0.6 0.8 1 Frequency Aspect ratio STL Mimics Remeshed Mimics 1 Remeshed Mimics 2
SLIDE 50
High quality meshing
SLIDE 51 Outline
1 Computing maps 2 Max-cut partitioning 3 Automatic remeshing 4 Quality meshing 5 FE Biomedical simulations
SLIDE 52
Blood flow in arterial anastomosis
1e-14 1e-12 1e-10 1e-08 1e-06 0.0001 0.01 1 100 5 10 15 20 25 30 35 40 Residual Nb of iterations STL Remeshed 1e-14 1e-12 1e-10 1e-08 1e-06 0.0001 0.01 1 100 5 10 15 20 25 30 35 40 Residual Nb of iterations STL Remeshed
Quality of the surface and volume meshes: Mesh Surface quality Volume quality κmin κ γmin γ STL 0.0033 0.821 0.0019 0.563 Remeshed 0.6400 0.949 0.2550 0.677
SLIDE 53 Blood flow in aortic arch
View b),c) View b),c)
a) b) c)
SLIDE 54
Blood flow in aortic arch
Boundary Layer 50K 0.1 0.2 0.3 0.4 0.5 0.6 50 100 150 200 250 300 350 WSS [Pa] Angle [Deg] Uniform 28K Uniform 466K Uniform 1.4M Anisotropic 20K
Blood flow simulation in an aortic arch. The left figure shows the WSS distribution and the right figure the WSS along the circumference at section A−A′ for different meshes for a constant inlet flow rate. The zero angle corresponds to the location A′.
SLIDE 55 References
J.-F. Remacle, C. Geuzaine, G. Compère, E. Marchandise High Quality Surface Remeshing Using Harmonic Maps, ijnme 2010.
- E. Marchandise, M.Willemet, G. Bricteux, C. Geuzaine, J-F.
Remacle Quality meshing based on STL triangulations for biomedical simulations, ijnmbe 2010.
- E. Marchandise, C. Carton de Wiart, W. Vos, C. Geuzaine, .J-F.
Remacle, High Quality Surface Remeshing Using Harmonic Maps: PARTII: Surfaces with high genus and of large aspect ratio, ijnme 2010.
SLIDE 56
Conclusions
Presented: Automatic remeshing STL triangulations High quality surface meshes Appropriate for FE simulations (2D/3D) Ongoing work: Spectral least square conformal map Hybrid method for conformal map (perform a few linear steps) Use conformal maps for generation of quad meshes (hex meshes)