Download Visualizing cardiac blood flow using Lagrangian Coherent Structures

Document related concepts

Navier–Stokes equations wikipedia , lookup

Time in physics wikipedia , lookup

Field (physics) wikipedia , lookup

Elementary particle wikipedia , lookup

History of subatomic physics wikipedia , lookup

Turbulence wikipedia , lookup

Transcript
V ISUALIZING CARDIAC BLOOD FLOW
USING
L AGRANGIAN C OHERENT S TRUCTURES
J OHANNES U LÉN
Master’s thesis
2010:E?
CENTRUM SCIENTIARUM MATHEMATICARUM
Centre for Mathematical Sciences
Mathematics
Abstract
The dynamics of cardiac blood flow is highly complex and not yet fully understood. Using threedimensional, three-component, time-resolved phase contrast MRI (4D PC-MRI), new understanding of flow dynamics can be obtained. However, the three-dimensional time-resolved flow
is too complex to visualize directly. Therefore a simplified view is needed.
In this thesis, Lagrangian Coherent Structures (LCS) are used to visualize blood flow. The
idea behind LCS is to look at advection of particles in a time frame and mark particles which in
some spatial direction have separated from their neighboring particles. The markings build up
surfaces which divide the flow into regions with different flow dynamics. This division can be
made with respect to the past or the future advection of blood particles.
A robust and automatic algorithm for extracting LCS is developed and tested. The algorithm
is able to find and extract LCS in complex blood flow, giving new insight into the dynamics of
blood flow in the human heart. LCS have previously not been used to visualize 4D PC-MRI
measured flow.
Nomenclature
Advection Transportation of particles by a velocity field caused by a fluid motion.
Voxel
A three-dimensional volume element. The two-dimensional analogy is a pixel.
FTLE
Finite-Time Lyapunov Exponent, a measurement of flow separation for each voxel
in space, Section 2.6.1 on page 12.
LCS
Lagrangian Coherent Structures, divides flow into regions of different flow dynamics, Section 2.6.1 on page 12.
Ridge
Local maxima of a scalar field, Section 2.4 on page 8.
Grid element The basic structure used in the algorithm find ridges in a scalar field, Section 3.1
on page 18.
Vertex
Part of a grid element: a mapping to a point in a scalar field.
Edge
Part of a grid element: connects two vertices.
Face
Part of a grid element: connects four edges.
Zero-crossing Refers to the point in between voxels where the first derivative changes sign.
Closed surface A surface which partition a space into two separate volumes.
Open surface A surface which does not partition a space into two separate volumes.
MRI
Magnetic Resonance Imaging, used to acquire images, Section 2.2 on page 5.
4D PC-MRI Three-dimensional, three-component, time-resolved phase contrast MRI. The method
used in this thesis for measuring velocity fields, Section 2.2.1 on page 6.
Diastole
The relaxing phase of the heart cycle, when blood is flowing into the ventricles, Page
4.
Systole
The contracting phase of the heart cycle, when blood is flowing out from the ventricles, Page 4.
Particle tracing A flow visualization method, Section 2.6.3.1 on page 15.
Contents
1 Introduction
1.1 Aims and problem formulation . . . . . . . . . . . . . . . . . . . . . . . . .
2 Background
2.1 The human heart . . . . . . . . . . . . . . . . . .
2.2 Magnetic Resonance Imaging . . . . . . . . . . . .
2.2.1 Measuring flow velocity . . . . . . . . . . .
2.2.2 Error sources in velocity measurements . . .
2.3 Four chamber view . . . . . . . . . . . . . . . . . .
2.4 Ridges . . . . . . . . . . . . . . . . . . . . . . . .
2.4.1 Height ridges . . . . . . . . . . . . . . . .
2.5 Image analysis . . . . . . . . . . . . . . . . . . . .
2.5.1 Smoothing a n-dimensional discrete image .
2.5.2 Derivatives of a discrete n-dimensional image
2.6 Flow . . . . . . . . . . . . . . . . . . . . . . . . .
2.6.1 Finite-time Lyapunov exponent . . . . . . .
2.6.2 Lagrangian Coherent Structures . . . . . . .
2.6.3 Flow visualization . . . . . . . . . . . . . .
2.6.3.1 Particle tracing . . . . . . . . . .
2.7 Isosurface extraction . . . . . . . . . . . . . . . . .
1
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
5
6
6
8
8
9
10
10
12
12
12
13
15
15
15
3 Method
3.1 Ridge extraction . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . .
3.1.2 Pre-marching calculations . . . . . . . . . . . . . . . .
3.1.3 Actions at vertices . . . . . . . . . . . . . . . . . . . .
3.1.3.1 Determine transverse-direction . . . . . . . .
3.1.4 Actions at edges . . . . . . . . . . . . . . . . . . . . .
3.1.4.1 Aligning the transverse-directions . . . . . .
3.1.4.2 Calculate the directional derivatives . . . . .
3.1.4.3 Interpolate zero-crossing of the first derivative
3.1.4.4 Second derivative check . . . . . . . . . . .
3.1.5 Actions at faces . . . . . . . . . . . . . . . . . . . . .
3.1.5.1 Filtering . . . . . . . . . . . . . . . . . . .
3.1.6 Actions at grid element . . . . . . . . . . . . . . . . .
3.1.6.1 Halting criteria . . . . . . . . . . . . . . . .
3.1.6.2 Building the surface . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
17
17
17
18
18
18
18
18
20
21
21
21
21
22
22
22
i
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3.2
3.1.6.3 Expanding the ridge . . . .
3.1.6.4 Removal of multiple surfaces
3.1.6.5 Blacklisting . . . . . . . .
3.1.7 Finding an initial grid element . . . .
3.1.8 Post processing . . . . . . . . . . . .
3.1.8.1 Triangle trimming . . . . .
3.1.9 Additions over marching ridges . . . .
Implementation . . . . . . . . . . . . . . . .
4 Results
4.1 LCS in cardiac blood flow . . .
4.1.1 Attracting LCS . . . .
4.1.2 Repelling LCS . . . . .
4.2 Validation . . . . . . . . . . .
4.2.1 Height ridge extraction
4.2.2 LCS as a separator . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
24
24
24
24
25
25
25
26
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
29
29
29
31
31
31
31
5 Discussion
5.1 Related work . . . . . . . . . . .
5.2 Limitations . . . . . . . . . . .
5.3 LCS in heart diseases . . . . . . .
5.4 Future development . . . . . . .
5.4.1 Parallelization . . . . . .
5.4.2 Tetrahedron grid elements
5.4.3 Flow-map manipulation .
5.4.4 Temporal dependency . .
5.4.5 Surface splitting by graphs
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
37
37
37
38
38
38
39
39
40
40
6 Conclusion
43
Chapter 1
Introduction
Cardiovascular disease is the main cause of death in Europe [2] and the USA [3], but the function
of the human heart is still not fully understood. Greater knowledge about the heart is desired
to aid diagnosis and treatments. The use of non-invasive imaging techniques such as Magnetic
Resonance Imaging (MRI) [8] has increased our knowledge about the heart. MRI has the ability
to image both the anatomy and the blood flow without exposing the patient to harmful radiation.
The velocity fields measured in the heart are three-dimensional, three-component, time-resolved
and unsteady (they vary with time).
Flow visualization can be divided into direct, integration and feature based approaches [26].
The three-dimensional blood flow is too complex to visualize with any direct approach [1]. Integration based visualization such as particle tracing, where phantom particles are advected by
the flow field, can exhibit cluttering as well as occlusion in parts of the flow [26]. Feature based
visualization extract some property of the flow, example of this is Vector Field Topology (VFT)
[26]. Lagrangian Coherent Structures (LCS) [18] is a combination of feature and integration
based visualization. LCS have been shown to outperform VFT on unsteady vector fields [28].
LCS are extracted by looking at the advection of blood particles between two times. Particles
which have moved away from their neighboring particles are marked. From the markings surfaces
are built. These surfaces divide the flow into regions with different flow dynamics.
LCS in simulated three-dimensional flow have previously been extracted and used for visualization [28], as well as LCS in two-dimensional MRI measured flow [15]. Different slices of
three-dimensional LCS in MRI measured flow have also been extracted [1].
1
1.1
Aims and problem formulation
No three-dimensional LCS extraction from measured flows has been reported in the literature.
However, three-dimensional LCS extraction from simulated flow has been reported [28]. The
measured flow in this thesis is more complex and has lower resolution than simulated flow in
[28], leading to new obstacles.
The aims of this thesis is to:
(i) Investigate the feasibility of developing an algorithm that automatically extracts threedimensional Lagrangian Coherent Structures from three-dimensional, three-component,
time-resolved MRI measured flow.
(ii) Explore the three-dimensional Lagrangian Coherent Structures extracted from cardiac
blood flow, in healthy volunteers.
Further studies where LCS in healthy and diseased hearts are compared are of great interest, but
lies outside the scope of this thesis.
Chapter 2
Background
In this thesis blood flow in the human heart is visualized. To appreciate the results quite a lot of
knowledge of diverse disciplines is needed, much of which is covered in this chapter.
2.1
The human heart
Superior
Vena Cava
Aorta
Pulmonary
Artery
Pulmonary
Vein
Left
Atrium
Right
Atrium
Mitral
Valve
Tricuspid
Valve
Aortic
Valve
Left
Ventricle
Pulmonary
Valve
Right
Ventricle
Septum
Apex
Inferior Vena Cava
Figure 2.1: A schematic drawing of a healthy human heart. The arrows indicate the direction of the blood
flow. The image is used with permission from the author [25].
3
2
3
4
AV-plane up
AV-plane down
1
Isovolumetric
contraction
Systole
Systolic
ejection
Isovolumetric
relaxation
Diastolic
filling
Diastole
Figure 2.2: The phases in the cardiac cycle. Increased activity in the ventricular muscles is indicted in
yellow, and decreased in gray. The image is used with permission from the authors [16].
In Figure 2.1 a schematic drawing of a human heart is shown. The walls of the heart are composed primarily of cardiac muscle cells, or myocardium. The myocardium surrounds the four
cavities in the heart, the left and right atrium and the left and right ventricles. The atria and
ventricles are separated from each other by the atrioventricular plane (av-plane). The tricuspid
and mitral valves are located in this plane.
In the pulmonary circulation blood flows from the right ventricle to the lungs where it gets
oxygenated. It then flows back to the heart via the left atrium. In the systematic circulation blood
flows from the aorta out to the rest of the body and then comes back into the right atrium. In
other words the right side of the heart takes care of oxygenating the blood and the left side pushes
the blood through the body.
It takes more energy to push the blood around the whole body than to the lung and back,
hence the myocardium is thicker around the left ventricle. Because the left ventricle does more
work than the right ventricle, it is more common with heart problems related to the left ventricle
compared to problems with the right ventricle.
The cardiac cycle can be divided into a contracting phase (systole) and a relaxing phase (diastole), shown in Figure 2.2:
(1) In early systole the myocardium starts to compress, the tricuspid and mitral valves close.
(2) In the end of systole the pulmonary and aortic valves open and blood flows out through
the aorta and the pulmonary artery.
(3) In the beginning of diastole the ventricular muscles relaxes and the atrio-ventricular-plane
is springs upwards.
(4) In the end of diastole, the pressure is higher in the atria than in the ventricles. The tricuspid
and mitral valves open up and blood flows into the ventricles.
A more detailed description of the anatomy and function can be found in [31] and [16].
(a) A small majority of the protons are aligned in the (b) An RF-pulse is sent in, changing the alignment of the
same direction, giving rise to a net magnetization ilmagnetic fields. This leads to a net magnetization in
lustrated as the larger arrow. The precession direction
a new direction.
is indicated by the circular arrow.
Figure 2.3: Distribution of the magnetic fields caused by protons in the presence of an external magnetic
field. Each small arrow indicate a precession axis for a protons magnetic field. The images are
used with permission from the author [12].
2.2
Magnetic Resonance Imaging
Magnetic Resonance Imaging (MRI) can be used to visualize the internal structure of the body
and measure the velocity of fluids such as blood in the heart. Biological tissue contains a large
amounts of water, and hence protons are in abundance. Protons can be seen as small magnets,
and without an external magnetic field they will point in all different directions. All of the
protons magnetic contributions will cancel, adding up to a net magnetization (Bnet ) of zero.
However, in the presence of an external magnetic field (B) the magnetization of the protons
will have a tendency to align itself along B. Due to the thermal energy the protons will bounce
into each other and distort the orientation. There will still be magnetization pointing in all
directions, but a small majority will point along B. This leads to a Bnet in the direction of the
magnetic field. A stronger B will give a stronger tendency to point along B. This is why stronger
magnets are of use in MRI scanners – stronger magnets give a higher signal-to-noise ratio.
The magnetization from a proton does not simply point in one direction, it precesses around
an axis, see Figure 2.3a. The frequency, f , of the precession is called the larmor frequency and is
given by
f =−
γB
,
2π
(2.1)
where γ is the gyromagnetic ratio which is constant for a given nucleus and B is the magnitude of the magnetic field B.
To get measurable quantities an electromagnetic pulse is sent in, in MRI referred to as RFpulse because it is in radio frequency range. This pulse turns all the small magnetization, so
that Bnet now have a tendency to point in a another direction than B, see Figure 2.3b . Two
relaxation times can be measured, T1 and T2 :
T1 relaxation
T1 measures the time it takes for Bnet to align itself back with the B. This is called longitudinal
relaxation.
T2 relaxation
In a direction orthogonal (also called transverse) to B there is no external magnetization trying
to align the protons and hence Bnet is zero in this direction. However, after the RF-pulse Bnet is
no longer zero in the transverse direction. The protons will try to align themselves back with B
so Bnet once again will be zero in the transverse direction. The time it takes Bnet to become zero
in the transverse direction is T2 also known as the transverse relaxation.
To target a specific area in space a so called slice selection gradient is applied. It is a linearly
increasing magnetic field with respect to an axis. This will make all protons in a two-dimensional
slice, experience an equal magnetic field strength. According to equation (2.1) this will make the
protons precession frequency in each slice equal. The protons will only absorb electromagnetic
pulses with the same frequency as their own. Because of this an RF-pulse can be sent in with
a tailored frequency. This RF-pulse will only be absorbed by protons in one slice of space. A
detailed description of MRI can be found in [8].
2.2.1
Measuring flow velocity
In this thesis the the flow is measured with three-dimensional, three-component time resolved
phase contrast MRI (4D PC-MRI). This means that the a velocity is measured in all three directions in every voxel in space. Below follows a brief explanation on phase contrast MRI [22].
As can be seen in equation (2.1) changing the magnitude of B will change the frequency
by which the magnetic field of the proton precesses. If this change is applied temporarily by a
single pulse the phase of the precession can be shifted as described in detail in Figure 2.4. The
phase-shift is proportional to the velocity of the proton and this can be used to get a velocity
mapping.
2.2.2
Error sources in velocity measurements
Some of the errors which can be introduced in velocity measurements with PC-MRI are, aliasing,
low SNR and partial volume effect.
Aliasing is inherent limitation when velocity is measured by phase-shifts as the phase is limited
to [−π, π]. This gives a maximum measurable velocity venc (from velocity encoding). If velocities
greater than venc are to be measured, aliasing will occur.
Low SNR can be caused by high venc . venc can be increased if the magnitude of G (t, s) is
lowered, cf. Figure 2.4, as particles will get less dephased. It has however been shown [24] that
the signal-to-noise ratio (SNR) for the velocity is decreased if venc is increased. When choosing
venc a good balance between the maximum measurable speed and the minimal tolerated SNR
must be chosen.
t1
t2
Stationary
particle
Moving
particle
v
v
Phase
(a) At time t1 a single-pulsed magnetic gradient (b) After some time the second particle have moved a
G (t1 , s) is applied over two particles. This
bit, and another single-pulse G (t2 , s) is applied.
leads to the same phase-shift for both particles.
G (t2 , s) is the reverse of G (t1 , s) and the stationary particle is phase-shifted back to its original phase.
However, the moving particle exhibits another magnetic field strength and is further phase-shifted. This
leads to a dephasing between the moving and the stationary particle.
Figure 2.4: Dephasing of two particles by applying two single-pulse magnetic gradients. The red arrow
indicates a linearly varying magnetic field strength and the straight black line is a reference
strength.
LA
RA
LA
LV
RV
(a) Four chamber view in end-diastole.
LV
RA
RV
(b) Four chamber view in end-systole.
Figure 2.5: A MRI image of a slice of the human heart. The slice is taken in a direction where both atria
and ventricles are visible and is known as the four chamber view. RV: Right Ventricle, RA:
Right Atrium, LV: Left Ventricle, LA: Left Atrium.
Partial volume effect occur because of the finite resolutions of the measurements, which leads
to averaged velocities inside a voxel. Since each voxel can contain both stationary tissue and
moving blood this averaging introduce errors.
2.3
Four chamber view
A MRI scanner can be set to scan a slice through the body where the left and right atria and the
left and right ventricles all are visible at the same time. This slice is known as the four chamber
view. An example of a four chamber view of a healthy human can be seen in Figure 2.5.
2.4
Ridges
If the intensity of an image is interpreted as height, a two-dimensional image can be seen as a
landscape. Peaks of this landscape are called ridges, an example of this can be see in Figure 2.6a.
Ridges can be generalized to an arbitrary dimension where a point on a ridge is a point that
has a maximum intensity in some direction. The interest in this thesis lies in extracting surface
ridges from three-dimensional scalar fields. These surface are two-dimensional manifolds. The
three-dimensional scalar field is a so called FTLE field, more on this in section 2.6.1.
There are many different definitions of a ridge, of which many can be found in [5]. There
is recent work in relation to visualization on this subject [23]. According to [27] the resulting
ridge when extracted from FTLE fields (which is the application used in this thesis) will only be
minorly different for different ridge definitions. Since the data used in this thesis will contain
noise a definition with a minimal amount of derivatives is desired, hence the Height ridges has
been chosen as ridge definition in this thesis.
Optimal
Transverse
(a) A ridge is marked by the dotted red line.
(b) Transverse and optimal-direction for a point on a ridge.
Figure 2.6: The ridge concept illustrated for a two-dimensional image. The intensity is shown as height in
the image.
2.4.1
Height ridges
The Hessian matrix plays an important role in the height ridge definition
Definition 2.1. The Hessian matrix (H) of a function f is defined as
Hij =
∂²f
.
∂xi ∂xj
The eigenvectors of H are used in the definition of the height ridge because of the property
of the following Theorem
Theorem 2.1. The eigenvector belonging to the largest eigenvalue of the Hessian matrix points in the
direction where the function has the largest directional second derivative.
Proof. The directional derivative in the direction v, where v is normalized, is given by
∂f
= v T ∇f .
∂v
(2.2)
Inserting v T ∇f into (2.2) gives an expression for the directional second derivative:
v T ∇ v T ∇f
= v T Hv.
Finding the direction in which the second derivative is maximal is equal to the optimization
problem
max v T Hv,
v T v=1
which gives the lagrangian:
L (v, λ) = v T Hv − λv T v − λ.
(2.3)
The Karush-Kuhn-Tucker conditions, see e.g [17], tell us that an optimal solution must fulfill
∇L (v, λ) = 0. Applying this yield the following restriction on an optimal solution
2v T (Hv − λv) = 0 ⇐⇒ Hv = λv.
In other words the direction which has maximal second derivative must also be one of the
eigenvectors to H. Of all eigenvectors, the one belonging to the largest second derivative is
pointing in the direction of the largest second derivative.
Using Theorem 2.1 a coordinate frame for each voxel in a n-dimensional scalar field can be
chosen and from this coordinate frame the height ridge is defined.
Definition 2.2. A ( maximum convexity) height ridge of dimension k in a n-dimensional scalar
field f is defined as the set of points which fulfills
∂f
∂f
=0
= ··· =
∂y1
∂yn−k
(2.4)
∂2f
∂f
,..., 2 < 0
∂y12
∂yn−k
(2.5)
in the coordinate frame y1 , . . . yn . Where y1 , . . . yn are the eigenvectors belonging to H ordered
by their eigenvalues, λi as
λ1 ≤ λ2 · · · ≤ λn .
The ordering of the eigenvalues, λi , (and thereby the eigenvectors) has in the literature been
chosen in two ways. Eberly [5] defined the order as λ1 ≤ λ2 · · · ≤ λn and Lindeberg [19]
defined the order as |λ1 | ≥ |λ2 | · · · ≥ |λn |. Eberly’s and Lindeberg’s definitions differ when the
ridge bends up faster in one direction than it bends down in another direction. In the case of
Eberly these points still fulfill (2.5), but in the case of Lindeberg they do not. In this thesis sharp
increase in intensity is no problem and the Eberly definition is chosen.
For a k-dimensional ridge the eigenvectors belonging to the k-smallest eigenvalues of the
Hessian are called the optimal-directions and point along the continuation of the ridge and the
other n − k eigenvectors are called transverse-directions and point away from the ridge. For a
two-dimensional example see Figure 2.6b. All requirements in Definition 2.2 are put on the
transverse-directions, no requirement are put on the optimal-directions.
The definition of a ridge used in this thesis relies on finding points where the first derivative
is zero. For a continuous function this is not a problem, but for discrete data these zero-crossings
are most likely found in between voxels. An algorithm which solves the problem of finding the
sub-voxel zero-crossings of the first derivative is described in detail in the method Section.
2.5
Image analysis
In this thesis the first, second and partial derivatives of three-dimensional scalar fields is extensively used. As the scalar field is subject to noise, using discrete difference will amplify the errors.
Smoothing prior to differentiation reduces this problem. Smoothing and differentiation can be
done in one operation as will be shown below.
2.5.1
Smoothing a n-dimensional discrete image
Smoothing can be performed in many ways. One common thing with all methods is that the
value of each pixel is somehow calculated as a weighted average over its neighboring pixels. How
the weights and neighborhood are chosen may differ. One way to choose the neighborhood and
the weights is to borrow the Gaussian kernel from statistics.
0.8
0.7
σ = 0.5
σ = 1
0.6
σ = 1.5
0.5
0.4
0.3
0.2
0.1
0
−4
−3
−2
−1
0
1
2
3
4
Figure 2.7: The one-dimensional Gaussian kernel for a few different s. The black squares indicate the
discrete values, the colored lines are just a visual aid.
Definition 2.3. The n-dimensional Gaussian kernel is given by
1 T
g (x; Σ) =
exp − x Σx
2
(2π)n/2 |Σ|
1
(2.6)
where Σ is the covariance matrix and x is a discrete support for the kernel.
The smoothed image (Is ) is then given by
Is = g (x; Σ) ∗ I
(2.7)
where ∗ denotes convolution.. The discrete support is chosen to the discrete set [−x0 , x0 ]
which is derived from
x0
X
g i, σ2 > 0.99
i=−x0
where g (i, σ) is the one-dimensional Gaussian distribution. For increasing σ2 the discrete
support is increased.
In this thesis only symmetric smoothing is needed, hence Σ = diag σ2 . Limiting the kernel
in this way has one great advantage: the kernel in equation (2.7) becomes linearly separable. All
that is needed is then to apply a one-dimensional kernel along each dimension i to get the
same result as convolution with n-dimensional kernel in (2.6). By this trick the computationally
expensive operation of n-dimensional convolution is avoided.
The one-dimensional kernel for a few σ is given in Figure 2.7. To understand what the
convolution in (2.7) does consider a one dimensional image, a line. The value for a pixel on this
line after the convolution will be equal to the weighted sum over the neighbors according to the
Gaussian kernel. For instance if σ = 0.5, the pixel intensity will be 0.8 times itself and 0.1 times
its two closest neighbors. For increasing σ the support is growing and the image becomes more
smoothed.
2.5.2
Derivatives of a discrete n-dimensional image
∂g
As ∂I
∂x ∗ g = I ∗ ∂x holds, the Gaussian kernel can first be differentiated. The resulting kernel
can then be convoluted with the image to apply smoothing and differentiation in one operation.
There are two advantages with this approach: the differentiation can be found analytically and the
differentiation only needs to be calculated once. The differentiated n-dimensional Gaussian kernel is linearly separable. The same trick as with smoothing can be used and only one-dimensional
kernels needs to be applied in every dimension.
2.6
Flow
Let D ⊂ R3 be a domain of interest. In this domain we have a time-dependent velocity field
v (x, t) satisfying C 0 in time, t, and C 2 in space, x.
A trajectory x (t : t0 , x0 ) starting at time t0 and space x0 is a solution to

 ∂x
(t : x0 , t0 ) = v (x (t : x0 , t0 ) , t)
(2.8)
∂t
 x (t : x , t ) =
x .
0
0
0
0
This solution is a mapping which takes points from their position x0 at time t0 to their
position at time t. This mapping is referred to as flow map and is denoted by
φtt0 (x0 ) = x (t : x0 , t0 ) .
Depending on application, the flow map can be used to either map particles to future positions or to past positions.
2.6.1
Finite-time Lyapunov exponent
The finite-time Lyapunov exponent (FTLE) is a scalar valued function denoted by σtt0 (x). The
FTLE value characterizes the separation of particles between t0 and t. Here follows a short
derivation, in order to understand what we are measuring.
Consider two particles with the locations x and y, where y = x + δx (t0 ) and δx (t0 ) is
infinitesimal and arbitrarily oriented. Taylor expansion of the flow map in x yields
φtt0
(x + δx (t0 )) =
φtt0
(y) =
φtt0
d φtt0 (x)
d 2 φtt0 ξ
δx (t0 ) +
δx (t0 )2
(x) +
dx
2d 2 x
(2.9)
where ξ is a value between x and y. As δx (t0 ) is infinitesimal the last term will be neglectable. In the time between t0 and t the location of x and y will be advected by the flow and
their distance will become
δx (t) = φtt0 (y) − φtt0 (x) ≈
To ease the notation we introduce Δ =
used
||δx (t)||2 =
p
d φtt0 (x)
δx (t0 ) .
dx
dφtt0 (x)
. To measure the distance the L2 norm is
dx
hΔδx (t0 ) , Δδx (t0 )i =
p
hδx (t0 ) , ΔH Δδx (t0 )i
(2.10)
where hx, yi is the inner product between x and y and H is the conjugate transpose. For ndimensional flow ΔH Δ becomes a n × n matrix. The eigenvalues of ΔH Δ are known as the
singular values of Δ.
The aim is to decide one measurement which characterize the separation between all particles
in each voxel. The measurements is chosen as the maximum separation between any two particles
in each voxel. This is calculated for each voxel by individually maximizing equation (2.10).
Equation (2.10) is maximal when δx (t0 ) is aligned to the largest singular value of Δ. When
δx (t0 ) is aligned equation (2.10) can be rewritten to
max ||δx (t)||2
dx(t0 )
q
δxa , λmax ΔH Δ δxa
q
=
λmax ΔH Δ ||δxa (t0 )||2
=
(2.11)
where δxa (t) is δx (t) aligned to the eigenvector belonging to the largest eigenvalue of ΔH Δ
and λmax (x) is the largest eigenvalue of x.
From (2.11) the first part is used as a measurements of separation and finite-time Lyapunov
exponent is defined [29] as
q
1
ln
λmax ΔH Δ .
(2.12)
σtt0 (x) =
|t − t0 |
This normalization is chosen because the separation due to a linear vector field would increase
exponential with time [28].
2.6.2
Lagrangian Coherent Structures
Lagrangian Coherent Structures (LCS) in three-dimensional flow are surface which separate flow
into regions with different flow dynamics. LCS can be seen as separators in flow much like
an edge is a separator in an image. Lagrangian Coherent means that the structure follows the
particles.
The LCS have been defined in different ways in the literature. The approach used in this
thesis is to define the LCS from a FTLE field. This approach has been verified to give good
results via numerical simulation, experimental results and theoretical considerations [18].
Definition 2.4. At each time t a Lagrangian Coherent Structure is a (maximum convexity) height
ridge of the finite-time Lyapunov exponent field σtt0 (x).
The FTLE field is calculated from the underlying flow map φtt0 .
• If t0 > t the flow map, maps particles to their past position.
• If t0 < t the flow map, maps particles to future positions.
These two different ways to calculate the flow map and thus the FTLE field gives us two different
Lagrangian Coherent Structures.
Definition 2.5. Repelling LCS separate flow with different destinations.
Definition 2.6. Attracting LCS separates flow from different origins.
Repelling and attracting LCS are illustrated in Figure 2.9 and 2.8 for two-dimensional flow.
The LCS is dependent on the time frame chosen for the underlying flow map.
(a) Time: t0 .
(b) Time: t.
(c) Resulting LCS is marked by a dashed
line.
Figure 2.8: Illustration of repelling LCS in two-dimensional flow. The light gray arrows indicate the direction of the flow. The circles are particles being advected by the flow. The flow map is calculated
with respect to particles future position, mapping particles position at time t0 to their position
at t, where t0 < t. At time t0 the two sets of particles are close to each other while they at time
t will be far away from each other. The resulting attracting LCS can be seen in Figure (c).
(a) Time: t.
(b) Time: t0 .
(c) Resulting LCS is marked by a dashed
line.
Figure 2.9: Illustration of attracting LCS in two-dimensional flow. The light gray arrows indicate the direction of the flow. The circles are particles being advected by the flow. The flow map is calculated
with respect to particles past position, mapping particles position at time t0 to their position at
t, where t0 > t. At time t0 the two sets of particles are close to each other while they at time t
were far away from each other. The resulting attracting LCS can be seen in Figure (c).
Example 2.1. In this thesis cardiac blood flow is examined. If blood flowing into the ventricles during
the filling phase is to be examined, the underlying flow map should map particles to their location at
the beginning of the filling phase, resulting in a attracting LCS.
In summary to generate a LCS, the following steps are performed:
1. Calculate a flow map φtt0 (x) for all points.
2. From the flow map calculate the FTLE field σtt0 (x).
3. From the FTLE field calculate height ridges, these height ridges are the LCS.
2.6.3
Flow visualization
Visualization is the art of exploring, analyzing, understanding and presenting data such as flow
velocities. In [26] flow visualization is divided into direct, integration and featured based approaches. Each approach have different strengths and weakness. Direct visualization might have
problem with occlusion. Integration based visualization might exhibit cluttering. Feature based
visualization only captures one aspect of the flow. All visualization approaches are discussed in
the context of visualizing three-dimensional velocity fields.
Direct visualization attempt to present all of the data at once. Examples are quivers plots in
two-dimensional subspaces and volume rendering.
Integration based visualization first integrate the velocity field and then use the resulting
integral objects for visualization, a well known example is particle tracing cf. Section 2.6.3.1.
Feature based visualization uses an abstraction step where some property of the flow is extracted. Example of this is Vector Field Topology (VFT) which is based on locating points where
the vector magnitude is zero.
Lagrangian Coherent Structures (LCS) is a combination of feature and integration based
visualization. A comparison between VFT and LCS can be found in [28], where LCS is found
to outperform VFT on unsteady vector fields. The blood flow inside the heart manifest itself as
an unsteady vector field.
2.6.3.1
Particle tracing
Particle tracing is a flow visualization method which shows the behavior of particles in flow. If
a leaf is put on a river it will be advected by the flow, if ten leaves are put next to each other all
leaves will be advected, but they might take different paths down the river. The same is true for
particle traces. A number of phantom particles are put into the velocity field at a certain time
and then for each time step they will be advected by the velocity field. This can be shown either
as their full movement with lines going from their start location to their end location. It can
also be shown in each time step as a line between their location in the previous time step to their
location in the next time step.
2.7
Isosurface extraction
An isosurface is a surface in a three-dimensional scalar field, where each point on the surface have
the same value in the underlying scalar field. The exact location of the surface can be linearly
Figure 2.10: The 15 basic surfaces used in marching cubes. Rotation of these gives all the 256 cases used
in marching cubes.
interpolated in between voxels. A well known algorithm for isosurface extraction is marching
cubes [20]. Marching cubes partitions the three-dimensional scalar field into three-dimensional
cubes and solve the problem for each such cube. The cube can be thought of as a graph, where
each corner is a vertex and the value of the vertex is a sampled value from the three-dimensional
scalar field.
In each vertex the sampled value is compared against the sough after isosurface value. If the
value is below the isosurface value the vertex is marked with −, if its above its marked as +.
This is done for each vertex of the cube leading up to 28 = 256 different possible combinations
of signs. The algorithm then uses a pre-computed lookup table to get a surface inside the cube
corresponding to the signs at the vertices, see Figure (2.10) for the different types of surfaces. The
exact location of the surface is then linearly interpolated between the voxels. This is done for all
cubes possible to form in the three-dimensional scalar field successfully building up a surface,
cube per cube.
Chapter 3
Method
In this thesis the blood flow in the human heart is visualized. The first thing that needs to be done
is measuring velocity fields with 4D PC-MRI over the heart which measured the movements of
the blood particles. From the velocity fields the flow map equations are solved with Volume
Tracking [30]. From the flow map the FTLE field is calculated, which measure separation of
blood particles. Finally the LCS is extracted from the FTLE field as height ridges.
The contribution of this thesis is automatic height ridge extraction which is described in
detail in this chapter.
3.1
Ridge extraction
To extract ridges from the three-dimensional FTLE scalar field the algorithm marching ridges [6]
is used. This algorithm has to the authors knowledge not been used on measured data of this
complexity before and has gaps in its theory when dealing with complex geometries and noise.
The algorithm is extended and fully automated by modifying and adding heuristics. Support for
open surfaces is added and the lookup table is modified. Post-processing is also added to improve
the results. For the ease of the reader the algorithm is explained in its full with the changes
seamlessly added. In Section 3.1.9 a list of all modifications is given. In the rest of the chapter
ridge extraction is discussed in the context of extracting height ridges FTLE scalar fields. The
algorithm is in now way limited to either height ridges or FTLE fields.
3.1.1
Overview
The algorithm is inspired by marching cubes [20], cf. Section 2.7, and has some similarities. The
algorithm uses so called grid elements to work its ways through the scalar fields. Each corner of
the grid element is called an vertex. Each vertex is a mapping to a voxel in the scalar field. Edges
and faces are introduced which keeps track on how the vertices are connected to each other in the
scalar field, see Figure 3.1. The vertex which is a mapping to the voxel with the smallest index in
all dimensions is called the anchor vertex and is used to define each individual grid element.
The idea behind the algorithm is to keep things as simple as possible and only perform
calculations where as little data is involved as possible. This is done by splitting the algorithm
into actions performed on different parts of the grid element.
• On vertex level the transverse-directions are calculated.
• On edge level the zero-crossings of the first derivative are searched for.
17
Edge
Face
Anchor Vertex
Figure 3.1: A grid element used in the algorithm with an example of a edge, face and vertex marked. Each
vertex in the grid element is mapped to a voxel in the scalar field. Edges and faces keeps track
on how to vertices are related to each other in the scalar field.
• On face level noise filtration heuristics are applied.
• On grid element level the surfaces are created from the zero-crossings and potential continuation of the ridge is decided.
The algorithm marches through the scalar field via the grid elements successfully building up a
surface, grid element per grid element. An example of how the algorithm extracts a height ridge
can be seen in Figure 3.2.
3.1.2
Pre-marching calculations
Differentiation and smoothing of the FTLE field is performed via filtering of a differentiated
Gaussian kernel, cf. Section 2.5.2. This is used to calculate all first, second and partial derivatives
for each voxels in the FTLE field prior to any other calculations.
In a low resolution FTLE field two or more ridges can be found only a voxel apart. In this case
multiple ridges can be smoothed into a single ridge. A simple yet effective way to decrease this
problem is to linearly upscale the FTLE field in each dimension. A downside with this approach
is the added overhead of upscaling and the added running time for running the algorithm on a
larger scalar field.
3.1.3
Actions at vertices
3.1.3.1
Determine transverse-direction
For each vertex the transverse-direction (v) is calculated as the eigenvector belonging to the most
negative eigenvalue of the Hessian matrix. The transverse-direction is pointing away from the
ridge. Recall the height ridge definition in Section 2.4.1 on page 9.
3.1.4
Actions at edges
3.1.4.1
Aligning the transverse-directions
There is a inherent problem with defining the transverse-direction from eigenvalue analysis, as
Hv = λv and H (−v) = λ (−v) both holds for the same eigenvalue λ, an ambiguity in the
transverse-direction arises. This ambiguity could lead to sign differences on connected vertices
not caused by local extrema but rather just the numerical method used to calculate eigenvectors.
(a) The first three steps.
(b) Two steps in the middle.
(c) The last two steps.
Figure 3.2: Example on how the algorithm extract a height ridge. The dark orange triangles are the constructed surface inside the marked grid elements. Note that the last two steps are not neighboring grid elements. They are rather to two last items in a list of possible continuations.
(a) Two eigenvectors illustrated as (b) p illustrated as the red arrows (c) Both eigenvectors from (a) aligned by
arrows and the edge connectcalculated from the eigenvectors
p in (b).
ing them.
in (a).
Figure 3.3: Illustration of eigenvector alignment through PCA.
This problem can be remedied because zero-crossings of the first derivative are only searched
for on lines in between two vertices. All that needs to be done is to align the pairs of transversedirections into the same half-space. This can be done by choosing an alignment direction and
aligning both transverse-directions along it. If both transverse-directions are perfectly aligned up
to a sign, any direction can be chosen as alignment direction as it will not influence the results.
This is of course very seldom true and the alignment direction should be chosen to point along
both direction as much as possible to avoid influencing the result. A direction with this property
can be achieved through principal component analysis (PCA). The largest principal component
has the sought after property.
The principal components are calculate from the matrix
C=
1 T
v1 v1 + v2T v2
2
where v1 and v2 are the two transverse-directions that needs to be aligned. The eigenvector
belonging to the largest eigenvalue of C is pointing in the direction least orthogonal to v1 and
v2 , this direction is called p. To align the transverse-directions p·vi > 0 is enforced by switching
sign on vi if its not true. This method is illustrated in the case of two-dimensional vectors in
Figure 3.3.
3.1.4.2
Calculate the directional derivatives
After the alignment of the transverse-directions (v) the first directional derivative is calculated as:
∂f
= v T ∇f ,
∂v
and the directional second derivative is calculated as
∂2f
= v T Hv,
∂v 2
in both vertices connected by the edge. All components of the gradient and Hessian have
been pre-computed for each voxel of the scalar field. In this step only two scalar product are
computed.
(a) No zero-crossing is alone on both (b) One zero-crossing is alone on both faces its on. The
faces its on. All zero-crossings are
zero-crossing is removed leading to removal of surface
saved.
inside the grid element.
Figure 3.4: Example on how the algorithm removes a zero-crossing which is alone on both faces its on.
The zero-crossings are marked as red circles.
3.1.4.3
Interpolate zero-crossing of the first derivative
At each edge the first order derivatives of the connected vertices are compared. If the sign differ,
the point in between the two vertices where the sign changes is linearly interpolated and marked
as a zero-crossing of the first derivative.
3.1.4.4
Second derivative check
Once a potential zero-crossing is found the edge must be tested against requirement (2.5) of the
height ridge definition, that the second derivative is negative. In other words, testing that the
point of zero-crossing is not a local minimum. The second derivative in the interpolated point is
approximated by creating a linear function of the two second derivatives and then evaluating the
function in the zero-crossing point.
3.1.5
Actions at faces
3.1.5.1
Filtering
The derivatives are very susceptible to noise, even after smoothing is applied. To get good results
in practice filtering of the zero-crossing must be performed. The algorithm uses the assumption that ridge surfaces do not branch into two different surfaces inside a grid element. By
this assumption all faces which has more than two zero-crossing are unfeasible and the excess is
considered to be noise.
Each face with one or two zero-crossings, marks all their zero-crossing as protected. The algorithm first goes through faces with three zero-crossing and removes the least suited unprotected
zero-crossing. Then the algorithm goes through the faces with four zero-crossings and removes
the two least suited non protected zero-crossings.The least suited is chosen as the zero-crossing
points with the largest second derivative. In other words the most convex points are saved.
Another thing to consider is zero-crossings which are alone on a face, they must not be noise.
If a zero-crossing however is alone on both faces faces its on, its most likely noise, and in either
case it cannot continue from this grid element and should be removed. In Figure 3.4 this filtering
is explained by two examples.
Figure 3.5: Example of zero-crossings on a grid element which leads to open surfaces.
1x
4x
4x
2x
4x
2x
Figure 3.6: The ways zero-crossing can occur on a face. The number below is the number of different
rotations of each face, which in total yield 17 different combinations per face.
3.1.6
Actions at grid element
3.1.6.1
Halting criteria
The height ridge definitions do not take the absolute value into account. This means that the
ridge can extend into regions with very low FTLE value even though the ridge started in a region
of high FTLE value. As the FTLE value gives a measurement of separation removing ridges in
regions with low FTLE and hence small separation have physical justification. If the average
value in the FTLE field, on the points of the zero-crossings, are lower than a preset threshold,
the algorithm removes the surface in the grid element. The algorithm also is also stopped from
continuing the marching from the grid element.
3.1.6.2
Building the surface
All surfaces inside a grid element are built up from triangles, all triangles together are referred
to as the surface. Marching cubes and other isosurface extraction algorithms work with values
at the vertices of a grid element and from these the surfaces are built. This algorithm however
generates zero-crossing points on the edges between the vertices. The zero-crossings can be used
to extrapolate values to the vertices and then marching cube can be used. However, this is
ineffective and all cases cannot be handled since marching cubes only can handle closed surfaces.
There are feasible open surface inside a grid element not generated by noise, see Figure (3.5) for
examples.
The problem of generating open and closed surfaces from zero-crossings on the edges is
solved by extending a method presented in [21]. First consider a face of a cube, all permutations
of zero-crossings is given in Figure 3.6. From each such line all faces neighboring the line are
visited trying to extend the line around the cube. This is done for all line segments in all faces and
once all line segments have been extended as far as possible, the lines which have not been closed
Figure 3.7: Example on how to construct a surface from a arbitrary set of zero-crossings. First a face is
visited and the zero-crossings are connected in accordance to cases found in Figure 3.6. Then
the line is successfully extend around the grid element until there no more connections, this is
the situation at the upper right grid element. In the next step all open lines are closed and a
surface is constructed from three triangles inside the closed line.
are forced to be closed. Then inside each closed line a surface is constructed from triangles, see
Figure 3.7 for a example on how this works.
Surfaces are constructed for all 212 = 4096 different combinations of zero-crossing possible
on the edges a grid element. A lookup table for surfaces based on if there is a zero-crossing on a
each edge or not is built. The lookup table also incorporates the single zero-crossing removal as
discussed in Section 3.1.5.1. When such a combination of zero-crossing occur the lookup table
will return an empty surface and the algorithm will halt without any further computations.
The previously shown examples of open surface can be generated by the new lookup table,
see Figure 3.8.
Figure 3.8: Surfaces generated by the lookup table based on the same zero-crossings as found in Figure 3.5.
Figure 3.9: One step in the algorithm. The algorithm enters from the grid elements to the left. The two
red points are the protected, entering zero-crossings which can be found in both grid elements.
In the middle grid element we have three other faces, except the entering with two zero-crossing
which are added to a list of potential ridge continuations
3.1.6.3
Expanding the ridge
Once a surface successfully been generated inside a grid element, the algorithm expand the search
to neighboring grid elements in order to grow the surface. Each face which contains two zerocrossings neighbors a grid element which is a possible continuation of the ridge. All these grid
elements are added to a list of potential ridge continuations. To avoid inconsistencies in the
surface the two zero-crossing used to find the new grid element is saved and used in the new
grid element as protected zero-crossings, they are called entering zero-crossings. In other words
they will not be removed by any heuristics. See Figure 3.9 for an example of how the algorithm
expands.
3.1.6.4
Removal of multiple surfaces
When the case table has been constructed some combinations of zero-crossings will contain
multiple surface inside a grid element, for instance see the upper right case of 2.10 on page 16.
Only one surface is feasible inside a grid element and all other should be removed. The surface
which is saved is the one which intersect the two entering zero-crossings.
3.1.6.5
Blacklisting
All grid elements which have been visited by the algorithm is kept in a list. Whenever the
algorithm finds a possible continuation of the ridge, the list is first refereed to confirm that the
grid element have not been tested by the algorithm before. This is done both to avoid unnecessary
calculations and to avoid infinite loops.
3.1.7
Finding an initial grid element
The algorithm must start with some grid element. Trying each possible grid element in the FTLE
field will be terribly slow. Instead the algorithm start from a few grid elements chosen as shown
in the flowchart of Figure 3.10. This process also facilities the possibility of multiple separate
LCS inside a single FTLE field.
Yes
Unsuccessful
Successful
No
.
Yes
No
Figure 3.10: A flowchart explaining how the algorithm chooses its initial grid element. When the algorithm
determines if a grid element is part of a ridge the zero-crossings is calculate along its edges.
It then uses the lookup table to see if the resulting combination of zero-crossings generates a
surface, if so the algorithm start to march.
3.1.8
Post processing
3.1.8.1
Triangle trimming
Even after smoothing and filtering, the generated surface can consists of unwanted triangles. All
triangles which only are connected to a single other triangle are considered to be noise and is
removed by the algorithm, this is done recursively. An example of this removal can be seen in
in Figure 3.11 for some very complex surfaces. This step has no real physical motivation. It
is just applied to give smoother surface which makes the general shape of the surface easier to
comprehend.
3.1.9
Additions over marching ridges
A number of improvements over marching ridges was developed in this thesis to accommodate
the limited resolution and complex geometry of the 4D PC-MRI measured flow.
• Automatically initializing marching in regions of high LCS likelihood. Instead of manually
telling the algorithm where to search, Section 3.1.7.
• Halting criteria for the marching in regions where the FTLE field and thus the separation
is too low. This removes part of the ridge with little physical interest and speeds up the
algorithm. Section 3.1.6.1.
• Support for open surface. Greatly reduces holes in surfaces for noisy data. As well as better
looking edges of the surfaces. Section 3.1.6.2.
(a) Example 1.
(b) Example 2.
Figure 3.11: Two different examples of complex structures and the triangles removed from them. Blue
triangles are untouched by the triangle trimming while the dark orange triangles are removed.
• Removal of multiple surface inside a grid element, reduces noise around a surface. Section 3.1.6.4 on page 24.
• Lookup table based on edges in order to generate surfaces very fast for each grid element.
Marching cubes is briefly mentioned in [6] which is based on values at vertices. Section
3.1.6.2.
• Additional filtering heuristics for open surfaces. Section 3.1.5.1.
• Removing triangles for smoother surface. Gives better visual perception of the resulting
surfaces. Section 3.1.8.1.
• Upscaling of the scalar field. Better resulting surface for complex geometries with limited
resolution. Section 3.1.2.
• The use of blacklisting grid elements instead of keeping track on start and stop of a ridge.
By this collisions are avoided and over all implementation is simpler. Section 3.1.6.5.
3.2
Implementation
The implementation can be divided into three parts. First data is collected then processed and
finally visualized. All steps are shown in the flow-chart of Figure 3.12.
Collection
Images of the heart in five healthy volunteers was acquired on a Philips Intera 3T MRI scanner
using a phase contrast pulse sequence. The sequence used a spatial resolution of 3 × 3 × 3 mm,
flip angle of 8◦ , 40 time steps and venc of 100cm/s. The flow was measured inside a box made up
of 80 × 80 × 50 voxels covering the whole heart. Additionally anatomy images was also acquired.
All data from the scanner are in DICOM format, a standard for handling medical images as well
as velocity fields.
Processing
The DICOM data was read by Segment [13], a program for quantitative medical image analysis. Inside Segment delineations of the left ventricular cavity was performed from the anatomy
images. Volume tracking [30] solved the flow map equations and from it FTLE fields was calculated. By combining the FTLE fields and the delineations, the algorithm presented in this thesis
Processing
Segment
Collection
Short-axis
delineation
This thesis
io
n
FTLE
fields
y
Volume tracking
m
LCS
Velocity
fields
to
EnSight
lds
fie y
y
it
om
loc at
Ve d An
an
a
An
MRI scanner
Visualization
DICOM reader
lds
ity fie
Veloc atomy
n
and A
at
Patient
li n
De
e
Figure 3.12: All components of the implementation and how they interconnected.
extract the LCS inside the left ventricular cavity. The LCS was extracted using derivatives with
smoothing of σ = 1 and lowest allowed FTLE value of 1.
Visualization
EnSight [4] is a commercial visualization software which in this thesis is used to present all data.
The LCS are converted to EnSight compatible format together with anatomy and the velocity
fields. When all parts are collected inside EnSight visual evaluation of the resulting surface can
be performed.
Chapter 4
Results
The developed algorithm was tested with both synthetic and measured data. The ability to extract
LCS as height ridges from FTLE fields was tested, along with LCS abilities as a flow divider. LCS
was also extracted in some measured velocity fields where physical interpretation of the surface
was possible.
4.1
LCS in cardiac blood flow
Both attracting and repelling LCS was successfully extracted from measured blood flow in five
healthy hearts. Since flow is measured over the whole heart, delineations was preformed in
anatomy images. The delineations limited the LCS extraction to the left ventricular cavity. Inside
the left ventricular cavity 3000 to 10000 voxels of flow was measured in each time step during
the heart cycles. Where the lower number is in end systole for the volunteer with the smallest
heart and the higher number is in end diastole for the volunteer with the largest heart. In Section
4.1.1 and 4.1.2, two examples of LCS extraction are presented. Both in the left ventricular cavity
and both during diastole. The FTLE field is superimposed on the LCS in the figures. Particles
located near a part of the LCS with high FTLE value are subject to greater separation than regions
with lower value. The resulting attracting and repelling LCS were built from 200-500 triangles
and the LCS extraction took around 40 seconds per time step using one core of a modern Intel
processor running at 3 GHz. When linear upscaling was used the number of triangles rose to
1500-4000 (eight times as many) and the running time increased to around 4 minutes per time
step.
4.1.1
Attracting LCS
A backward looking flow map was calculated in diastole, mapping particles to their past position
in early diastole. From this flow map the LCS was extracted. Particles on both side of the LCS
was far away from each other in early diastole but are now close to each other. The LCS could
for instance be a division between blood flowing in from atria as opposed to blood already in the
ventricle during diastole. An example from a healthy volunteer can be found in Figure 4.1.
29
(a) Time step t1 , early diastole.
(b) Time step t2 , mid diastole.
(c) Time step t3 mid diastole.
(d) Time step t4 late diastole.
Figure 4.1: Attracting LCS inside the left ventricular cavity of a healthy heart. The LCS is calculated from a
flow map which maps particle position at time ti to their position in early diastole. Particles on
both side of the surface was far away from each other in early diastole. The color on the surface
indicates value of the underlying FTLE field. A half transparent four chamber is superimposed
in each image. On each row the extracted LCS for one time step is shown in two angles where
t1 < t2 < t3 < t4 .
4.1.2
Repelling LCS
A forward looking flow map was constructed in diastole, mapping particles to their future position in late diastole. From this flow map the LCS is extracted. This LCS separate blood which
was close to each other at some time ti in diastole, but will be far away from each other in the end
of diastole. This gives an alternative view on the inflow of blood during diastole. An example
from a healthy volunteer can be seen in Figure 4.2.
4.2
4.2.1
Validation
Height ridge extraction
During development of the algorithm visual evaluation was performed to determine the quality
of the height ridge extraction. One method used to evaluate the algorithm was to create a discrete three-dimensional scalar field. The intensity in the scalar field was set to mimic a known
mathematical surface such as a sphere. Smoothing and gaussian noise was then applied to test the
algorithms robustness. The resulting surface from the height ridge extraction on the constructed
scalar field, can be compared to the known surface, to determine the quality of the extraction.
The algorithm was successful in reconstructing a number of complex surfaces, some presented in
Figure 4.3.
The algorithm was also tested against FTLE fields calculated from flow measured with 4D
PC-MRI. The evaluation was preformed by comparing two-dimensional slices of the FTLE field
against the extracted surface. For the five tested flows LCS intersected the intensity peaks in
accordance to the height ridge definition. An example of this evaluation ca be seen Figure 4.4.
4.2.2
LCS as a separator
The LCS ability to separate flow with different flow dynamics has been established in several
papers [9, 10, 11, 18, 29]. In this thesis it is also visually validated for measured cardiac blood
flow. The validation uses particle tracing. Particles are released in the left atria and the left
ventricle in early diastole. The particles are then advected until end of diastole. The particles
location in each time step is compared to a extracted attracting LCS calculated in the same time
frame, cf. Section 4.1.1. The results can be seen in Figure 4.5 for one healthy heart. In all
five tested blood flows the surface appeared as a separator. The same test was also performed for
repelling LCS, with successful results.
(a) Time step t1 , early diastole.
(b) Time step t2 mid diastole.
(c) Time step t3 mid diastole.
(d) Time step t4 late diastole.
Figure 4.2: Repelling LCS inside the left ventricular cavity of a healthy heart. Particles on both side of the
surface will be far away from each other in late diastole. The LCS is calculated from a flow
map which maps particle position at time ti , to their position at the end of diastole. The color
on the surface indicates value of the underlying FTLE field. A half transparent four-chamber
is superimposed in each image. On each row the extracted LCS for one time step is shown in
two angles where t1 < t2 < t3 < t4 .
(a) Monkey saddle.
(b) Hyperbolic surface.
(c) Parabolic surface.
Figure 4.3: Surfaces extracted by the algorithm from constructed scalar fields.`Monkey´saddle: x 3 − 3xy2 −
z = 0, hyperbolic surface: x 2 + y2 − z 2 = 3, parabolic surface: 2 x 2 + y2 − z = 0. Gaussian
noise with mean intensity of 20% of the maximum intensity was added. Gaussian smoothing
with s = 1 was applied prior to the noise.
Figure 4.4: Validation of the height ridge extraction from a FTLE field calculated from measured flow. The
height ridge surface (LCS) is in dark gray and is only extracted in a region corresponding to the
left ventricular cavity. In the right column the LCS is made slightly transparent. On each row a
different slice of the underlying FTLE is shown. Local maxima of each slice of the FTLE field
should intersect the height ridge surface.
Figure 4.5: Validation of a attracting LCS by particle tracing. Particles are released far away from each
other in early diastole. The red particles are released in the left atria and the blue particles
are released in the left ventricle. A flow map is calculated in the same time frame mapping all
particles to their location in early diastole. From this flow map the LCS is calculated, shown in
orange. Since the blue and red particles started far away from each other the LCS should act
as a separator between the red and blue particles. The LCS is cut in half in order to clarify the
view.
Chapter 5
Discussion
5.1
Related work
Three-dimensional LCS has previously been used to visualized computer generated flow [28].
The generated flow had less complexity and far greater resolution than the 4D PC-MRI measured
flows used in this thesis. Two-dimensional slices of the three-dimensional LCS have recently been
used to visualize measured cardiac blood flow [1]. In this thesis full three-dimensional LCS are
found and extracted. To the authors knowledge this is the first time that three-dimensional LCS
are used to visualize measured flow of any kind.
5.2
Limitations
Running time
Since the algorithm was implemented with simplicity and not speed in mind there is room for
optimization in the implementation. The implementation uses many loops which is MatLabs
Achilles heel. Re-implementation of the code in another language will drastically reduce the
running time. This will not solve all problems as the another bottle neck is the computations of
FTLE fields. As an example the FTLE fields used to extract the LCS in Section 4.1.1 and 4.1.2
took 15 minutes each to calculate on a modern dual core Intel processor running at 3 GHz.
Close laying ridges
The algorithm had minor problems when two different ridges where to close to each other, this
can be seen in Figure 4.4 on page 34. The hole in the surface looks like someone has punched a
pencil through a paper. This occurred because two ridges got smoothed into one. This forces the
algorithm to search for continuation outward from the real surface. This limitation was greatly
reduced when linear upscaling of the FTLE field was used.
Branching
Another limitation arose due to the assumption that ridges do not branch. On the rare occasion that a ridge did branch it resulted in holes in the surface. The hole can be filled in a
post-processing step where all empty grid elements neighbored by two or more grid elements
containing a surface is revisited, this time allowing more than two zero-crossings on a face.
37
Voxel averaging
When velocity is measured by a MRI scanner the velocity field is averaged inside each voxel.
Due to this fine nuisances of the flow are lost. For instance in regions where two different flows
meet the border voxel can be averaged into zero velocity, albeit there are two polar opposite flows
residing inside the voxel.
Choosing a time frame
The resulting LCS is dependent on the time frame used in the underlying flow map. For some
applications it might not be straight forward how to choose this time frame.
5.3
LCS in heart diseases
The impact different heart diseases have on the blood flow patterns in heart is an open research
subject. A number of heart diseases are bound to impact the blood flow, here a few are given.
Valvular insufficiency
The valves leaflets are not completely sealed when the valve is closed so there is backward blood
flow into the proximal chamber.
Acute myocardial infarction (heart attack)
Interruption of blood supply to a part of the heart, can cause damage and death of the myocardium (heart muscle cells), leading to an alteration in the pumping of the heart.
Arrhythmia (cardiac dysrhythmia)
The heart beat may be too fast or too slow, and may be regular or irregular.
A study in which LCS in healthy hearts are compared to LCS in diseased hearts could provide
insight to different heart diseases.
5.4
5.4.1
Future development
Parallelization
There are number of ways to increase the speed of the algorithm.
• As temporal dependency is not exploited each time step can be handled by a separate CPU.
• Multiple ridge extractions can be done separate of each other at the same time inside the
same FTLE field.
• Each time a grid element leads to two or more possible directions of continuation the
algorithm can distribute each direction to a different CPU.
(a) A cubic grid element
(b) A cubic grid element split into six tetrahedron grid
elements. Image used with permission [14].
Figure 5.1: The relation between cubic and tetrahedral grid elements.
5.4.2
Tetrahedron grid elements
Partly in order to circumvent a now expired patent, marching tetrahedrons [7] was developed as
an alternative to marching cubes. Instead of partitioning the scalar field into cubes it uses the
simplest structure possible, a tetrahedron. The ridge extraction algorithm can be modified to use
tetrahedrons as grid elements instead of cubic grid elements. In Figure 5.1 the relation between
tetrahedron grid elements and cubic grid elements is shown. Partitioning into tetrahedrons can
be achieved without going through cubic partitioning. The tetrahedron grid element will be
composed of four sampled points, six edges and four faces. Compared to a cubic which consists
of eight sampled points, twelve edges and six faces. There are several benefits with this approach
• The case table is very small, only three different cases excluding rotation for the closed
surfaces. For open surface there will only be 26 = 64 cases.
• Zero-crossings of the first derivative will also be search for on the diagonal of the scalar
field. This is especially useful for limited resolution.
• The over all implementation will be simpler.
5.4.3
Flow-map manipulation
Depending on application the flow-map can be modified in order to suppress ridges formed by
“unwanted separation”. A example of this can be the separation of blood particles in the aorta as
seen in Figure 5.2. If interest lies in separating the blood particles staying in the ventricle during
systole as opposed to blood particles leaving, the separation between blood particles in the aorta
can be considered noise. The influence from the separation in the aorta can be removed if the
underlying flow-map is modified. The modification can be to set all particles going through the
aortic valve as having the same future position far away from the aortic valve. This will remove
the influence from separation inside the aorta.
(a) Viewed from the side.
(b) View from the top.
Figure 5.2: Trajectories of three blood particles which start of close to each other in mid-diastole. During
systole all three particles get separated from each other even though all particles leave the heart
during the same heart beat.
The same principle can be applied to other applications. For instance a artificial distance
between the atria and ventricle can be introduced to give better results for the attracting LCS
shown in Section 4.1.1 on page 29.
5.4.4
Temporal dependency
The LCS surface is advected and deformed by the flow. Each time step have much in common
with its neighboring time steps. This could for instance be used to:
• Interpolate surfaces in between time steps and thereby construct smooth animations.
• Initialize a structure in the next time step in order to limit the region of interest and thus
speeding up the algorithm.
A more intriguing way to exploit the temporal dependency is to treat time as any spatial dimension and extract height ridges from a four-dimensional space. Building up a case-table for a
hypercube is not feasible. It is however feasible to do the same thing hyper tetraheder built from
five points, cf section 5.4.2. This would automatically give a restriction on how the LCS surface
can behave in time.
5.4.5
Surface splitting by graphs
Noise or low resolution can turn two ridges into one. Splitting a single surface into two can
be desired in some cases. A graph can be built from the triangles making up the surface. Each
triangle can be a node in the graph and a edge is set between every triangle sharing two corners
with another triangle. The weight on the edge can be set to the sum of the area of both triangles.
If minimal cut in the graph is low enough, two separate surface can be found by dividing the
surface in accordance to the cut in the graph. This is explained in Figure 5.3.
Another approach is to choose the weight of the edges as the sum of FTLE field corresponding
to the corners of the triangle. This can split surfaces in regions of low FTLE. A combination of
area and FTLE can also be used.
Weak
6
Weak
2
3
1
4
5
8
10
7
9
11
12
(a) Example of a surface built by triangles. The dashed line indicate a possible separation of the surface into two separate
surfaces.
(b) Graph generated from the triangle connections in (a).
Each digit represent a triangle and the length of the edge
connecting them is proportional to the sum of the connected triangles area. Where a large areas leads to a short
edge.
Figure 5.3: Example of how surfaces can be split into two.
Another advantage is that cut in this graph can replace the triangle trimming described in
method Section. Triangles which stand out like a thorn will be loosely connected to its neighboring triangles and will be removed first by a minimal cut search. A clear downside is that finding
multiple minimal cuts will be computationally expensive.
Chapter 6
Conclusion
An automatic algorithm able find and extract three-dimensional Lagrangian Coherent Structures
(LCS) in three-dimensional, three component, time-resolved phase contrast MRI measured flow
was developed. The three-dimensional LCS have never been visualized in measured flow before.
Initial experiments show that the algorithm is robust in extracting both attracting and repelling
LCS from the measured flow. The extracted LCS gives perspective on the cardiac blood flow
previously not seen.
43
Bibliography
[1] J. Töger et al. Flow partitioning in intracardiac blood flow using lagrangian coherent structures computed from three-dimensional, time-resolved, three-component phase contrast
MRI measurements. In ISMRM 2009 Workshop on Cardiovascular Flow, Function & Tissue
Mechanics, 2009.
[2] S. Allender, P. Scarborough, V. Peto, M. Rayner, J. Leal, R. Luengo-Fernandez, and A. Gray.
European cardiovascular disease statistics. http://www.ehnheart.org/cms/site/
showdoc.asp?id=7071, 2008. Read 2009-12-28.
[3] American Heart Association. Heart disease and stroke statistics.
americanheart.org/statistics, 2008. Read 2009-12-28.
http://www.
[4] CEI. Ensight. http://www.ensight.com/, Read 2009-12-28.
[5] D. Eberly. Ridges in Image and Data Analysis. Kluwer Academic Publishers, 1996.
[6] J. Furst and S. Pizer. Marching ridges. 2001.
[7] A. Guéziec and R. Hummel. Exploiting triangulated surface extraction using tetrahedral
decomposition. IEEE Transactions on Visualization and Computer Graphics, 1(4):328–342,
1995.
[8] E. Haacke, R. Brown, M. Thompson, and R. Venkatesan. Magnetic Resonance Imaging:
Physical Principles and Sequence Design. John Wiley & Sons, 1999.
[9] G. Haller. Distinguished material surfaces and coherent structures in 3d fluid flows. Physica
D, 149:248–277, 2001.
[10] G. Haller. Lagrangian Coherent Structures from approximate velocity data. Phys. Fluids,
pages 1851–1861, 2002.
[11] G. Haller and G. Yuan. Lagrangian coherent structures and mixing in two-dimensional
turbulence. Physica D, 147(3-4):352–370, 2000.
[12] L. Hanson. Is quantum mechanics necessary for understanding magnetic resonance? Concepts in Magnetic Resonance Part A, 32A(5):329–340, 2008.
[13] E. Heiberg. Segment homepage. http://segment.heiberg.se/, Read 2009-12-28.
[14] Ico83. Marching tetrahedra. http://fr.wikipedia.org/wiki/Fichier:Tetras.
svg, Read 2009-12-28.
45
[15] J. Vétel , A. Garon, and D. Pelletier. Lagrangian coherent structures in the human carotid
artery bifurcation. Experiments in Fluids, 46(6):1067–1079, June 2009.
[16] B. Jonson and P. Wollmer, editors. Klinisk fysiologi med nuklearmedicin och klinisk neurofysiologi. Liber, 2005.
[17] L. Böiers. Lectures on Optimisation. KFS AB, 2004.
[18] F. Lekien, S. Shadden, and J. Marsden. Lagrangian coherent structures in n-dimensional
systems. Journal of Mathematical Physics, 48(6):271–304, June 2007.
[19] L. Lindeberg. Edge detection and ridge detection with automatic scale selection. International Journal of Computer Vision, 30:465–470, 1996.
[20] W. Lorensen and H. Cline. Marching cubes: A high resolution 3d surface construction
algorithm. SIGGRAPH Comput. Graph., 21(4):163–169, 1987.
[21] P. Majer. A Statistical Approach to Feature Detection and Scale Selection in Images. PhD
thesis, Univeristy of Goettingen, 2000.
[22] P. Moran. A flow velocity zeugmatographic interlace for NMR imaging in humans. Magnetic Resonance Imaging, 1(4):197–203, 1982. PMID: 6927206.
[23] P. Peikert and F. Sadlo. Height Ridge Computation and Filtering for Visualization. In
Proceedings of Pacific Vis 2008, pages 119–126, March 2008.
[24] N. Pelc, R. Herfkens, A. Shimakawa, and R. Enzmann. Phase contrast cine magnetic
resonance imaging. Magn Reson Q, 7(4):229–54, 1991.
[25] E. Pierce. Diagram of the human heart. http://en.wikipedia.org/wiki/File:
Diagram_of_the_human_heart_(cropped).svg, Read 2009-12-28.
[26] F. Post, B. Vrolijk, H. Hauser, R. Laramee, and H. Doleisch. Feature extraction and visualization of flow fields. Eurographics 2002 State-of-the-Art Reports, pages 69–100, 2002.
[27] F. Sadlo and P. Peikert. Efficient Visualization of Lagrangian Coherent Structures by Filtered
AMR Ridge Extraction. IEEE Transactions on Visualization and Computer Graphics, 13,
2007.
[28] F. Sadlo and R. Peikert. Visualizing Lagrangian Coherent Structures and Comparison
to Vector Field Topology. In Topology-Based Methods in Visualization II, pages 15–30.
Springer, 2008.
[29] S. Shadden, F. Lekien, and J. Marsden. Definition and properties of Lagrangian coherent structures from finite-time Lyapunov exponents in two-dimensional aperiodic flows.
Physica D, pages 271–304, 2005.
[30] J. Töger. Volume Tracking. A novel method for flow visualization 2008:E40. Master’s
thesis, Lund University, Centre for Mathematical Sciences, Numerical Analysis, 2008.
[31] A. Vander, J. Sherman, and D. Luciano. Human Physiology: the mechanisms of body function.
McGraw-Hill, eighth edition, 2001.
Master’s Theses in Mathematical Sciences 2010:E?
ISSN 1404-6342
LTH-????-????
Mathematics
Centre for Mathematical Sciences
Lund University
Box 118, SE-221 00 Lund, Sweden
http://www.maths.lth.se/