You are on page 1of 81

report 2005/7/31 20:15 page #1

Implementing a visualization tool for


myocardial strain tensors
Masters thesis
by
Anders R onnbrant
LiTH-IMT/BMS20-EX05/403SE
31st July 2005
report 2005/7/31 20:15 page #2
report 2005/7/31 20:15 page i #3
Implementing a visualization tool for
myocardial strain tensors
Masters thesis
performed at Biomedical modelling and simulation,
Department of Biomedical engineering
at Link opings universitet
by Anders R onnbrant
LiTH-IMT/BMS20-EX05/403SE
Supervisor: Katarina Kindberg
Dept. of Biomedical Engineering, Link opings universitet
Examiner: Prof. Matts Karlsson
Dept. of Biomedical Engineering, Link opings universitet
Link oping, 31st July 2005
report 2005/7/31 20:15 page ii #4
report 2005/7/31 20:15 page iii #5
Avdelning, Institution
Division, Department
Datum
Date
Spr ak
Language
Svenska/Swedish
Engelska/English

Rapporttyp
Report category
Licentiatavhandling
Examensarbete
C-uppsats
D-uppsats


Ovrig rapport

URL f or elektronisk version


ISBN
ISRN
Serietitel och serienummer
Title of series, numbering
ISSN
Titel
Title
F orfattare
Author
Sammanfattning
Abstract
Nyckelord
Keywords
The heart is a complex three-dimensional structure with mechanical prop-
erties that are inhomogeneous, non-linear, time-variant and anisotropic. These
properties affect major physiological factors within the heart, such as the pump-
ing performance of the ventricles, the oxygen demand in the tissue and the dis-
tribution of coronary blood ow.
During the cardiac cycle the heart muscle tissue is deformed as a consequence
of the active contraction of the muscle bers and their relaxation respectively.
A mapping of this deformation would give increased understanding of the me-
chanical properties of the heart. The deformation induces strain and stress in
the tissue which are both mechanical properties and can be described with a
mathematical tensor object.
The aim of this masters thesis is to develop a visualization tool for the strain
tensor objects that can aid a user to see and/or understand various differences
between different hearts and spatial and temporal differences within the same
heart. Preferably should the tool be general enough for use with different types
of data.
Link opings universitet
Dept. of Biomedical Engineering
University Hospital
581 85 Link oping
31st July 2005

LITH-IMT-EX-BMS20-EX05/403SE-2005

http://www.imt.liu.se
http://www.ep.liu.se/exjobb/imt/2005/403/
Implementing a visualization tool for myocardial strain tensors
Implementering av ett visualiseringsverktyg f or t ojningstensorer i myokardium
Anders R onnbrant

cardiac strain; deformation; glyph; interactive; tensor; visualization; Coin3d;
Open Inventor
report 2005/7/31 20:15 page iv #6
report 2005/7/31 20:15 page v #7
Abstract
The heart is a complex three-dimensional structure with mechanical properties that
are inhomogeneous, non-linear, time-variant and anisotropic. These properties af-
fect major physiological factors within the heart, such as the pumping performance
of the ventricles, the oxygen demand in the tissue and the distribution of coronary
blood ow.
During the cardiac cycle the heart muscle tissue is deformed as a consequence
of the active contraction of the muscle bers and their relaxation respectively. A
mapping of this deformation would give increased understanding of the mechani-
cal properties of the heart. The deformation induces strain and stress in the tissue
which are both mechanical properties and can be described with a mathematical
tensor object.
The aim of this masters thesis is to develop a visualization tool for the strain
tensor objects that can aid a user to see and/or understand various differences be-
tween different hearts and spatial and temporal differences within the same heart.
Preferably should the tool be general enough for use with different types of data.
Keywords: cardiac strain; deformation; glyph; interactive; tensor; visualization;
Coin3d; Open Inventor
v
report 2005/7/31 20:15 page vi #8
Preface
This thesis was written between late autumn of 2004 and spring 2005 and con-
cludes my studies at the M.Sc. programme in Applied Physics and Electrical En-
gineering at Link opings universitet. Most of the work was done in the north west
corner of house G at campus Valla. Most strain and effort were spent in my living
quarters the weeks prior to nishing.
Acknowledgment
First and foremost I would like to thank my supervisor Katarina Kindberg for the
excellent guiding through the thesis work and for her patience and acceptance with
my somewhat optimistic time-table concerning certain parts of the thesis work.
Likewise, I would like to thank my examinator Matts Karlsson for his shearful
1
and enthusiastic manner regarding many things and also for his comments and
ideas regarding the thesis work.
I also want to thank the personnel at the National Supercomputer Center (NSC)
at Link opings universitet, located in house G at campus Valla, for housing me
during my thesis work and for creating a tender and pleasant environment not
always suitable for thesis writing. A special thanks could be sent to Lennarts
Game Cube for its awless ability to produce entertainment, spoiling hundreds of
valuable work hours.
Last but not least my gratitude goes to all those people around me, too many
to be mentioned by name but too few to be left out, for their unconscious support
and encouragement which I know affected me on a subconscious level.
Anders R onnbrant, Link oping 15th June 2005
1
The misspelling is noted but intentional
vi
report 2005/7/31 20:15 page vii #9
Symbols
x, X Boldface letters are used for vectors and matrices. Lower-case
letters are used for vectors and capital letters for matrices.

CLR Heart coordinate system (left ventricle).

clr Bead coordinate system.

fsn Fiber coordinate system.


The Kronecker delta.
i j
=
_
1, i = j
0, i ,= j
Glossary
Afne transformation A special class of transformation that preserves lines and
parallelism. Points on a line are still points on a straight line after deforma-
tion.
Check valve A mechanical device that forces gas or liquid in a system to ow in
only one direction.
Collagen Connective tissue.
Diastole The relaxation phase of the hearts pumping cycle.
Geons Simple forms used for constructing more complex ones.
Index gymnastics Technique for extracting the content from geometric (tensor)
equations by working in component notation and rearranging indices [12].
Systole The contraction phase of the hearts pumping cycle.
vii
report 2005/7/31 20:15 page viii #10
viii
report 2005/7/31 20:15 page ix #11
Contents
Abstract v
Preface and Acknowledgment vi
Symbols and Glossary vii
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem description . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Anatomy of the heart 3
2.1 Anatomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1 The myocardium . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Fiber sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Strain and tensors 9
3.1 Strain and deformation . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 The Tensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.1 Eigenvector-eigenvalue decomposition . . . . . . . . . . . 10
3.2.2 Symmetric-antisymmetric decomposition . . . . . . . . . 10
3.3 Strain tensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Data and data acqusition 15
4.1 Data acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.1 MRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.2 Ultrasonic . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.3 Marker tracking . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 Strain calculation . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.1 Coordinate transformation . . . . . . . . . . . . . . . . . 17
4.2.2 Calculation method . . . . . . . . . . . . . . . . . . . . . 19
4.2.3 Synthetic data . . . . . . . . . . . . . . . . . . . . . . . . 20
ix
report 2005/7/31 20:15 page x #12
5 Visualization 25
5.1 Homogeneous coordinates . . . . . . . . . . . . . . . . . . . . . 25
5.2 Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2.1 Other ideas . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3 Available tools . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.3.1 Ensight . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3.2 Matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3.3 OpenDX . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.3.4 Open Inventor/Coin 3D . . . . . . . . . . . . . . . . . . . 34
5.3.5 Why Coin? . . . . . . . . . . . . . . . . . . . . . . . . . 35
6 Tensview 37
6.1 Tensview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.1.1 Work ow . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.2 Implementation details . . . . . . . . . . . . . . . . . . . . . . . 38
6.2.1 Data les . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.2.2 Time series . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.2.3 The Inventor le . . . . . . . . . . . . . . . . . . . . . . 41
6.2.4 Glyphs . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.2.5 Deformation and coloring . . . . . . . . . . . . . . . . . 42
6.3 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.3.1 Arguments and options . . . . . . . . . . . . . . . . . . . 42
6.3.2 Mouse and keyboard usage . . . . . . . . . . . . . . . . . 43
6.3.3 Camera interaction mode . . . . . . . . . . . . . . . . . . 43
6.3.4 Scene graph interaction mode . . . . . . . . . . . . . . . 44
6.3.5 The input le . . . . . . . . . . . . . . . . . . . . . . . . 44
7 Future work 47
7.1 Software improvements . . . . . . . . . . . . . . . . . . . . . . . 47
7.2 Other applications . . . . . . . . . . . . . . . . . . . . . . . . . . 48
A Tensview 51
A.1 Details about key commands . . . . . . . . . . . . . . . . . . . . 51
A.2 Source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
B IV-le viewer and example 55
B.1 IV-le viewer source code . . . . . . . . . . . . . . . . . . . . . 55
B.2 IV-le advanced example . . . . . . . . . . . . . . . . . . . . . . 56
C Compact disc 59
x
report 2005/7/31 20:15 page xi #13
List of Tables
6.1 Command line options. . . . . . . . . . . . . . . . . . . . . . . . 43
6.2 Camera interaction controls. . . . . . . . . . . . . . . . . . . . . 44
6.3 Scene graph interaction keyboard controls. . . . . . . . . . . . . . 45
xi
report 2005/7/31 20:15 page xii #14
xii
report 2005/7/31 20:15 page xiii #15
List of Figures
2.1 Illustration showing the main parts of the mammalian heart. . . . . 4
2.2 An illustration of the laminar ber sheets within the myocardium. 7
3.1 Transformation of one neighborhood into another. . . . . . . . . . 11
4.1 Position of the beads and markers . . . . . . . . . . . . . . . . . 17
4.2 Illustration of the bead array . . . . . . . . . . . . . . . . . . . . 18
4.3 Synthetic bead positions before deformation . . . . . . . . . . . . 22
4.4 Synthetic bead positions after deformation . . . . . . . . . . . . . 22
4.5 Result from synthetic calculations . . . . . . . . . . . . . . . . . 23
5.1 Antisymmetric and symmetric shearing on a rectangle . . . . . . . 28
5.2 Example of shearing in 3D. . . . . . . . . . . . . . . . . . . . . . 29
5.3 Three different 3D glyphs . . . . . . . . . . . . . . . . . . . . . 30
5.4 Example showing common region and connectedness. . . . . . . . 31
5.5 Morphing cone . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.6 The M uller-Lyon and relative size illusions . . . . . . . . . . . . 32
5.7 A simple OpenDX network . . . . . . . . . . . . . . . . . . . . . 33
5.8 Screen-shot from OpenDX result . . . . . . . . . . . . . . . . . . 34
5.9 Inventor le example, three shapes . . . . . . . . . . . . . . . . . 36
5.10 Inventor le example, two cylinders . . . . . . . . . . . . . . . . 36
6.1 Data ow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2 Example of an input le. . . . . . . . . . . . . . . . . . . . . . . 45
6.3 Tensview undeformed/deformed screen-shots . . . . . . . . . . . 46
xiii
report 2005/7/31 20:15 page xiv #16
xiv
report 2005/7/31 20:15 page 1 #17
Chapter 1
Introduction
1.1 Background
The heart is an intrinsic part of the mammalian creature. As a result of the biolog-
ical evolution it has become a complex three-dimensional structure with mechan-
ical properties that are inhomogeneous, non-linear, time-variant and anisotropic.
These properties affect major physiological factors within the heart, such as the
pumping performance of the ventricles, the oxygen demand in the tissue and the
distribution of coronary blood ow. Further, malfunction in these physiological
factors are the source of various heart diseases, for example ischemia and infarct.
During the cardiac cycle the heart muscle tissue (myocardium) is deformed as
a consequence of the active contraction of the muscle bers and their relaxation
respectively. A mapping of this deformation would give increased understanding
of the mechanical properties of the heart and the hearts pumping function.
The strain induced in the myocardium during the heart cycle is complex and
closely related to the muscle ber orientation, the irregular shape of the left ven-
tricle and local differences in ventricular radii of curvature and wall thickness.
1.2 Problem description
When calculating strain in three dimensions the use of tensors is extensive. Since
tensors are collections of numbers it is hard do integrate them mentally by only
examining the numbers or making 2D plots. To get the right feeling for what is
happening it is necessary to examine the tensors in another way.
The aim of this masters thesis is to develop a visualization tool for the strain
tensor objects that can aid a user to see and/or understand various differences be-
tween different hearts and spatial and temporal differences within the same heart.
Preferably should the tool be general enough for use with different types of data.
R onnbrant, 2005. 1
report 2005/7/31 20:15 page 2 #18
2 Chapter 1. Introduction
1.3 Overview
Chapter 2 of this thesis gives a brief description of the anatomy of the heart. In
chapter 3 a denition of strain will be presented together with the tensor object. A
deduction of the formulas for strain calculations will be performed at the end. The
different types of data acquisition are presented in chapter 4 together with the data
used in this thesis and the method used for extracting the strain from it. Also, a
synthetic data set is presented used for verication of the method used. Chapter 5
contains techniques for visualization and the connection they have with the tensor,
presentation of the currently available tools and the argumentation about their pros
and cons. In chapter 6 the presentation of the software Tensview is made followed
by some of the internal details. Future work is discussed in the seventh and last
chapter. There is also a CD enclosed with the thesis which contains source code,
example data, screen-shots and movies plus related material. A full listing of the
content is presented in appendix C.
report 2005/7/31 20:15 page 3 #19
Chapter 2
Anatomy of the heart
In this chapter a brief description of the hearts anatomy and functions are made
with focus on describing the special structure of the myocardiumwhich is the bulk
material in the hearts musculature and the tissue that performs the contractions
and relaxations.
2.1 Anatomy
The heart is a muscular organ with a size little larger than a st. In contrary to
skeletal muscles it is not consciously controlled, it contracts and relaxes as a con-
sequence of auto-rhythmic cells. Primarily the heart is built up by four pumping
chambers and connecting artery and veins leading blood to and from the body and
a smaller circulatory system which runs back and forth through the lungs. The
four chambers are the left and right atria and ventricles. The left and right atria
receives blood that returns to the heart from the body and the lungs respectively.
The ventricles pumps blood away from the heart.
When oxygen depleted blood returns from the body it rst enters the right
atrium via the superior and inferior vena cava. The superior vena cava returns
blood coming from the upper parts of the body and inferior vena cava returns the
blood returning from the lower parts, the legs and from lower parts of the torso.
From the right atrium the blood ows through the tricuspid valve and into the
right ventricle. There are two valves separating the atria from the ventricles, the
tricuspid valve and the mitral valve, where the mitral valve separates the left atrium
and ventricle. The valves have the function of preventing blood from re-entering
the atria during the contraction phase of the ventricles.
The contraction of the right ventricle during the systolic phase of the hearts
pumping cycle pushes the blood through the pulmonary valve and into the pul-
monary artery which leads to the lungs where the blood will be re-oxygenated.
The pulmonary valve has the same function as the tricuspid and mitral valves
R onnbrant, 2005. 3
report 2005/7/31 20:15 page 4 #20
4 Chapter 2. Anatomy of the heart
which is to prevent blood from owing backward in the system, like check valves
in a mechanical system. Returning from the lungs through the pulmonary vein the
oxygenated blood ends up in the left atrium which empties into the left ventricle
through the mitral valve. During the contraction phase when the left ventricle con-
tracts the blood is pushed through the aortic valve, which is the fourth valve of the
heart, into the aorta and from the aorta the blood continues to the rest of the body
via the circulatory system. The left ventricular wall is the thickest wall in the heart
since it is the left ventricle which has to push the blood into the rest of the body.
Figure 2.1: Illustration showing the main parts of the mammalian heart.
Between the two ventricles lies the septum, a fairly thick wall separating the
two stronger pumping chambers and which also has an important role in propagat-
ing the electrical signal which makes the heart contract and relax. There are three
important points in the heart for the signal propagation mechanism, the sinoatrial
node (SA node), atrioventricular node (AV node) and the apex area located at the
bottom of the left ventricle, in the meeting point of septum and the left ventricular
wall. The SA node is located on the right atrium wall inferior to the superior vena
cava and the AV node to the upper right of septum. From the apex area the signal
is propagated through the purkinje bers to and along the ventricular walls.
report 2005/7/31 20:15 page 5 #21
2.2. Fiber sheets 5
The heart walls are divided into three layers, the epicardium which covers the
outside, the myocardium in the middle which is the pumping tissue of the wall and
the endocardium that lines the inside. The epicardium and endocardium consist
primarily of collagen and are fairly thin compared to the myocardium. Since the
heart contracts and relaxes continuously and mainly consists of the myocardium
muscle tissue it also needs a constant supply of oxygen and nutrients. The epi-
cardium that covers the inside of the chambers does not let any oxygenated blood
into the myocardium why the heart does not get its supply of blood that way. In-
stead the heart has coronary arteries which supplies the hearts muscle tissue with
blood. There are two coronary arteries, left and right, which emerges from the
aorta at the top of the heart. They stretch along the sides of each respective ventri-
cle and branches into smaller and smaller vessels that penetrates the tissue having
become small enough. Failure in these vessels of some kind that prevents the nor-
mal and/or demanded blood ow causes damage to the myocardiumand is referred
to as an infarct or ischemia. [18, 21].
2.1.1 The myocardium
The hearts muscle tissue differs from the type found in the skeletal muscles and
is referred to as myocardium. The myocardium is built up by small cells called
myocytes. Skeletal muscle bers can be up to a meter in length while the length
of a single myocyte only reaches some hundred -meters with a typical length of
30 50m. What also differs the myocytes from the skeletal muscle cells are that
they are mono-nuclear cells with a highly irregular shape. Skeletal muscle bers
have more the appearance of real bers or strings since they can be up to a meter
in length, they also have multiple nuclei.
The myocytes connect to each other through small tentacles called intercalated
discs in a somewhat irregular way, forming a anastomosing network with spongy
appearance, instead of the more deterministic connectivity found in skeletal mus-
cle tissue. The capillaries transporting blood to the tissue runs through this spongy
network of cells. This spongy appearance is not completely random though, there
are distinct directional features at any point in the myocardium especially tangen-
tial to the cardiac wall [13].
2.2 Fiber sheets
The directional features in the spongy network are of great interest in todays re-
search on how the myocardium works since a ber structure within the heart mus-
cle would give some answers to how the contracting and relaxing forces are gen-
erated. Fibers are only affective in one direction and the complex movements of
the heart muscle cannot be explained with the same simple contracting/relaxing
solution used by for example the skeletal biceps muscle, which is attached to bone
at both ends.
report 2005/7/31 20:15 page 6 #22
6 Chapter 2. Anatomy of the heart
It has been found that the left ventricle (LV) muscle tissue not only has a sin-
gle varying ber direction, but also is organized into laminar sheets, approximately
4 2 cells thick. These sheets play a crucial role in the LV wall thickening and
blood ejecting process. As mentioned above bers can only contract in one di-
rection, and the amount of contraction possible is approximately 15% along the
ber axis. Ejected volume fractions and systolic wall thickening of 60% and 40%
respectively have been observed and only the volume fractions can be explained
solely by the ber shortening. [5, 8, 11].
The direction of the ber structure varies depending on the location in the
heart muscle but is considered to have a smooth transition from epicardium to
endocardium. The typical value is about 60

at the epicardium to 70

at the
endocardiumfrom the circumferential axis (

C in gure 2.2) around the heart [13].
This angle is referred to as the -angle.
Further, the orientation of the sheets are described by adding a second angle,
, which species the rotation around the ber axis in the ber sheet coordinate
system dened by the laminar sheets. Simply put, the -angle folds the sheets
like an accordion along the radial axis,

R in gure 2.2. This angle does not vary
smoothly from epicardium to endocardium, instead it has a more complex pattern
and a complete map of this angle does not exist today. Also, two families of -
angles can be detected in the LV myocardium. A more in depth description about
the laminar ber sheets can be found in [5, 8].
Figure 2.2 illustrates how the bers are located in the heart muscle. The coor-
dinate system

CLR is related to the heart, where

C is the circumferential direction
around the heart,

L the axis going from the apex area up through the left ventricle,
and

R the direction pointing out from the heart wall. The

fsn coordinate sys-
tem is the ber sheet system, where

f is the ber direction, s the sheet direction
orthogonal to

f, and n the normal to the plane dened by

f and s.
report 2005/7/31 20:15 page 7 #23
2.2. Fiber sheets 7

f
s
n
Figure 2.2: An illustration of the laminar ber sheets within the myocardium. The
coordinate system associated with the ber sheet is

fsn, where

f is pointing in the
direction of the bers, s in the sheet plane orthogonal to

f, and n is the normal to
the ber sheet. The -angle is measured between

f and

C, the -angle between s
and

R. The

CLR is related to the heart, where

C is the circumferential direction
around the heart,

L the axis going from the apex area up through the left ventricle,
and

R the direction pointing out from the heart wall.
report 2005/7/31 20:15 page 8 #24
8 Chapter 2. Anatomy of the heart
report 2005/7/31 20:15 page 9 #25
Chapter 3
Strain and tensors
In this chapter a description of mechanical strain and strain tensors are presented.
A deduction of the formulas for strain calculations is performed at the end of the
chapter and how these are formed into a tensor.
3.1 Strain and deformation
When studying the mechanics of materials the concept of strain and stress are used
widely, and the two are closely related. For example, a soft rubber ball laying on a
table is exposed to stress due to the gravitational force and the opposite force from
the table. The rubber ball is in a state of equilibrium. If one would squeeze the ball
it is still exposed to stress. But also, during the deformation from the original to a
deformed shape the ball is exposed to strain due to the change in distance between
points in the material. Stress is the distribution of internal forces and tensions that
balance a given set of external tractions and forces, while strain is the measure for
the amount of deformation.
The denition of deformation is the change in distance between any two points
within a body from one time to another. If the distance between any pair of points
has not changed the body has not been deformed, though it may have been rotated
and translated. Thus, rotations and translations does not contribute to the defor-
mation. Strain is the dimensionless ratio between the length in the original state
and the length in the deformed state. It is not meaningful to talk about strain un-
less there is a point of reference, also there is no absolute reference point when
calculating strain since the two states can be chosen arbitrarily.
Today only strain is possible to study and measure when it comes to the hearts
muscle tissue. The reason for this is that stress depends on the material properties
of the tissue which are unknown today and quite complex. As mentioned in section
1.1 they are non-linear, inhomogeneous, time variant and anisotropic.
R onnbrant, 2005. 9
report 2005/7/31 20:15 page 10 #26
10 Chapter 3. Strain and tensors
3.2 The Tensor
A tensor is a mathematical object that represents physical data independent from
any coordinate systems in which the data is measured and/or calculated. The tensor
components are associated with a specic coordinate system or frame and under-
goes a linear transformation when the frame is changed. Tensors are generaliza-
tions of scalars, vectors and matrices to an object that has an arbitrary number of
indices. Scalars have zero indices or are tensors of order zero, a vector has order
one and a matrix order two [12].
Strain in three dimensions (Euclidean space) is represented by second order
tensors which have nine independent components, also referred to as three dimen-
sional Cartesian tensors. To better understand the physical meaning of a tensor
it is sometimes useful to decompose the tensor into smaller pieces. Second order
tensors are matrices and can thus be decomposed in the same way as those using
ordinary matrix algebra.
3.2.1 Eigenvector-eigenvalue decomposition
One useful and very common decomposition is the eigenvector-eigenvalue decom-
position which satises the equations
Te = e TP = PD
where T is the tensor, e the eigenvector and the corresponding eigenvalue. Using
only matrices P contains the eigenvectors (column wise) and the diagonal elements
of D holds the eigenvalues. If the tensor is symmetric the eigenvectors become
orthogonal [12], which is a preferred situation when visualizing using for example
glyphs, which is further explained in section 5.2.
3.2.2 Symmetric-antisymmetric decomposition
Another way of decomposing a tensor is into one symmetric and one antisymmet-
ric part. This holds for all tensors of any rank. So, a Cartesian tensor A can be
written in the form
A = A
S
+A
A
(3.1)
where
A
S
=
1
2
_
A+A
T
_
(3.2)
A
A
=
1
2
_
AA
T
_
(3.3)
The symmetric part has six independent components and the antisymmetric part
has three. These can be interpreted as different transformations when deforming
objects using homogeneous coordinates which is described in section 5.1 on page
27.
report 2005/7/31 20:15 page 11 #27
3.3. Strain tensors 11
3.3 Strain tensors
Figure 3.1: Transformation of one neighborhood into another. The triangle PP

is transformed into QQ

.
To fully describe a deformation of a body the coordinates of any particle in
the deformed state must be functions of the coordinates of that same particle in
the original conguration. Letting (X
1
, X
2
, X
3
) be the original coordinates and
(x
1
, x
2
, x
3
) the deformed coordinates equation (3.4) describes the relation between
the original and deformed shapes.
Assuming the deformation is continuous, a neighborhood in the original con-
guration is transformed into a neighborhood in the deformed conguration, with
a one-to-one mapping it follows that it is also the other way around. The original
coordinates must be functions of the deformed coordinates, as in equation (3.5),
since it always possible to choose the original frame arbitrary.
x
i
= x
i
(X
1
, X
2
, X
3
) (3.4)
X
i
= X
i
(x
1
, x
2
, x
3
) (3.5)
From this point the description of strain in three dimensions can be made as
follows. An innitesimal line element PP

, see gure 3.1, connecting two points


in a neighborhood, P(X
1
, X
2
, X
3
) and P

(X
1
+dX
1
, X
2
+dX
2
, X
3
+dX
3
) will have
the squared length
ds
0
2
= dX
2
1
+dX
2
2
+dX
2
3
(3.6)
A deformation of the neighborhood transforms the line element PP

into a new line


element QQ

, which has the squared length


ds
2
= dx
2
1
+dx
2
2
+dx
2
3
(3.7)
report 2005/7/31 20:15 page 12 #28
12 Chapter 3. Strain and tensors
From equations (3.4) and (3.5) it follows that the innitesimal line components
can also be written as
dx
i
=

j
x
i
X
j
dX
j
dX
i
=

j
X
i
x
j
dx
j
i, j 1, 2, 3
or by using the Einstein summation convention as
dx
i
=
x
i
X
j
dX
j
dX
i
=
X
i
x
j
dx
j
By using the Kronecker delta operator and performing some index gymnastics
the squared length elements become
ds
2
0
=
i j
dX
i
dX
j
=
i j
X
i
x
m
X
j
x
n
dx
m
dx
n
(3.8)
ds
2
=
i j
dx
i
dx
j
=
i j
x
i
X
m
x
j
X
n
dX
m
dX
n
(3.9)
From this the squared length difference can be formulated as either one of the two
equations (3.10) and (3.11), depending on which frame of reference is preferred.
ds
2
ds
2
0
=
_

ab
x
a
X
i
x
b
X
j

i j
_
dX
i
dX
j
(3.10)
ds
2
ds
2
0
=
_

i j

ab
X
a
x
i
X
b
x
j
_
dx
i
dx
j
(3.11)
There is one strain tensor associated with each one of these notations, E
i j
with
equation (3.10) and e
i j
with (3.11). E
i j
is referred to as the Lagrangian strain tensor
and e
i j
as the Eulerian. The tensor used in this thesis is the Lagrangian version.
The tensors are dened as
E
i j
=
1
2
_

ab
x
a
X
i
x
b
X
j

i j
_
(3.12)
e
i j
=
1
2
_

i j

ab
X
a
x
i
X
b
x
j
_
(3.13)
or, in a simpler notation
ds
2
ds
2
0
= 2E
i j
dX
i
dX
j
(3.14)
ds
2
ds
2
0
= 2e
i j
dx
i
dx
j
(3.15)
report 2005/7/31 20:15 page 13 #29
3.3. Strain tensors 13
Using the less obscure matrix notation, E
i j
can be written as
E =
1
2
(CI) (3.16)
where C is the Cauchy-Green deformation tensor and I is the identity matrix. The
Cauchy-Green deformation tensor is dened as the inner product of the deforma-
tion gradient tensor F by itself, and thus becomes a symmetric tensor [16].
C = F
T
F
C being symmetric and I diagonal it follows that E is a symmetric tensor as well.
This can also be deducted directly from the denition in equation (3.12), though a
little less obvious. Without any further ado E can be expressed as
E =
1
2
_
F
T
FI
_
(3.17)
where gradient tensor F is
F =
x
i
X
j
= x
i, j
i, j 1, 2, 3 (3.18)
F =
_

_
x
1
X
1
x
1
X
2
x
1
X
3
x
2
X
1
x
2
X
2
x
2
X
3
x
3
X
1
x
3
X
2
x
3
X
3
_

_
report 2005/7/31 20:15 page 14 #30
14 Chapter 3. Strain and tensors
report 2005/7/31 20:15 page 15 #31
Chapter 4
Data and data acqusition
In this chapter three data acquisition methods used for collecting raw data for
strain calculations are presented followed by the calculations made on the data
that where at hand for this thesis. The last section presents a syntheticall data set
which is used for validation purposes.
4.1 Data acquisition
There are different ways of collecting the data needed for calculating strains within
the myocardium. Two non-invasive methods are magnetic resonance imaging
(MRI) and the use of ultrasonic Doppler effect. The data available for this the-
sis is collected with the use of marker tracking which is an invasive method.
4.1.1 MRI
The MRI techniques are based on the fact that all nuclei that have a net charge also
have a magnetic moment. In theory all nuclei with a net charge could be used for
MRI but in practice the hydrogen atom is used (
1
H) since it is common in living
tissue. MRI can be used for creating both 2D and 3D images, which can also
be captured as a sequence of images creating 3D and 4D data respectively. The
data obtained are scalar values in the three spatial directions, usually with some
certainty values attached.
Protons in the nucleus are constantly spinning around the magnetic moment
and when a nucleus is put into a magnetic eld the magnetic moment axis will
start to precess around the eld axis with a certain frequency called the Larmor
frequency. This precession can, for the hydrogen atom, be in either one of two
states, a higher and a lower energy state. Applying a radio frequency magnetic
eld which equals the Larmor frequency protons in the lower energy state can be
excited into the higher state. When the radio frequency is turned off the protons
R onnbrant, 2005. 15
report 2005/7/31 20:15 page 16 #32
16 Chapter 4. Data and data acqusition
return to their previous state sending out the energy they absorbed. By measuring
the strength and rate of decrease in the magnitude of the signal emitted from the
deexcitation it is possible to determine the kind of tissue being observed.
Two MRI methods for capturing data are Phase contrast MRI (PC-MRI) and
MR tagging. By adding gradients to the magnetic pulse sequence PC-MRI creates
phase information in the captured data which is proportional to the velocity. MR
tagging works by pre-magnetizing areas within the tissue creating a grid which
deforms with the tissue and that shows up as dark bands in the image data. Having
this grid makes it possible to track certain points within the image [15].
4.1.2 Ultrasonic
The use of ultrasonic Doppler effects or myocardial velocity imaging is the most
widely used method for cardiac strain rate. It is does not demand the kind of
equipment needed for MRI and can be performed on humans without problems.
Though, it does not nearly give the amount of data MRI techniques do, can only
be used for 1D or perhaps 2D data in certain setups, and only gives the velocity of
larger structures of the measured tissue [6].
4.1.3 Marker tracking
The use of markers for measuring the position of points in the myocardium is an
invasive method. This way of studying the deformation of the heart is done by sur-
gically implanting metallic markers into the cardiac muscle and then track those
with radio-graphic tracking. Tracking the markers during the cardiac cycle gives
a high spatial and temporal resolution, much better than can be achieved using
MRI or ultrasound [9]. Although this method is very effective for getting the high
spatial and temporal resolution data needed for strain calculations within the my-
ocardium it cannot be implemented clinically since it needs a surgical operation.
Furthermore, the surgery may cause scarring on the tissue resulting in artifacts in
the data [9].
The data used for the strain calculations in this thesis where obtained from ex-
periments performed at Falk Cardiovascular Research Center, Stanford University
School of Medicine, Stanford, CA, USA. There were several data sets available
but only one where used since they all represents the same kind of data. The
data set used where obtained from sheep and results from the data are presented,
together with a more detailed description of the marker method, in articles by
Harrington et al. [8] and Cheng et al. [4]. Positions of the implanted markers are
shown in gure 4.1. The small cluster of points to the right is the area where the
strain was calculated, and the markers in this area are smaller, 0.7 mm in diameter
compared to 1.5 3.0 mm, and referred to as beads.
report 2005/7/31 20:15 page 17 #33
4.2. Strain calculation 17
Figure 4.1: The position of the beads and markers in the data set obtained from
sheep. The small cluster of points to the right are the beads and also the location
where the strain was calculated.
4.2 Strain calculation
The calculation method for obtaining the strain tensors is presented in the currently
unpublished paper [10] by Kindberg, Karlsson, Ingels, and Criscione. It presents a
method using linear-quadratic or linear-cubic polynomial adaption and gives iden-
tical results, or for a sparse array smaller errors, than for example a method which
uses nite elements. A very brief work ow diagram of the method is illustrated
in the Matlab part of gure 6.1 on page 39.
4.2.1 Coordinate transformation
The beads and markers are measured in a laboratory reference coordinate system.
Even though strain is dened as depending on the relative distance change be-
tween any two points in any coordinate system a transformation to a new system
should be done before any visualization is performed. The use of homogeneous
coordinates presented in section 5.1 for visualizing purposes contains translation
components and it is much more convenient if the data represents structures that
do not move to much relative the global reference system. In a animated scene this
report 2005/7/31 20:15 page 18 #34
18 Chapter 4. Data and data acqusition
would otherwise cause the interesting objects to y around. Also, to be able to
compare different hearts it is necessary to have another reference system which is
related to the heart itself and not the surroundings in which the data was measured.
c

l
r
Figure 4.2: Illustration showing the (ideal) looks of the bead array and how the
beads are numbered. The origin is located at the crossing point of the coordinate
axes.
To describe the transformation two coordinate systems are used. The inter-
mediate cylindrical system

CLR, also presented as the hearts coordinate system
in section 2.2, and

clr a local Cartesian system around the bead array, see gure
4.2. The

L axis is dened as the vector from point 1 and the centroid of points
4, 7, 10, 13 from gure 4.1.

C is the circumferential axis around

L and

R
the cross product

C

L, though they are not really needed for nding

clr. The

clr system is then dened using the



L and the normal to the plane formed by the
points 15, 19, 23 as r. The normal being the cross product
r = v
1523
v
1519
where v
1523
and v
1519
are the vectors from point 15 to points 19 and 23 respec-
tively. Having

L and r the c direction becomes
c =

L r
At this point it is not certain that

L and

l are aligned and to have

clr become a
orthogonal system

l is dened as the cross product

l = r c
From this a 4-by-4 transformation matrix M is constructed using homogeneous co-
ordinates. The inverse of M is put together as in (4.1) and then used for nding M.
report 2005/7/31 20:15 page 19 #35
4.2. Strain calculation 19
The translation component moves the origin to the centroid of points 15, 19, 23.
The transformation matrix is then calculated and applied to all points in each time
frame of the data set, having the face of the bead array that is pointing out from
the heart wall becoming the new origin. Homogeneous coordinates are described
in section 5.1.
M
1
=
_

_
c
1
l
1
r
1
t
1
c
2
l
2
r
2
t
1
c
3
l
3
r
3
t
1
0 0 0 1
_

_
(4.1)
4.2.2 Calculation method
An estimation of the coordinates in the deformed conguration is approximated
with a linear-quadratic polynomial which is a function of the coordinates in a cho-
sen reference frame. The polynomial is then used for constructing the gradient
tensor F in (3.18). The reference coordinates (X
1
, X
2
, X
3
) corresponds to c,

l and
r respectively.
Each deformed coordinate component can be expressed as in (4.2), but the
arrangement of the beads possess restrictions on the function dividing it into a
quadratic and linear part.
x
i
= f (X
1
, X
2
, X
3
) , i 1, 2, 3 (4.2)
Having four beads in the radial direction enables the use of a second order poly-
nomial (4.3).
f
1
= a
1
X
2
3
+a
2
X
3
+a
3
(4.3)
The two other directions lying in the plane normal to r can only be tted to a
rst order polynomial each. Combining these gives a linear polynomial of two
variables where the bilinear term is removed, thus resulting in
f
2
= (b
1
X
1
+b
2
)(b
3
X
2
+b
4
) b
1
b
2
X
1
X
2
= b
1
b
4
X
1
+b
2
b
3
X
2
+b
2
b
4
(4.4)
Combining (4.3) and (4.4) gives the linear-quadratic polynomial
p(X
1
, X
2
, X
3
) =
_
a
1
X
2
3
+a
2
X
3
+a
3
_
(b
1
b
4
X
1
+b
2
b
3
X
2
+b
2
b
4
) (4.5)
which can be used for estimating a single coordinate component, since the poly-
nomial is a scalar valued function. By using a different set of coefcients in the
polynomial for each direction each of the components x
i
in (4.2) can be estimated.
Written in matrix notation this becomes

X = P
T
C (4.6)
report 2005/7/31 20:15 page 20 #36
20 Chapter 4. Data and data acqusition
where the size of C is a 9-by-3 matrix and P is 12-by-9. Twelve points are being
estimated and the polynomial got nine components. The resulting the matrix

X
holds the estimates for each point in a row order fashion.
_

_
x
c 1
x
l 2
x
r 3
.
.
.
.
.
.
.
.
.
x
c 12
x
l 12
x
r 12
_

_
The coefcients in C are found by minimizing the difference between the
measured and estimated coordinates. The minimization can be done by solving
equation (4.6) for C and inserting the coordinates for the chosen reference frame
into P and

X. This system is over determined but is solved by using the Moore-
Penrose pseudo inverse, thus
C = P
T
0
+
X
0
where
+
is the Moore-Penrose inverse dened as B
+
=
_
B
T
B
_
1
B
T
[12]. Fol-
lowing this the gradient tensor F in equation (3.18) can be expressed as
F =
P
T
X
i
C = P
T
,i
C
resulting in the the strain tensor
E =
1
2
_
C
T
P
,i
P
T
,i
CI
_
All calculations have been implemented in Matlab scripts which are available
on the enclosed CD. The script performing the calculations on the sheep data is
called Run sham.m. It uses some other scripts which are found in the same direc-
tory for parts of the calculations.
4.2.3 Synthetic data
For validation of the polynomial method a synthetic data set is used. It is cre-
ated by deforming a cylinder from undeformed coordinates (R, , Z) to deformed
coordinates (r, , z) related by equations
r
2
=
R
2
R
2
1
d
+r
2
1
= aR++bZ
z = cR+dZ
where R
1
= 2.00, r
1
= 1.65, a = 0.10, b = 0.20, c = 0.30 and d = 0.80. Here
R
1
and r
1
denes the inner undeformed and deformed radius, the other constants
report 2005/7/31 20:15 page 21 #37
4.2. Strain calculation 21
can be chosen arbitrarily for specifying the amount of twist and height shortening
of the cylinder in the deformed state. For example a and b adjusts the angular
component in the deformed state depending on the radial and longitudinal location
in the undeformed state. Having (a, b, c, d) = (0, 0, 0, 1) would give no twisting
and shortening of the cylinder.
The exact solution in cylindrical coordinates is
F
rz
=
_
_
r
R
r
R
r
Z

Z
z
R
z
R
z
Z
_
_
which converts to the Cartesian system used in the bead array as
F
zxy
= R

T
F
rz
R

0
(4.7)
where R

and R

0
are rotation matrices aligning the deformed and undeformed
systems, R

0
being the matrix associated with the undeformed state, and converts it
into Cartesian coordinates. The mapping from Cartesian to cylindrical coordinates
is dened by left multiplication with the rotation matrix (4.8) and the opposite
by its transpose, thus explaining the mapping in (4.7) [16]. The primed rotation
matrices in (4.7) are permuted versions of the matrices in (4.8) and (4.9). This is
because the denition of a rotation matrix in (4.8) maps the cylindrical coordinate
system to the Cartesian as (r, , z) (x
c
, y
c
, z
c
). But the coordinate system used
in the bead array must be mapped to the cylindrical as (r, , z) (z
c
, x
c
, y
c
), (the

clr coordinate system). Right multiplying the matrices (4.8) and (4.9) with the
permutation matrix A in (4.10) creates the correct primed versions R

and R

0
.
R =
_
_
cos sin 0
sin cos 0
0 0 1
_
_
(4.8)
R
0
=
_
_
cos sin 0
sin cos 0
0 0 1
_
_
(4.9)
A =
_
_
0 0 1
1 0 0
0 1 0
_
_
(4.10)
By placing beads in a suitable conguration in the undeformed state their cor-
responding position in the deformed state can be retrieved and put into the poly-
nomial method, gure 4.3 and 4.4 shows the positions of the beads and the sample
positions where the strain is calculated, before and after deformation. It is not just
the bead positions that needs to be transformed but also the sample positions.
The difference between polynomial and exact solution is plotted in gure 4.5.
The solid lines (plus rings) shows the polynomial solution and the dashed lines
report 2005/7/31 20:15 page 22 #38
22 Chapter 4. Data and data acqusition
0.4
0.2
0
0.2
0.4
0 0.2 0.4 0.6 0.8
y
x
0.5
0
0.5
0
0.5
2
2.5
3
z
Figure 4.3: Synthetic bead positions before deformation. The lled dots in the
center of the structure are the sample positions.
0.2
0.4
0.6
0.8
1
1.2
0.6 0.8 1 1.2 1.4
y
x
0.5
1
1
1.5
2
2.5
z
Figure 4.4: Synthetic bead positions after deformation. The lled dots in the center
of the structure are the sample positions.
the exact solution. The bead array generated in this case had four beads in each
column, the triangle base length was 1.04 cm at the outer triangle and slightly
smaller at the most inner one. The two other sides where 0.96 cm.
To validate the strain calculations only two frames are needed, the undeformed
and the fully deformed. But by choosing start and end values for the constants
a d and increasing those a small amount for each frame a data set containing an
arbitrary number of frames can be obtained. This method has been implemented
in the Matlab scripts for generating data that can be displayed as an animation in
the visualization tool Tensview described in chapter 6.
report 2005/7/31 20:15 page 23 #39
4.2. Strain calculation 23
2 2.2 2.4 2.6 2.8 3
0.2
0.15
0.1
0.05
0
0.05
E
1
1
2 2.2 2.4 2.6 2.8 3
0.1
0.15
0.2
0.25
0.3
0.35
E
1
2
2 2.2 2.4 2.6 2.8 3
0.14
0.12
0.1
0.08
0.06
0.04
0.02
0
E
2
2
2 2.2 2.4 2.6 2.8 3
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
E
1
3
2 2.2 2.4 2.6 2.8 3
0.3
0.4
0.5
0.6
0.7
0.8
E
3
3
Radius of undeformed cylinder [cm]
2 2.2 2.4 2.6 2.8 3
0.12
0.14
0.16
0.18
0.2
0.22
E
2
3
Radius of undeformed cylinder [cm]
Figure 4.5: Difference between the exact solution and the polynomial method for
the synthetic case. Solid line (plus rings) shows the polynomial solution and the
dashed line the exact solution.
report 2005/7/31 20:15 page 24 #40
24 Chapter 4. Data and data acqusition
report 2005/7/31 20:15 page 25 #41
Chapter 5
Visualization
In this chapter the aspects of visualizing strain tensors and which tools that might
be used for doing it are presented. The rst section describes the use of homoge-
neous coordinates followed by a brief description of the visualization techniques
relating to tensors. Primarily second order 3D tensors are discussed. In the last
section the tools are presented with a brief background and their pros and cons for
the problem addressed in this thesis.
5.1 Homogeneous coordinates
Homogeneous coordinates are used extensively in computer graphics for coordi-
nate calculations. It integrates the sense of vectors and points into the same object
by extending the representation with one value. For vectors and points related to
3-dimensional space it becomes a 4-valued vector instead of just a 3-valued. The
transformation operations on these points and vectors are then performed with 4-
by-4 matrices. It could be generalized into N-dimensions using (N +1) vectors
and (N +1)-by-(N+1) matrices.
There is no way of telling the difference between the vector a and point P in 3-
dimensional space using only 3 values. For example the point P located at (x, y, z)
would in a frame dened by point P
0
and the basis (e
1
, e
2
, e
3
) be dened by
p =
_
_
x
y
z
_
_
P = P
0
+[ x y z ]
_
_
e
1
e
2
e
3
_
_
A vector with components (u, v, w) would have the same form
a =
_
_
u
v
w
_
_
a = [ u v w ]
_
_
e
1
e
2
e
3
_
_
R onnbrant, 2005. 25
report 2005/7/31 20:15 page 26 #42
26 Chapter 5. Visualization
Thus, to avoid confusion, an extension with a fourth value is made and the
point is instead represented with
p =
_

_
x
y
z
1
_

_
P =
_
x y z 1

_

_
e
1
e
2
e
3
P
0
_

_
and the vector
a =
_

_
u
v
w
0
_

_
a =
_
u v w 0

_

_
e
1
e
2
e
3
P
0
_

_
From this point it is easy to carry out operations on both points and vectors
using the homogeneous notation and simple matrix algebra. For example, a change
from frame (e
1
, e
2
, e
3
, P
0
) to ( f
1
, f
2
, f
3
, Q
0
) would be formulated as follows
f
1
= m
11
e
1
+m
12
e
2
+m
13
e
3
f
2
= m
21
e
1
+m
22
e
2
+m
23
e
3
f
3
= m
31
e
1
+m
32
e
2
+m
33
e
3
Q
0
= m
41
e
1
+m
42
e
2
+m
43
e
3
+P
0
where m

are the components of the new basis expressed in terms of the old one.
Using matrix notation this becomes
_

_
f
1
f
2
f
3
Q
0
_

_
= M
_

_
e
1
e
2
e
3
P
0
_

_
, M =
_

_
m
11
m
12
m
13
0
m
21
m
22
m
23
0
m
31
m
32
m
33
0
m
41
m
42
m
43
1
_

_
where M is referred to as the transformation matrix from

f to e since the com-
ponents of

f are known in e. Transforming any point or vector between the two
frames then becomes
a
e
= M
T
a
f
a
f
= (M
1
)
T
a
e
For doing various types of afne transformations, like translation, scaling, ro-
tation and shearing the use of the M matrix is straight forward. Shearing can be
constructed by combining the three basic types, translation, scaling and rotation,
but is usually regarded as a basic type as well because of its importance. The
different type of transformations can be combined using ordinary matrix algebra
forming one single matrix at the end which is then applied to all points and vectors
needing transformation. The matrices for each of the transformations are
report 2005/7/31 20:15 page 27 #43
5.1. Homogeneous coordinates 27
Translation T =
_

_
1 0 0 t
1
0 1 0 t
2
0 0 1 t
3
0 0 0 1
_

_
(5.1)
Scaling S =
_

_
s
1
0 0 0
0 s
2
0 0
0 0 s
3
0
0 0 0 1
_

_
(5.2)
Rotation R
z
() =
_

_
cos sin 0 0
sin cos 0 0
0 0 1 0
0 0 0 1
_

_
(5.3)
Shearing H
xy
() =
_

_
1 cot 0 0
0 1 0 0
0 0 1 0
0 0 0 1
_

_
(5.4)
Rotation has three degrees of freedom and the other matrices can be constructed
by simple row and colon operations changing the coordinate system. The shearing
can also be made in three different directions [1].
The interpretation of the different components are interesting when visualiz-
ing symmetric tensors. The two most interesting transformations are scaling and
shearing. As seen in (5.2) and (5.4) the scaling only uses the diagonal elements
while shearing only uses the off-diagonal elements. Thus, the symmetric second
order 3D tensor expanded into a 4-by-4 matrix can be interpreted as a scaling and
shearing transformation. As mentioned in 3.2.2 the antisymmetric part of a tensor
after decomposition will have 3 independent components, these components will
correspond to the rigid body rotation in each direction [1, 12, 23].
The following example in 2D displays the difference between antisymmetric
and symmetric shearing on a rectangle. The two transformation matrices
M
A
=
_
_
1 0.3 0
0 1 0
0 0 1
_
_
M
S
=
_
_
1 0.3 0
0.3 1 0
0 0 1
_
_
antisymmetric and symmetric respectively are operating on a rectangle ABCD de-
scribed by the four points (0,0), (0,1), (1,0) and (1,1) giving the transformed rect-
angles A

pictured in gure 5.1. Each point is transformed as


p

i
= M

p
i
, p
i
=
_
_
x
i
y
i
1
_
_
i A, B,C, D
report 2005/7/31 20:15 page 28 #44
28 Chapter 5. Visualization
Figure 5.1: Antisymmetric and symmetric shearing on a rectangle
In gure 5.2 six different shearings of a 3D object are displayed. The shearing
value is 0.5 and placed in the transformation matrix positions m
12
, m
13
, m
23
, m
21
,
m
31
, m
32
for the sub-gures (a) through (f). A simple way of keeping track of how
each component is affecting the object is to consider the matrix in equation (5.5)
constructed as the outer product
_
_
x
y
z
_
_
_
x y z

=
_
_
xy xz
yx yz
zx zy
_
_
(5.5)
where x, y and z are the axes in the coordinate system. xy indicates change in x
with increased y, while yx would be the other way around. The same goes for the
other components.
5.2 Techniques
The concept of tensors are used in many scientic and engineering applications,
some more complex than others. Though the challenge of visualizing the tensors
can be made in a rather intuitive way. There are a few methods with which to
visualize tensors such as pseudo-coloring, tensor glyphs, deformation and hyper-
streamlines which is a little more complex than the three others [23].
Pseudo-coloring is very simple, it codes the tensor components into colors
visualizing them in a grid collage. This is not very effective for the user who
must mentally integrate nine separate color elds in the case of a second order 3D
tensor [23]. For animation purposes or where the amount of data is large the color
report 2005/7/31 20:15 page 29 #45
5.2. Techniques 29
Figure 5.2: The result of six different antisymmetric shearings in 3D. Only one
shearing component with the value 0.5 is used for each sub-gure. (a) Matrix
component m
12
. (b) m
13
. (c) m
23
. (d) m
21
. (e) m
31
. (f) m
32
.
coding is even worse. In fact for small amounts of data it might be easier looking
at the values directly and in case of a larger data sets a separate 2D plot of each
component would be much easier to relate to since it catches the whole set of data
in one image forming a line shape which humans have far more easier to percept
and remember than color collages [17].
The use of tensor glyphs involves the mapping of the tensor components to
various features of the glyph, which might be altering its size, color and other
more distinct features of the glyph as well. In gure 5.3 three examples of glyphs
are showed. The simplest tensor glyph is perhaps the ellipsoid, it is a sphere scaled
by the eigenvalues in the direction of the corresponding eigenvectors. This only
works for symmetric tensors [23].
The hyper-streamline method uses the three eigenvectors to form lines in space
by integrating along the direction of for example the largest eigenvector and then
letting the other to eigenvector/eigenvalues manipulate glyphs along this line.
This could be implemented using ones favourite glyph (for example the ellip-
soid) and then having a user interface which lets the user drag the glyph along
the streamline.
The deformation method is an intuitive and also a very effective and simple
report 2005/7/31 20:15 page 30 #46
30 Chapter 5. Visualization
method to implement. It is used extensively in mechanics textbooks to illustrate
compressive forces [3]. This method also uses glyphs, which are the objects being
compressed and stretched, and might as a well be called a tensor glyph method.
This is the main method used in Tensview. By interpreting the nine components in
the tensor as part of a homogeneous transformation matrix (see 5.1) each of them
can be visualized when using the matrix to deform an object, for example a cube
which is a common object used for deformation.
Figure 5.3: Example of three glyphs that could be used showing different kinds
of tensor data. (a); A simple arrow that can be pointed into the direction associated
with the largest eigenvalue. (b); The tensor ellipsoid, it is scaled according to the
eigenvalues in the direction of the associated eigenvectors. (c); A combination of
a deformation cube and colored bars. The bars scale as well but also emphasizes
the diagonal components by changing their colors.
5.2.1 Other ideas
Since visualization of tensors is somewhat intuitive this section presents some ju-
dicious ideas that could be used. They where not implemented in any way into the
nal version of the program, but are presented here to give a perspective of what
could be done and also what tricks could be used to boost the perceptive cues em-
bedded into the visualization. As well as turning numbers into geons, shapes and
colors the problem of tensor visualization should also be considered a problem on
how the perception of these are interpreted.
Twisting bars. By turning the three cylinders showed in gure 5.3 (c)
into rectangular bars and twisting them along their axes according to the
current shear gives an extra cue about the shear value. Exaggerating the
twisting would probably be necessary, for example one revolution. This
report 2005/7/31 20:15 page 31 #47
5.3. Available tools 31
would probably give a better view of all nine components of the second
order 3D tensor. The diagonal values are still representing the scaling in
each major direction.
Adding illusionary effects like the famous M uller-Lyer illusion or using the
relative size illusion, see gure 5.6 (b). This could be achieved by using
for example a cone as an arrow at the end of the bars/cylinders that either
changes its shape between two static shapes, inward and outward, depending
on the sign of the tensor component, or smoothly morphs its shape from one
to the other, see gure 5.5.
Example of other simple perceptual cues that could be implemented with
fairly small means are symmetry, common region and connectedness [2,
17]. The effect of symmetry can be exemplied with these two 8 character
strings: [ ( ) ] ) and [ ) ) ] (. Examples of common region and
connectedness are equally simple to illustrate, gure 5.4 below.
u u u u u u

u u u u u u r r r r r r r r r
Common region Connectedness
Figure 5.4: Example showing common region and connectedness.
Figure 5.5: The cone smoothly morphs its shape from left to right and then back
again resulting in a at disc at the zero/reference value in the middle.
5.3 Available tools
In this section the available tools considered for use in the visualization task are
discussed and the reason for choosing the Coin library is motivated.
report 2005/7/31 20:15 page 32 #48
32 Chapter 5. Visualization
Figure 5.6: (a); A relative size illusion. The circle in the middle appears larger
to the right, even though the size is the same as the left one. (b); The classical
M uller-Lyon illusion, the vertical line is perceived to be longer to the right, though
it has the same length as the left one.
5.3.1 Ensight
Ensight is a interactive post-processing visualization tool for various types of data,
such as computational uid dynamics, electromagnetics and thermodynamics. It
is especially well suited for post-processing of large nite element and CFD sim-
ulations. It can also create animations from the data.
Although it is not solely developed for visualizing strain tensors it would not
be a problem using it for that purpose. Though, Ensight is quite advanced, and too
advanced for the task at hand. Also, the licensing is very expensive.
5.3.2 Matlab
Matlab is a very well known software by most engineers and scientists and which
use could be considered very common, both by universities and companies. There
is also a free software program, Octave [7], which can substitute Matlab in most
cases. Matlab (and Octave) is on the other hand primarily intended for numeri-
cal computations and not visualization, even though there are extra toolboxes for
Matlab which addresses the issue.
A quick overview of the abilities to visualize 3-dimensional data in Matlab
shows that there are some limitations in performance and a somewhat complicated
structure to quickly develop a tool that can handle rapidly altering data (25+ times
per second), which would be the case when showing the data described in chap-
ter 4. Further Matlabs Visualization toolbox is not a part of the basic set of
toolboxes which is a major limitation since this would cause the application to run
only on a limited set of Matlab installations, where they exist.
report 2005/7/31 20:15 page 33 #49
5.3. Available tools 33
5.3.3 OpenDX
OpenDX is a tool introduced in 1991 developed by IBM which has been released
as open source software since May 1999. It is a general purpose data exploring
tool aimed at visualizing both simple and complex data using a graphical user
interface (GUI) for programming the data manipulation and visualization features.
Besides supporting scientic data le formats it also has data importing features
which makes it fairly easy for any user to import his or her data into the program
[14].
A simple example of a network is pictured in gure 5.7 and a screen-shot of
the result is displayed in gure 5.8. The data used is the sheep data described
in chapter 4 and what is seen within the bright ring i gure 5.8 are the 12 beads
inserted into the left ventricular wall.
Although it is fairly simple, with a bit of previous practice, to rapidly visualize
ones data in OpenDX the 3D performance is not good enough for animated data
and the GUI is not easy to work with yet, it needs some improvements to integrate
better with current Linux distributions. Also, the amount of memory consumed
by OpenDX is on average 600 megabytes, and thus not really suitable for the
average computer dated 2004 or 2005.
Figure 5.7: A simple OpenDX network. The network starts at A with le selec-
tion, then continues to a data importer which extracts the data from the le. The
format of the data is specied in a text le used by the import-box. After that a
portion of the data is selected, the integer box species which frame should be
used, then a glyph is assigned to the data, in this case a sphere, and nally the
image is rendered at B.
report 2005/7/31 20:15 page 34 #50
34 Chapter 5. Visualization
Figure 5.8: A screen-shot from OpenDX showing the 12 bead points from the
sheep data in the brightened circle. This is the result from the network in gure
5.7 and it is possible to zoom, pan and rotate the scene.
5.3.4 Open Inventor/Coin 3D
Open Inventor (OI) is a C++ library software for 3D graphics rendering used for
creating 3D-programs and tools for visualization of scientic data but also for cre-
ating any type of 3D software. It was developed by Silicon Graphics (SGI) in the
early 1990s as an extension or clue to the well known OpenGL 3D rendering stan-
dard. The use of OpenGL was and is very low level and to ease the programmers
task OI was developed to be a simpler applications programmers interface [22].
Rather than building shapes from simple polygons as in OpenGL and which
is very tedious, OI uses simpler shapes as boxes, cones and so forth which are
put together into more advanced shapes when needed. The rendering world is
put into a so called scene graph which is controlled by OI making all occlusion
culling on objects in the graph automatic. There is also a number of controller
objects available and a system for applying these to the scene graph. This makes
the development of common interaction tasks much easier. OI also implements
a le format for storing worlds and the code for saving and loading the worlds
fromthese les. One downside with OI is that it is always slower than hand written
OpenGL code [22].
report 2005/7/31 20:15 page 35 #51
5.3. Available tools 35
In August 2000 OI was licensed as open source after being available only as
proprietary code from the company TGS which had 3rd-party licensed OI from
SGI. At that time the clone library Coin was released by the Norwegian company
Systems In Motion (SIM http://www.sim.no). Coin has been written entirely
from scratch in a clean room design fashion, sharing only the original API from
OI. Coin is available under the GNUGPL license for development of free software,
but also under a proprietary license for the right to develop proprietary commercial
software.
The scene graph
The scene graph in OI central part where all objects that shall be rendered are
stored. It is build in a tree fashion way starting with a top node, or the root node.
The root node then holds a subtree of nodes which contains more subtrees. When
the scene graph is rendered by the OI frame work the tree is traversed from top to
bottom and from left to right.
The type of nodes available are shape, transform, property, grouping and sep-
arator nodes. Shape nodes denes various kinds of shapes that shall be ren-
dered. Transform nodes denes a transformation, for example scaling or trans-
lation, which is applied to all nodes following the transform node, within the cur-
rent separator node. A property alters the rendering state for the following nodes,
making it possible to change for example the color and the draw style of shapes.
Grouping and separator nodes are used primarily for storing other nodes. The main
difference between them is that separator nodes protects its children from previous
applied transform and property nodes [19].
The world le format
The Inventor le format is a text based format which makes it easy to use and
simple to construct the scene graph using a text processor. A user can with little or
no experience of 3D programming and brief knowledge of the scene graph concept
together with a list of available OI nodes put together a world le which describes
a fairly advanced 3D scene. The le can be read and rendered by OI with a very
simple program which is presented with full source code in appendix B.
Below are two examples of simple scene graphs. The rst will display a cone,
a sphere and a cube lined up in a row and the second two rotating cylinders. In
appendix B.2 a more advanced example is presented.
5.3.5 Why Coin?
Coin being open source under the GNU GPL license, following the OI API and
thus supporting the Inventor le format for scene graph description, having all the
convenient classes implemented in OI for data handling, and also being under con-
stant development by SIM made it the best choice for implementing the software
report 2005/7/31 20:15 page 36 #52
36 Chapter 5. Visualization
for visualizing the tensors. Also, the implementation in object oriented C++ inte-
grates nicely with the concept of using nodes in a scene graph for representation of
the graphical environment, since the nodes and other objects often have properties
which can be seen as a derivative of a already implemented node or object.
#Inventor V2.1 ascii
Separator {
Cone {}
Transform { translation 2 0 0 }
Sphere {}
Transform { translation 2 0 0 }
Cube {}
}
Figure 5.9: Simple example illustrating the inventor le format. Displays three
simple shapes aligned in a row, a cone, a sphere, and a cube.
#Inventor V2.1 ascii
Separator {
Separator {
RotationXYZ { axis X angle 0 = ElapsedTime {} . timeOut }
Material { diffuseColor 1.0 0.5 0.2 }
Cylinder { radius 2 height 10 }
}
Transform { translation 0.5 0 0 }
Separator {
RotationXYZ { axis Z angle 0 = ElapsedTime {} . timeOut }
Material { diffuseColor 0.2 0.5 1.0 }
Cylinder { radius 2 height 12 }
}
}
Figure 5.10: Simple example illustrating the inventor le format. Will display two
cylinders where one is rotating around the X and the other around the Z axis.
report 2005/7/31 20:15 page 37 #53
Chapter 6
Tensview
This chapter describes the main parts and the use of Tensview, the software devel-
oped for the visualization task using the Coin software library. When references
are made to some C++ classes/objects more about those can be found in the HTML
documentation on the enclosed CD.
6.1 Tensview
Tensview is a simple program for visualizing matrix and scalar data in animated
form. Or, put in another way, it handles time series containing lists of matrices
and scalar values that can be connected to various 3D nodes that alters their shape,
color, transparency etc based on the data. It is written using C++ and complies
with the most common compilers on both Linux and Windows. As of now only
one data set of matrices can be loaded and which is visualized by two graphical
objects, which of one is a coordinate transformed version of the other. Also one
set of scalar data can be loaded, which is visualized as a 2D chart plot in the
rendering window. It is based on the 3D graphics rendering library Coin described
in 5.3.4. Coins application programmers interface is fully compatible with SGIs
Open Inventor library, which is the de facto standard 3D graphics API for complex
visualization applications.
For a more extensive overview of the Open Inventor library there are two very
good books covering the subject, The Inventor Mentor [19] and The Inventor Tool-
maker [20], both of which where found very useful during the development of
Tensview.
6.1.1 Work ow
In gure 6.1 an overview of the work ow from Matlab to Tensview is shown.
The Tensview box is perhaps the important one since the data source can be any
R onnbrant, 2005. 37
report 2005/7/31 20:15 page 38 #54
38 Chapter 6. Tensview
program. Furthermore, many details have been left out since they are more to
consider being specic solutions of the implementation itself. Though, the boxes
shown explains some of the more interesting events.
Load data Tensview begins by examining the input le, which is the main way
of specifying the input arguments. The input le tells which les to load
the data from. Loading data into Tensview can at the moment only be done
from two les, but the extending the loading part to more les is fairly easy.
The loaded data are stored into objects which can handle time series data
and which also utilizes some Coin engines for interpolating purposes so that
the data can be interpolated between two time frames. These objects derived
from the class myTimeSeries.
Create FSN data The

fsn coordinate system presented in section 2.2 is an inter-
esting coordinate system in which to analyze the strain tensors. For doing
so the tensors needs to be transformed from the

clr system, which they are
assumed to be in when read from the les, to the

fsn system.
This part is quite essential in the program but makes it less general. Having
this part become a general preprocessing would be more suitable.
Create scene graph When all data is loaded and preprocessed the scene graph
is generated. In this process two essential parts are present, the rst contains
a in-code dened scene which sets up cameras and lights, register callback
functions into the scene for user interaction and connects the loaded data to
the scene.
The shape of the scene nodes visualizing the data are not specied in the
code. Instead this is done in the Inventor ASCII format (see section 5.3.4)
which is loaded from a le.
Start data scheduler The scheduler is an object of class myTimeSeriesTicker
which controls all data containers of class myTimeSeries holding loaded
data. The scheduler keeps track of the time and controls which time frame
to view by updating all time series registered to it. The user controls the
scheduler via callbacks telling it how fast to run and when to pause etc.
Run main loop In the main loop Tensview is fully up and running and the user
can interact with the scene with the mouse and control Tensview via key-
board commands.
6.2 Implementation details
In this section the most important implementation details are covered. The visual-
ization where presented in section 5.2 and here only a short note is made on how
the deformation and coloring techniques where implemented.
report 2005/7/31 20:15 page 39 #55
6.2. Implementation details 39
Figure 6.1: Data ow diagram showing the main operations performed in Matlab
before entering Tensview and what then happens in Tensview.
report 2005/7/31 20:15 page 40 #56
40 Chapter 6. Tensview
6.2.1 Data les
The data les read by Tensview have no special format, they only need to contain
oats separated by a space character, which can be newline, tab or one o more
spaces. Any ordering of the data is specied by the time series object it is read
into. For example the myTimeSeriesMFMatrix class holds lists 4-by-4 matrices,
one list corresponding to each frame. The 4-by-4 matrix needs 16 oat values at
least, this is enough for lling one matrix in one frame.
By specifying the number of matrices contained in each frame (argument
matrixlength) together with the data le, Tensview will read and ll matrices
until the end of the data le is reach. When the number of specied matrices have
been lled in the current frame the next frame is lled and so forth. This means
that the number of frames is specied implicitly by the number of oats in the le
and the matrixlength argument.
For example, the typical data les for the sheep data have six or eleven matrices
(tensors) in each frame and the number of frames are 135. The number of oats in
these data les are therefore 1611135=23760 oats. The values lls the ma-
trix column-wise, so the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
of oats gives the matrix
_

_
1 5 9 13
2 6 10 14
3 7 11 15
4 8 12 16
_

_
If other time series classes are implemented they need a similar way of specifying
their internal structure of the data so that the user can arrange his or her data
accordingly when generating the data les. The series myTimeSeriesMFFloat
is trivial since a single oat does not have an internal structure.
6.2.2 Time series
The time series objects are data containers, as mentioned above, and where imple-
mented to make it easier to handle data related to animation. There are already a
number of classes in Coin for handling data of various types, for example matrices
and different kinds of vectors. These are referred to as elds and are divided into
single and multiple elds. Single elds store one basic type, and the multiple elds
store many. Thus, one multiple elds might had been useful if only one basic type
where needed for each frame, but that is not the case.
Instead there are several tensors which are stored as 4-by-4 matrices related
to each time frame, so there was a need for a container that could store lists of
multiple elds, and that is what the time series classes do. Also, they provides
some convenient functions for interpolating data between two consecutive time
frames and can be controlled by an object of class myTimeSeriesTicker, mostly
called the scheduler.
report 2005/7/31 20:15 page 41 #57
6.2. Implementation details 41
The scheduler is used as a single point of interaction for controlling any num-
ber of time series data objects. It can be considered the main controlling instance
of Tensview. Many user interacting callback functions are connected to the sched-
uler which provides features such as pause/play, forward and backward stepping
through the time series, and also for the reloading of data from disk and for time
controlling before doing screen-shots.
Currently only one scheduler is available. Having several would enable the
feature of displaying scenes with data from different time frames. But, this fea-
ture could as easily be accomplished by starting two instances of Tensview with
different data sets as input.
6.2.3 The Inventor le
As mention in the work ow section 6.1.1 the inventor le used by Tensviewspeci-
es the shape of the objects used for visualization. It accomplishes this is by using
a feature of the le format where nodes specied in the le can be named, and
thus be fetched very easy from within the program. By replacing the named node
in the le any type of scene graph subtree can be sent to Tensview, which could
dene a rather complex glyph. This is an important feature making it very simple
to replace the shapes, colors etc for the objects used for visualization. The subtrees
which must be specied are
TENSOROBJECT CLR The glyph displaying the tensors in the

clr system.
TENSOROBJECT CLR STATIC The glyph displaying the tensors in

clr, but
which does not animate since it is connected to the static data in the reference
time frame.
TENSOROBJECT FSN Same as above, but for the

fsn system.
TENSOROBJECT FSN STATIC Same as above, but for the

fsn system.
EXTRA OBJECTS SEPARATOR This subtree can contain any type of scene
graph subtree which a user wants to put into the scene. Nothing is con-
nected to any altering data elds but by using engines animation can be ac-
complished. Mostly this would be useful for putting objects into the scene
which does not change but relates to the data some how. Currently a small
object picturing a coordinate system with red-green-blue arrows relating to
c,

l and r is dened in this subtree.
The le used in Tensview is quite large and is not included in the report but is
available on the enclosed CD in the demodata-directory.
report 2005/7/31 20:15 page 42 #58
42 Chapter 6. Tensview
6.2.4 Glyphs
Since the glyphs are specied in the Inventor ASCII le it is important to under-
stand that they themselves are not magic in any way. A user could invent and
dene a more suitable glyph with some brief knowledge on how to write scene
graphs using the Inventor ASCII le.
6.2.5 Deformation and coloring
Having the glyphs as simple objects the task of deforming and coloring them
are easy. The aspects of deformation were presented in sections 5.1 and 5.2, 5.2
also mentions coloring. What happens in Tensview is that the tensors, actually
before they are loaded, are expanded to 4-by-4 matrices and than just interpreted
as homogeneous transformation matrices without any further change. For each
matrix in every frame a transformation using the matrix of a glyph is performed
making just as many copies of the glyph as there are matrices.
The coloring of nodes/shapes can briey be described as follows. When the
copying and transformation of the glyph is done the values in the transformation
matrix is present to all subparts of the glyph as well, this is an effect of the scene
graph tree structure, and by having special nodes which can alter the current color
setting used for rendering parts of the glyph can be colored according to the values
in the transformation matrix.
The class myModelMatrixColorConverter implementes this special coloring
node, which is a part of Tensview rather then Coin, but can still be specied in the
Inventor le format. Inserting this type of node before the nodes (glyph parts)
selected for coloring and also specifying which part of the transformation matrix
be used for altering the color the extra cue of coloring is put into the scene.
Examples of how the deformation and coloring looks like can either be seen
by running Tensview or viewing one the movies in the /media-directory on the
enclosed CD. In gure 6.3 are two screen-shots displayed, showing the reference
frame and a second frame for a certain set of data in which the deformation and col-
oring should be observable. The row of objects in the background are the tensors
transformed to the

fsn coordinate system and the parallel gray bars are symbolise
the laminar ber sheets, also pictured in gure 2.2.
6.3 Usage
In this section the usage part of Tensview is described. Which arguments it takes,
keyboard usage and the format of the input le.
6.3.1 Arguments and options
Tensview was developed for use with a console (text based user interface). There
are no menus that lets the user load or save data after the software has been started.
report 2005/7/31 20:15 page 43 #59
6.3. Usage 43
Instead the les containing the data to be visualized must be supplied as arguments
at startup. In Linux the software uses a couple of options that the user must specify
to let the program know which les to read and how the data in the tensor/matrix
data le is aligned, see table 6.1.
It is also possible to use an input le which species the options. The input
le is a plain text le which species the options and their corresponding argu-
ment separated by whitespace characters on separate lines, see section 6.3.5 for an
example.
Table 6.1: Command line options.
-h, --help Print usage information.
-l, --matrixlength Matrices per time frame.
-r, --referenceframe Reference frame.
--matrixfile Matrix data le.
--signalfile Simple scalar data le.
--objectfile Inventor scene objects le.
--inputfile Input le which species the options.
6.3.2 Mouse and keyboard usage
Since the programshould compile on both Unix and Microsoft Windows platforms
the use of menus have been removed since the usage of such involves platform
specic programming. Instead all interaction with the program is done with the
mouse and keyboard.
The SoQt/SoWin-library comes with an extensive set of useful windows wid-
get classes which can be used by the developer to quickly get a graphical window
running for any type of application. The class chosen for this program is one that
already denes two basic user interaction modes, camera interaction and scene
graph interaction. The camera interaction mode is completely untouched from its
default behavior. Instead all interaction that is specic for this program is done in
the scene graph interaction mode.
Changing fromone mode the other is done by pressing the escape key (ESC),
which is also the default behavior implemented by the library.
6.3.3 Camera interaction mode
In camera interaction mode only the camera is affected. The only available controls
are those built into the library and since they are not modied in any way they
might differ between different version of the library. Though it is not likely that
would be the case. The controls for camera interaction as they are dened in the
SoQt/SoWin 1.2.0 manual are presented in table 6.2.
report 2005/7/31 20:15 page 44 #60
44 Chapter 6. Tensview
Table 6.2: Camera interaction controls.
Left + move Rotate camera around focal point.
Middle + move Pan scene.
Scroll wheel Zoom/dolly, only works in XFree/Xorg.
Left + middle Zoom/dolly. Use Ctrl + Shift + left on a 2-button mouse.
Right Opens the pop-up menu.
Holding ALT Temporary switches to scene graph mode.
Home Resets camera orientation and focal point.
s Seek mode, clicking on a object moves the focal point to it.
q Quit application.
ESC Toggle to scene graph mode.
6.3.4 Scene graph interaction mode
The available keys are presented in table 6.3. A more detailed description of
what some of the commands do is presented in appendix A.1. The CTRL and
SHIFT words are referring to the function keys on the keyboard, it does not
matter which control or shift key is pressed. The NUMPAD means that it is the
corresponding key on the numeric pad on the keyboard that should be used.
6.3.5 The input le
The input le should, if used, be the only argument to the program. In Linux the
input le is specied by the option --inputfile or if a single argument is sent to
application that is interpreted as the name of an input le. In Windows the program
only takes one argument which must be the name of the input le. A convenient
way to supply the lename as argument in Windows is to drag-and-drop the input
le on the program executable, that is the .exe-le used for starting the program.
It is also be possible to drag-and-drop the input le on a shortcut-icon connected
to the executable.
The format of the input le is rather simple, it consists of key-value pairs where
the name of the key means something specic to the program. An example of an
input le is shown in gure 6.3.5. The keys recognised by the program are the
same as the names of the option ags presented in table 6.1.
report 2005/7/31 20:15 page 45 #61
6.3. Usage 45
Table 6.3: Scene graph interaction keyboard controls.
NUMPAD+ Increase time speed.
NUMPAD- Decrease time speed.
CTRL + NUMPAD+ Increase tick delay.
CTRL + NUMPAD- Decrease tick delay.
CTRL + l Reload all data from source.
CTRL + s Screen-shot of the current view.
CTRL + d Continuous screen-shots.
F1 Increase view FPS.
F2 Decrease view FPS.
F3 Increase data FPS.
F4 Decrease data FPS.
Space Toggle pause.
Home Jump to rst frame in sequence.
Backspace Change direction.
Left arrow Step backward, (pause mode).
Right arrow Step forward, (pause mode).
Down arrow Step backward faster, (pause mode).
Up arrow Step forward faster, (pause mode).
z Increase (zoom) chart for signal data.
x Decrease chart plot for signal data.
SHIFT + z Decrease chart plot width.
SHIFT + x Decrease chart plot height.
- Next tensor scene object.
SHIFT + - Previous tensor scene object.
c Disable CLR glyphs.
f Disable FSN glyphs.
e Disable extra shapes read from objects.vi.
v Disable chart plot.
SHIFT + v Enable chart plot.
ESC Toggle to camera interaction mode.
# Blank lines and lines beginning with # are ignored.
# Options are specified like "key[:space:]value" pairs,
# one option per line.
objectfile ../objects.iv
matrixfile data_tensor.txt
signalfile data_volume.txt
matrixlength 11
referenceframe 0
Figure 6.2: Example of an input le.
report 2005/7/31 20:15 page 46 #62
46 Chapter 6. Tensview
Figure 6.3: Screen-shots taken from the data set r15p06 tensor.dat. The bead
coordinate system

clr is visualized as the red-green-blue arrows in the scene.
(Top) This shows the neutral state, or reference frame. All bars are gray and the
deformation cube and the reference cube are aligned. (Bottom) Here the c and

l
axes have been compress, which is indicated by the bluish color and the shortening
compared to the reference state. The r axis has been stretch, indicated by the
reddish color and lengthening compared to the reference state.
report 2005/7/31 20:15 page 47 #63
Chapter 7
Future work
This chapter contains the list of improvements that could be made to the software
and also presents some other applications in which it could be used.
7.1 Software improvements
There are several improvements that can be made to the software to have it become
more general and perhaps more user friendly. Also, it lacks some of the visualiza-
tions ideas presented earlier in 5.2.1. These could be implemented in the current
frame work of the software code without too much effort.
In the follow list all the features that came up as good ideas during the de-
velopment, but where left out of the rst working version, are presented. This is
the current todo-list presented in the HTML documentation on the enclosed CD.
Of course if any further work is made in the software there might be even more
changes.
Make it possible to have an arbitrary number of input data les for both types
of data. That is, the arguments --matrixfile and --signalfile should
take a comma separated list of lenames and be possible to specify more
than one time using the command-line.
It should be possible to move the scene graphs objects (subgraphs) relative
to each other. Doing so with separate data sets might be necessary for the
user to see anything if the glyphs from different data sets occupies the same
spatial point.
Though, a more dynamic solution to this would be to implement a type of
bounding box generating function that nds the bounding box for each data
sets and separates them accordingly.
R onnbrant, 2005. 47
report 2005/7/31 20:15 page 48 #64
48 Chapter 7. Future work
Make it possible to toggle between the tensor glyphs when using matrices
and just showing the pure spatial position represented with a simple sphere,
(or perhaps some other glyph).
Fix scaling in class myTransformScaler for example by using symmetric
antisymmetric properties, or even remove the possibility completely.
Idea: Assume the matrices are non-rotated and only scale the diagonal ele-
ments in the most obvious and simple way. All other form of matrix scaling
should be performed before the data is loaded into Tensview.
Modify class myTimeSeriesTicker so that it also handles static series, or
series that are not affected at normal running, but still are being controlled
by the ticker for other purposes. The ticker is a better place for handling
all series since it handles everything in a list sense of way instead as named
objects.
Must have a way of sending the and values to the application so that
those can be set by a user, rather then being statically set in the source code.
Idea: It would work with a key-value-pair in the input le where the key is
alpha or beta followed by two oats, and for each occurrence a new value is
added to the alpha and beta conguration inputs.
Fixing so that some enabling/disabling of viewable objects can be made by
declaring the objects in the Inventor object le or not.
For example, this would be a simple solution to the fact that one might not
want the FSN-object visible. In the glyph-objects assignment phase there
will be a null pointer which clearly states that there will not be any object of
this kind.
Make the parsing more dynamic. For example reading a list of keys of what
should be parsed together with the number of arguments. The keys and
number of arguments should be dened in the MyOptions struct.
This todo-item is solely for making expansion of the option handling more
easy and does not affect the workings of the program.
7.2 Other applications
The source code for Tensview changed a couple of times during the development
becoming more generalized. Also, the idea of making the source code more gen-
eral was appealing since it then could be used even if the data that where the pri-
mary target for this thesis would change. Even though the use of three dimensional
second order strain tensors are general in itself and not solely targeted for use in
myocardial strain calculations, some implementations used from the start where
report 2005/7/31 20:15 page 49 #65
7.2. Other applications 49
aimed at only dealing with the amount of tensors generated by the myocardial data
at hand, which is in the range 3-6.
But at the end of writing this thesis Tensview seemed to be able to be used in
another area, namely the visualization of blood velocity vectors with associated
certainty scalars. This has not been tested but the current implementation should
be able to visualize this data if it can be arranged in a way that has some meaning in
a 4-by-4 homogeneous transformation matrix. A solution would be to use the vec-
tors for creating transformation matrices which aligns the glyphs, then using the
certainty values for scaling the diagonal values and using the coloring mechanism
to put extra cues into the scene.
report 2005/7/31 20:15 page 50 #66
50 Chapter 7. Future work
report 2005/7/31 20:15 page 51 #67
Appendix A
Tensview
A.1 Details about key commands
This sections gives a more detailed description of each of the keyboard commands
to the extent that a normal user should not need any other documentation running
the program.
NUMPAD+ Increases time speed, which will make the animation run faster rela-
tive real time. This affects the step length taken within all time series. For
example data might have been sampled at 100fps, running in real time at a
view fps rate of 25fps would only use each fourth sample in that data.
NUMPAD- Decreases time speed, 100fps data at 25fps view speed but with the
time speed reduced to 0.1 real time would need 250 frames for each second
and thus interpolates the data to accomplish this.
CTRL + NUMPAD+ Increases tick speed. The tick speed is used for slowing
down the update speed of the screen without affecting the value of view fps,
which is also controllable. The reason for this is that one might want to
warp the time and view each screen update for a couple of seconds. Just
decreasing view fps does not give this effect since it would increase the step
size at the same time so that the application runs at the selected time speed.
CTRL + NUMPAD- Decreases tick speed, which is what one should start with
when trying the warp the time. Increasing tick speed from the default value
1.0 only makes the application loop run faster without any benecial effects
on the screen.
CTRL + l Reloads data fromthe les specied as input les. This might be useful
since there is no way of open new les when the application has started.
For example, by using a FIFO-le or just overwrite the data les with new
R onnbrant, 2005. 51
report 2005/7/31 20:15 page 52 #68
52 Appendix A. Tensview
data froman external source it is possible to viewnewdata without restarting
the program.
CTRL + s Takes a single screen-shot. It is not possible to name the les shot
to, instead the application keeps track of how many screen-shots have been
taken since the application started and names the les accordingly, screen-
shotXXX.tiff where XXX is a number starting from 001 and increases for
each screen-shot taken.
CTRL + d Starts a continuous dumping of each new frame to a le, beginning
from the current frame. Dumping stops when the beginning of the sequence
is reached, that is frame 0.0f. The application will run much slower during
dumping but it is possible to interact and to rotate and zoom the scene to
make a more exciting movie, (because there is no point in dumping each
frame unless one is going to make a move of all the image les).
F1 Increase view fps. The default view speed or screen update speed is 25 fps
which is enough for most people to consider movements to be smooth. On
a very slow computer it might be that 25 fps is to fast for it to handle and a
lower fps must be set. Increasing it to more then 30 fps should not give any
benets unless there are special needs for creating a movie.
F2 Decreases the view fps.
F3 Increases data fps. All data have some kind of sample speed since it should
contain at least one spatial component for it to be useful in this application.
(There might be other ways of interpreting data but usually time is a cru-
cial component). By setting the data fps a correct animation speed will be
achieved which is probably what is preferred.
F4 Decreases the data fps.
Space Toggles pause on or off.
Home Jumps to the beginning of the animation sequence, frame 0.0f.
Backspace Switches direction of the animation.
Left arrow Steps backward in the sequence. When doing screen-shots or just
viewthe data stepping back and forth is a necessity. Only available in paused
mode.
Right arrow Steps forward in the sequence. Only available in paused mode.
Down arrow Steps backward a little faster. Only available in paused mode.
Up arrow Steps forward a little faster. Only available in paused mode.
report 2005/7/31 20:15 page 53 #69
A.2. Source code 53
z Zooms in on the chart plot if any. The chart has a default size that is rather
small and if there are detailed parts in it those might be easier to see when
enlarged.
x Zooms out on the chart plot if any.
SHIFT + z Decreases the height of the chart plot.
SHIFT + x Decreases the width of the chart plot.
- Steps forward in a list of different scene graph objects used for visualizing the
matrix data. These objects are dened in the objects.iv le and can
changed quite easily by the user. Different types of scene graph objects
are suitable for different kinds of data.
SHIFT + - Steps backward in the scene graph node-list.
c Disables the glyphs used for displaying the CLR-system. This could be used if
there are so many glyphs being displayed that the whole scene is sluggish
and only the FSN glyphs are interesting.
f Disables the glyphs for the FSN-system, if the CLR glyphs are the interesting
ones.
e Disable shapes read from objects.vi. The extra nodes read from the objects.iv-
le could be any type of nodes and it could be useful to turn these off.
v Disables the chart plot. This does not affect performance but is useful when
doing for example screen-shots or when the data plotted is of no interest.
SHIFT + v Turns the chart plot back on.
ESC Switch to camera interaction mode.
A.2 Source code
The source code for Tensview have been left out of the report and is only included
on the enclosed CD. The full source code would have added approximately 70-
80 extra pages of dull reading. If the CD is unavailable the source should also
be available at http://www.lysator.liu.se/andro/exjobb, or it could be
obtained by contacting IMT (address is found on the third page) or the author on
e-mail address andro@lysator.liu.se.
report 2005/7/31 20:15 page 54 #70
54 Appendix A. Tensview
report --- 2005/7/31 --- 20:15 --- page 55 --- #71
Appendix B
IV-le viewer and example
B.1 IV-le viewer source code
This is the complete source for a simple Inventor le viewer. It assumes the argu-
ments are Inventor les and reads them one by one constructing the scene graph
and nally displays them using the convenient ExaminerViewer.
1 #include <iostream>
2 #include <Inventor/Qt/SoQt.h>
3 #include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
4 #include <Inventor/SoInput.h>
5 #include <Inventor/nodes/SoNodes.h>
6
7 using namespace std;
8
9 int
10 main( int argc, char** argv )
11 {
12 SoDB::init();
13 QWidget * Mainwindow = SoQt::init(argc, argv, argv[0]);
14
15 if ( argc < 2 ) {
16 cout << "Need input files!" << endl;
17 cout << "Usage: " << argv[0] << " <iv-file(s)>" << endl;
18 exit(1);
19 }
20
21 SoInput in;
22 for ( int i=1; i<argc; ++i ) {
23 if ( in.pushFile(argv[i]) )
24 cout << argv[i] << "...is ok" << endl;
25 else
R onnbrant, 2005. 55
report --- 2005/7/31 --- 20:15 --- page 56 --- #72
56 Appendix B. IV-le viewer and example
26 cout << argv[i] << "...read failed, skipping!" << endl;
27 }
28
29 SoSeparator * root = SoDB::readAll(&in);
30
31 if ( root )
32 root->ref();
33 else {
34 cout << "Root separator is NULL! Something is wrong." << endl;
35 exit(1);
36 }
37
38 SoQtExaminerViewer * eviewer = new SoQtExaminerViewer(Mainwindow);
39 eviewer->setSeekTime(0.6f);
40 eviewer->setAntialiasing(true, 1);
41 eviewer->setBackgroundColor(SbColor(1,1,1));
42 eviewer->setSceneGraph(root);
43 eviewer->show();
44
45 SoQt::show(Mainwindow);
46 SoQt::mainLoop();
47
48 if ( eviewer ) delete eviewer;
49 if ( root ) root->unref();
50
51 return 0;
52 }
B.2 IV-le advanced example
This is a more advanced example then the ones presented on page 36. The trans-
form nodes in this scene are connected in a way that make them animate the shape
nodes, which looks like a wobbling water molecule (or Micke Mouse head). This
le is also available on the CD in the ivviewqt directory.
1 #Inventor V2.1 ascii
2 Separator {
3 Complexity { value 1.0 }
4 Material {
5 ambientColor .8 .5 .4 specularColor .90 .90 .90 shininess 0.4
6 diffuseColor = Calculator {
7 a = ElapsedTime{}.timeOut
8 expression "oA=vec3f(.8,.3,0.4+0.4*sin(a))" }.oA
9 }
10 Separator {
11 Transform {
report 2005/7/31 20:15 page 57 #73
B.2. IV-le advanced example 57
12 scaleFactor = DEF MAINCALC Calculator {
13 a = ElapsedTime{}.timeOut
14 expression "oA=vec3f(
15 1.0+0.1*exp(sin(a/.50))*sin(1.0*a),
16 1.0+0.1*exp(sin(a/2.0))*cos(2.0*a),
17 1.0+0.1*exp(cos(a/.75))*sin(2.0*a))" }.oA
18 }
19 RotationXYZ { axis Y angle 0 = ElapsedTime {} . timeOut }
20 Sphere {}
21 }
22 Separator {
23 Material { ambientColor 1.0 1.0 1.0 }
24 Transform {
25 translation .8 .5 0
26 scaleFactor = Calculator {
27 a = ElapsedTime{}.timeOut
28 expression "oA=vec3f(
29 0.5+0.04*exp(sin(a/.320))*sin(4.00*a),
30 0.5+0.04*exp(sin(a/.420))*cos(3.30*a),
31 0.5+0.04*exp(cos(a/.120))*sin(2.50*a))" }.oA
32 }
33 RotationXYZ { axis Z angle 0 = ElapsedTime {} . timeOut }
34 Sphere {}
35 }
36 Separator {
37 Material { ambientColor 1.0 1.0 1.0 }
38 Transform {
39 translation -.8 .5 0
40 scaleFactor = Calculator {
41 a = ElapsedTime{}.timeOut
42 expression "oA=vec3f(
43 0.5+0.04*exp(sin(a/.120))*sin(2.00*a),
44 0.5+0.04*exp(sin(a/.420))*cos(2.20*a),
45 0.5+0.04*exp(cos(a/.420))*sin(2.40*a))" }.oA
46 }
47 Sphere {}
48 }
49 }
report 2005/7/31 20:15 page 58 #74
58 Appendix B. IV-le viewer and example
report 2005/7/31 20:15 page 59 #75
Appendix C
Compact disc
Below is the complete directory listing of the contents on the enclosed CD. After
that follows a description of the content in the most vital ones. In the base directory
lies a HTML-le that links to the HTML-documentation, the report-les and the
media les for easy access with a browser.
/extras-linux
/extras-win32
/ivviewqt
/media
/media/opendx_movies
/media/tensview_movies
/media/tensview_screenshots
/report
/tensview
/tensview/build
/tensview/build/autoconf_build
/tensview/build/build_linux
/tensview/build/build_win32
/tensview/build/doc
/tensview/build/doc/html
/tensview/build/doc/man
/tensview/build/doc/man/man3
/tensview/build/src
/tensview/demodata
/tensview/demodata/sh15br02
/tensview/demodata/syntetic-cylinder
/tensview/tensview-fc3-1.0.1
/tensview/tensview-sid-amd64-1.0.1
/tensview/tensview-win32-1.0.1
R onnbrant, 2005. 59
report 2005/7/31 20:15 page 60 #76
60 Appendix C. Compact disc
/extras-linux Prerequisites for Linux, source for Coin and SoQt libraries.
/extras-windows Prerequisites for Windows, installtion les for Coin and
the Tiff-image library.
/media Various media les, movies and images showing the looks and workings
of Tensview. There are also three movies created with OpenDX.
/ivviewqt Contains the source for the ivviewqt application and some inventor
example les to test it with.
/tensview/build Contains source and documentation for Tensview and all
other les needed for building Tensview in both Linux and Windows.
/report The full report in various formats. A PDF version for viewing and
some Postscripts ready for easy printing in both simplex and duplex page
mode.
/tensview/demodata Data for testing Tensview. The real data from sheep
and the synthetic data are available.
/tensview/tensview-... Pre-compiled Tenview binaries for Fedora Core
3, Debian Sid pure-64 and Windows. All binaries are dynamically linked
and needs some required libraries to be installed. The best and most easy
way is to compile Tensview before using it, at least on Linux.
report 2005/7/31 20:15 page 61 #77
Bibliography
[1] Edward Angel. Interactive Computer Graphics: A Top-Down Approach us-
ing OpenGL (3th Edition). Addison-Wesley Longman Publishing Co., Inc.,
Boston, MA, USA, 2002. ISBN 0-2017-7343-0.
[2] Douglas A. Bernstein, Louis A. Penner, Alison Clarke-Stewart, and Ed-
ward J. Roy. Psychology. Houghton-Mifin, Boston, New York, 6 edition,
2003.
[3] Ed Boring and Alex Pang. Interactive deformations from tensor elds. In
VIS 98: Proceedings of the conference on Visualization 98, pages 297
304, Los Alamitos, CA, USA, 1998. IEEE Computer Society Press. ISBN
1-5811-3106-2.
[4] Allen Cheng, Frank Langer, Filiberto Rodriguez, John C. Criscione,
George T. Daughters, D. Craig Miller, and Neil B. Jr. Ingels. Transmural
cardiac strains in the lateral wall of the ovine left ventricle. AJP - Heart and
Circulatory Physiology, 288:15461556, 2005.
[5] Kevin D. Costa, Yasuo Takayama, Andrew D. McCulloch, and James W.
Covell. Laminar ber architecture and three-dimensional systolic mechanics
in canine ventricular myocardium. AJP - Heart and Circulatory Physiology,
276(2):595607, February 1999.
[6] Jan Dhooge, Fadi Jamal, Bart Bijnens, Jan Thoen, Frans Van de Werf,
George R. Sutherland, and Suetens Paul. Two-dimensional ultrasonic strain
rate measurement of the human heart in vivo. In Functional Imaging and
Modeling of the Heart: First International Workshop - FIMH, pages 4752,
Helsinki, Finland, November 15-16 2001.
[7] GNU Octave - a high-level language for numerical computations. Internet,
May 2005.
URL http://www.octave.org/. 2005-05-27.
[8] Katherine B. Harrington, Filiberto Rodriguez, Allen Cheng, Frank Langer,
Hiroshi Ashikaga, George T. Daughters, John C. Criscione, Neil B. Jr. Ingels,
R onnbrant, 2005. 61
report 2005/7/31 20:15 page 62 #78
62 Bibliography
and Craig Miller. Direct measurement of transmural laminar architecture on
the anterolateral wall of the ovine left ventricle: new implications for wall
thickening mechanics. AJP - Heart and Circulatory Physiology, 288:1324
1330, 2004.
[9] Katarina Kindberg. Regional kinematics if the heart: Investigation with
marker tracking and with phase contrast magnetic resonance imaging. Mas-
ters thesis, Link opings universitet, December 2003. LiTH-IMT/BMS20-
EX03/354SE.
[10] Katarina Kindberg, Matts Karlsson, N.B. Jr. Ingels, and J.C. Criscione. Non-
homogeneous strain from sparse marker arrays for analysis of transmural
myocardial mechanics. Submitted, 2005.
[11] I. J. LeGrice, B. H. Smaill, L. Z. Chai, S. G. Edgar, J. B. Gavin, and P. J.
Hunter. Laminar structure of the heart: ventricular myocyte arrangement
and connective tissue architecture in the dog. AJP - Heart and Circulatory
Physiology, 269(2):571582, 1995.
[12] Mathworld. Internet, June 2005.
URL http://mathworld.wolfram.com. 2005-06-05.
[13] A. D. McCulloch. Cardiac biomechanics. In J. D. Bronzino, editor, The
Biomedical Engineering Handbook, pages 418439. CRC Press, Boca Raton,
1995. ISBN 0-8493-8346-3.
[14] Open Visualization Data Explorer. Internet, May 2005.
URL http://www.opendx.org/,http://www.research.ibm.com/dx/.
2005-05-27.
[15] Pernilla Selskog. Kinematics of the Heart: Strain and Strain-rate using Time-
resolved Three-dimensional Phase Contrast MRI. PhD thesis, Link opings
universitet, 2004.
[16] A. J. M. Spencer. Continuum mechanics. Longman Inc., New York, 1980.
ISBN 0-5824-4282-6.
[17] Robert J. Sternberg. Cognitive Psychology. Harcourt Collage Publishers,
Orlando, FL, 2 edition, 1999.
[18] Gerald J. Tortora and Sandra Reynolds Grabowski. Principles of Anatomy
and Physiology. John Wiley and Sons, Inc., New York, 9th edition, 2000.
[19] Joise Wernecke. The Inventor Mentor: Programming Object-Oriented 3d
Graphics with Open Inventor, Release 2. Addison-Wesley Longman Pub-
lishing Co., Inc., Boston, MA, USA, 1993. ISBN 0-2016-2495-8.
report 2005/7/31 20:15 page 63 #79
Bibliography 63
[20] Josie Wernecke. The Inventor Toolmaker: Extending Open Inventor, Release
2. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1994.
ISBN 0-2016-2493-1.
[21] Wikipedia - Heart. Internet, Apr 2005.
URL http://en.wikipedia.org/wiki/Heart. 2005-04-20.
[22] Wikipedia - Open Inventor. Internet, June 2005.
URL http://en.wikipedia.org/wiki/Open_Inventor. 2005-06-05.
[23] Xiaoqiang Zheng and Alex Pang. Volume deformation for tensor visualiza-
tion. In VIS 02: Proceedings of the conference on Visualization 02, Wash-
ington, DC, USA, 2002. IEEE Computer Society. ISBN 0-7803-7498-3.
report 2005/7/31 20:15 page 64 #80
64 Bibliography
report 2005/7/31 20:15 page 65 #81
Copyright
Svenska
Detta dokument h alls tillg angligt p a Internet - eller dess framtida ers attare - under
en l angre tid fr an publiceringsdatum under f oruts attning att inga extra-ordin ara
omst andigheter uppst ar. Tillg ang till dokumentet inneb ar tillst and f or var och en
att l asa, ladda ner, skriva ut enstaka kopior f or enskilt bruk och att anv anda det
of or andrat f or ickekommersiell forskning och f or undervisning.

Overf oring av
upphovsr atten vid en senare tidpunkt kan inte upph ava detta tillst and. All annan
anv andning av dokumentet kr aver upphovsmannens medgivande. F or att garan-
tera aktheten, s akerheten och tillg angligheten nns det l osningar av teknisk och
administrativ art. Upphovsmannens ideella r att innefattar r att att bli n amnd som
upphovsman i den omfattning som god sed kr aver vid anv andning av dokumen-
tet p a ovan beskrivna s att samt skydd mot att dokumentet andras eller presenteras
i s adan form eller i s adant sammanhang som ar kr ankande f or upphovsmannens
litter ara eller konstn arliga anseende eller egenart.
F or ytterligare information om Link oping University Electronic Press se f or-
lagets hemsida: http://www.ep.liu.se/
English
The publishers will keep this document online on the Internet - or its possible
replacement - for a considerable time from the date of publication barring excep-
tional circumstances. The online availability of the document implies a permanent
permission for anyone to read, to download, to print out single copies for your own
use and to use it unchanged for any non-commercial research and educational pur-
pose. Subsequent transfers of copyright cannot revoke this permission. All other
uses of the document are conditional on the consent of the copyright owner. The
publisher has taken technical and administrative measures to assure authenticity,
security and accessibility. According to intellectual property law the author has
the right to be mentioned when his/her work is accessed as described above and to
be protected against infringement.
For additional information about the Link oping University Electronic Press
and its procedures for publication and for assurance of document integrity, please
refer to its WWW home page: http://www.ep.liu.se/
c _Anders R onnbrant
Link oping, 31st July 2005

You might also like