Sie sind auf Seite 1von 183

Investigation of

Nanoparticles in Zebrafish
using Particle Tracking
Velocimetry.
Shako Farhad
Master’s Thesis, Spring 2018
This master’s thesis is submitted under the master’s programme Computational
Science and Engineering, with programme option Computational Science, at the
Department of Mathematics, University of Oslo. The scope of the thesis is 60
credits.

The front page depicts a section of the root system of the exceptional Lie group E8 ,
projected into the plane. Lie groups were invented by the Norwegian mathematician
Sophus Lie (1842–1899) to express symmetries in differential equations and today
they play a central role in various parts of mathematics.
Abstract

Cancer is a major public health problem worldwide where it is the second leading
cause of death. To improve safety and efficacy of anti-cancer drugs with less
side effects, nanoparticles (NPs) have been studied heavily. The concept of
selectively detecting and destroying cancer cells with NPs is very exciting, but
from the past 10 years only 0.7% (median) of the administered NP dose is
found to be delivered to a solid tumour. To best be able to study the flow and
distribution of fluorescent NPs in vivo, the zebrafish model has become very
popular as it is optically transparent for easy imaging.
Particle Image Velocimetry (PIV) is a non-intrusive optical measurement
method, which gives velocity fields resolved in both time and space. Using PIV
as the backbone a Particle Tracking Velocimetry (PTV) code was developed
to track NPs varying in scale from 100 nm to 1200 nm. The mean and STD
percentage of nanoparticle trajectories that are likely to end up in the vein
margin within the next frame decreases with nanoparticle size (800 nm, 400
nm, 200 nm). Distribution of nanoparticle trajectories throughout the vein in
relation to different nanoparticle sizes needs more data to determine anything
conclusively.
ACKNOWLEDGEMENTS
I want to thank Kent Andre Mardal, my supervisor, more than anyone for
guiding me, giving me ways to improve the tracking accuracy and ways to in-
vestigate the particle trajectories further. Most of all I want to thank Kent
Andre for being patient with me and being understanding. Kent Andre also in-
troduced me to Federico Fenaroli which I am very thankful for. Federico helped
me immensely to gather the data and explain more about nanoparticle research.

Thanks to Jostein Kolaas and his HydroLabPIV code which has been pivotal
and is the backbone of my PTV code. It is the most important piece of code in
my thesis. Also thanks to Daniel Blair and Eric Dufresne their combinatorical
MATLAB tracking code (track.m), I could swiftly get results and compare my
Particle Tracking Velocimetry (PTV) implementation with it during develop-
ment. Also their particle finder (pkfnd.m) and bandpass filter (bpass.m) gave
me lots of inspiration and a starting point for my own particle finder and filters.

Thanks to everyone else that helped me in any way. I appreciate everything


and I am filled with gratitude.

1
List of Figures

2.1 Image of Zebrafish veins with nanoparticles . . . . . . . . . . . . 14


2.2 Source image without filters . . . . . . . . . . . . . . . . . . . . . 19
2.3 Image with ’Aggressive’ filter . . . . . . . . . . . . . . . . . . . . 19
2.4 5x5 Gaussian filter . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.5 Image with 19x19 Gaussian filter . . . . . . . . . . . . . . . . . . 21
2.6 Image with 19x19 Box filter . . . . . . . . . . . . . . . . . . . . . 21
2.7 Source image without filters . . . . . . . . . . . . . . . . . . . . . 22
2.8 Image with 19x19 ’Aggressive’ filter . . . . . . . . . . . . . . . . 22
2.9 Added image intensities and mask . . . . . . . . . . . . . . . . . 24
2.10 Inverted mask for PIV . . . . . . . . . . . . . . . . . . . . . . . . 24
2.11 Outer mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.12 Inner mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.13 Distance to vein margin using mask . . . . . . . . . . . . . . . . 26
2.14 PIV grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.15 PIV search range . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.16 PIV subwindows . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.17 Cross correlation of 32x32 subwindows . . . . . . . . . . . . . . . 33
2.18 Cross correlation of 64x64 subwindows . . . . . . . . . . . . . . . 34
2.19 Comparison of subpixel algorithms . . . . . . . . . . . . . . . . . 35
2.20 Connecting disconnected trajectories . . . . . . . . . . . . . . . . 39
2.21 PTV dialog box 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.22 The left image is the original image, and the image to the right
is the image with the selected filter applied to it. . . . . . . . . . 41
2.23 The left image is the original image, and the image to the right
is the image with the selected filter applied to it and particles
drawn at the particle positions that were found due to the given
threshold from the threshold slider. . . . . . . . . . . . . . . . . . 41
2.24 PTV dialog box 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.25 PTV dialog box 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.26 PTV replace outlier with mask . . . . . . . . . . . . . . . . . . . 44
2.27 Example of PIV signal to noise ratio plot . . . . . . . . . . . . . 45
2.28 Example of PTV trajectory plot with source image background . 46
2.29 Example of PTV trajectory plot with distance to vein margin as
background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

2
2.30 Example of PTV trajectory plot with magnitude of velocity field
as background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.31 Extract data; dialog box 1 . . . . . . . . . . . . . . . . . . . . . . 50
2.32 Extract data; fitted power law . . . . . . . . . . . . . . . . . . . . 51
2.33 Extract data; selected endpoints . . . . . . . . . . . . . . . . . . 52
2.34 Extract data; number of particles per frame . . . . . . . . . . . . 53
2.35 Extract data; quiver plot with all particle trajectories . . . . . . 54
2.36 Extract data; with limited particle trajectories . . . . . . . . . . 55
2.37 Source image with regions of no nanoparticle flow activity. . . . . 59
2.38 Cropped source image in figure 2.37 with ’cropImagesInFolder.m’
script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.39 Cropping images . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

3.1 Results; first image from image set 1 (800 nm) . . . . . . . . . . 61


3.2 Results; added image intensities and mask for image set 1 (800
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.3 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 1 (800 nm) . . . . . . . . . . . . . . . . . . . . . 64
3.4 Results; particle trajectories plotted on the magnitude velocity
field for image set 1 (800 nm) . . . . . . . . . . . . . . . . . . . . 65
3.5 Results; fitted power law for image set 1 (800 nm) . . . . . . . . 66
3.6 Results; first image from image set 2 (800 nm) . . . . . . . . . . 66
3.7 Results; PIV signal to noise ratio for image set 2 (800 nm) . . . . 67
3.8 Results; added image intensities and mask for image set 2 (800
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.9 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 2 (800 nm) . . . . . . . . . . . . . . . . . . . . . 69
3.10 Results; particle trajectories plotted on the magnitude velocity
field for image set 2 (800 nm) . . . . . . . . . . . . . . . . . . . . 70
3.11 Results; fitted power law for image set 2 (800 nm) . . . . . . . . 71
3.12 Results; reference line for image set 2 (800 nm) . . . . . . . . . . 72
3.13 Results; number of particles per frame for image set 2 (800 nm) . 73
3.14 Results; first image from image set 3 (800 nm) . . . . . . . . . . 73
3.15 Results; PIV signal to noise ratio for image set 3 (800 nm) . . . . 74
3.16 Results; added image intensities and mask for image set 3 (800
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.17 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 3 (800 nm) . . . . . . . . . . . . . . . . . . . . . 76
3.18 Results; particle trajectories plotted on the magnitude velocity
field for image set 3 (800 nm) . . . . . . . . . . . . . . . . . . . . 77
3.19 Results; fitted power law for image set 3 (800 nm) . . . . . . . . 78
3.20 Results; reference line for image set 3 (800 nm) . . . . . . . . . . 79
3.21 Results; number of particles per frame for image set 3 (800 nm) . 80
3.22 Results; first image from image set 4 (800 nm) . . . . . . . . . . 80
3.23 Results; PIV signal to noise ratio for image set 4 (800 nm) . . . . 81

3
3.24 Results; added image intensities and mask for image set 4 (800
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.25 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 4 (800 nm) . . . . . . . . . . . . . . . . . . . . . 83
3.26 Results; particle trajectories plotted on the magnitude velocity
field for image set 4 (800 nm) . . . . . . . . . . . . . . . . . . . . 84
3.27 Results; fitted power law for image set 4 (800 nm) . . . . . . . . 85
3.28 Results; reference line for image set 4 (800 nm) . . . . . . . . . . 86
3.29 Results; number of particles per frame for image set 4 (800 nm) . 87
3.30 Results; first image from image set 1 (400 nm) . . . . . . . . . . 88
3.31 Results; PIV signal to noise ratio for image set 1 (400 nm) . . . . 88
3.32 Results; added image intensities and mask for image set 1 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.33 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 1 (400 nm) . . . . . . . . . . . . . . . . . . . . . 91
3.34 Results; particle trajectories plotted on the magnitude velocity
field for image set 1 (400 nm) . . . . . . . . . . . . . . . . . . . . 92
3.35 Results; fitted power law for image set 1 (400 nm) . . . . . . . . 93
3.36 Results; reference line for image set 1 (400 nm) . . . . . . . . . . 94
3.37 Results; number of particles per frame for image set 1 (400 nm) . 95
3.38 Results; first image from image set 2 (400 nm) . . . . . . . . . . 95
3.39 Results; PIV signal to noise ratio for image set 2 (400 nm) . . . . 96
3.40 Results; added image intensities and mask for image set 2 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
3.41 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 2 (400 nm) . . . . . . . . . . . . . . . . . . . . . 99
3.42 Results; particle trajectories plotted on the magnitude velocity
field for image set 2 (400 nm) . . . . . . . . . . . . . . . . . . . . 100
3.43 Results; fitted power law for image set 2 (400 nm) . . . . . . . . 101
3.44 Results; reference line for image set 2 (400 nm) . . . . . . . . . . 102
3.45 Results; number of particles per frame for image set 2 (400 nm) . 103
3.46 Results; first image from image set 3 (400 nm) . . . . . . . . . . 103
3.47 Results; PIV signal to noise ratio for image set 3 (400 nm) . . . . 104
3.48 Results; added image intensities and mask for image set 3 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.49 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 3 (400 nm) . . . . . . . . . . . . . . . . . . . . . 106
3.50 Results; particle trajectories plotted on the magnitude velocity
field for image set 3 (400 nm) . . . . . . . . . . . . . . . . . . . . 107
3.51 Results; fitted power law for image set 3 (400 nm) . . . . . . . . 108
3.52 Results; reference line for image set 3 (400 nm) . . . . . . . . . . 109
3.53 Results; number of particles per frame for image set 3 (400 nm) . 110
3.54 Results; first image from image set 4 (400 nm) . . . . . . . . . . 110
3.55 Results; PIV signal to noise ratio for image set 4 (400 nm) . . . . 111
3.56 Results; added image intensities and mask for image set 4 (400
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

4
3.57 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 4 (400 nm) . . . . . . . . . . . . . . . . . . . . . 114
3.58 Results; particle trajectories plotted on the magnitude velocity
field for image set 4 (400 nm) . . . . . . . . . . . . . . . . . . . . 115
3.59 Results; fitted power law for image set 4 (400 nm) . . . . . . . . 116
3.60 Results; reference line for image set 4 (400 nm) . . . . . . . . . . 117
3.61 Results; number of particles per frame for image set 4 (400 nm) . 118
3.62 Results; first image from image set 1 (200 nm) . . . . . . . . . . 119
3.63 Results; PIV signal to noise ratio for image set 1 (200 nm) . . . . 119
3.64 Results; added image intensities and mask for image set 1 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
3.65 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 1 (200 nm) . . . . . . . . . . . . . . . . . . . . . 122
3.66 Results; particle trajectories plotted on the magnitude velocity
field for image set 1 (200 nm) . . . . . . . . . . . . . . . . . . . . 123
3.67 Results; fitted power law for image set 1 (200 nm) . . . . . . . . 124
3.68 Results; reference line for image set 1 (200 nm) . . . . . . . . . . 125
3.69 Results; number of particles per frame for image set 1 (200 nm) . 126
3.70 Results; first image from image set 2 (200 nm) . . . . . . . . . . 127
3.71 Results; PIV signal to noise ratio for image set 2 (200 nm) . . . . 127
3.72 Results; added image intensities and mask for image set 2 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
3.73 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 2 (200 nm) . . . . . . . . . . . . . . . . . . . . . 130
3.74 Results; particle trajectories plotted on the magnitude velocity
field for image set 2 (200 nm) . . . . . . . . . . . . . . . . . . . . 131
3.75 Results; fitted power law for image set 2 (200 nm) . . . . . . . . 132
3.76 Results; reference line for image set 2 (200 nm) . . . . . . . . . . 133
3.77 Results; number of particles per frame for image set 2 (200 nm) . 134
3.78 Results; first image from image set 3 (200 nm) . . . . . . . . . . 135
3.79 Results; added image intensities and mask for image set 3 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
3.80 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 3 (200 nm) . . . . . . . . . . . . . . . . . . . . . 138
3.81 Results; particle trajectories plotted on the magnitude velocity
field for image set 3 (200 nm) . . . . . . . . . . . . . . . . . . . . 139
3.82 Results; fitted power law for image set 3 (200 nm) . . . . . . . . 140
3.83 Results; reference line for image set 3 (200 nm) . . . . . . . . . . 141
3.84 Results; number of particles per frame for image set 3 (200 nm) . 142
3.85 Results; first image from image set 4 (200 nm) . . . . . . . . . . 143
3.86 Results; added image intensities and mask for image set 4 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
3.87 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 4 (200 nm) . . . . . . . . . . . . . . . . . . . . . 145
3.88 Results; particle trajectories plotted on the magnitude velocity
field for image set 4 (200 nm) . . . . . . . . . . . . . . . . . . . . 146

5
3.89 Results; fitted power law for image set 4 (200 nm) . . . . . . . . 147
3.90 Results; reference line for image set 4 (200 nm) . . . . . . . . . . 148
3.91 Results; number of particles per frame for image set 4 (200 nm) . 149
3.92 Results; first image from image set 5 (200 nm) . . . . . . . . . . 150
3.93 Results; PIV signal to noise ratio for image set 5 (200 nm) . . . . 150
3.94 Results; added image intensities and mask for image set 5 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
3.95 Results; particle trajectories plotted on the distance to vein mar-
gin for image set 5 (200 nm) . . . . . . . . . . . . . . . . . . . . . 153
3.96 Results; particle trajectories plotted on the magnitude velocity
field for image set 5 (200 nm) . . . . . . . . . . . . . . . . . . . . 154
3.97 Results; fitted power law for image set 5 (200 nm) . . . . . . . . 155
3.98 Results; reference line for image set 5 (200 nm) . . . . . . . . . . 156
3.99 Results; number of particles per frame for image set 5 (200 nm) . 157
3.100Results; first image from image set 6 (200 nm) . . . . . . . . . . 157
3.101Results; PIV signal to noise ratio for image set 6 (200 nm) . . . . 158
3.102Results; added image intensities and mask for image set 6 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
3.103Results; particle trajectories plotted on the distance to vein mar-
gin for image set 6 (200 nm) . . . . . . . . . . . . . . . . . . . . . 160
3.104Results; particle trajectories plotted on the magnitude velocity
field for image set 6 (200 nm) . . . . . . . . . . . . . . . . . . . . 161
3.105Results; fitted power law for image set 6 (200 nm) . . . . . . . . 162
3.106Results; reference line for image set 6 (200 nm) . . . . . . . . . . 163
3.107Results; number of particles per frame for image set 6 (200 nm) . 164
3.108Results; first image from image set 7 (200 nm) . . . . . . . . . . 165
3.109Results; PIV signal to noise ratio for image set 7 (200 nm) . . . . 165
3.110Results; added image intensities and mask for image set 7 (200
nm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
3.111Results; particle trajectories plotted on the distance to vein mar-
gin for image set 7 (200 nm) . . . . . . . . . . . . . . . . . . . . . 168
3.112Results; particle trajectories plotted on the magnitude velocity
field for image set 7 (200 nm) . . . . . . . . . . . . . . . . . . . . 169
3.113Results; fitted power law for image set 7 (200 nm) . . . . . . . . 170
3.114Results; reference line for image set 7 (200 nm) . . . . . . . . . . 171
3.115Results; number of particles per frame for image set 7 (200 nm) . 172
3.116Results; first image from image set 1 (100 nm) . . . . . . . . . . 173
3.117Results; PIV ensemble and distorted pass for image set 1 (100 nm)173

6
List of Tables

2.1 Example of saved settings after running PTV . . . . . . . . . . . 43


2.2 Output from running ’plotAndCalculateData.m’ . . . . . . . . . 55

3.1 Results; the settings used for image set 1 (800 nm) . . . . . . . . 63
3.2 Results; the settings used for image set 2 (800 nm) . . . . . . . . 68
3.3 Results; table of percentage of particles moving towards the vein
margin for image set 2 (800 nm) . . . . . . . . . . . . . . . . . . 72
3.4 Results; the settings used for image set 3 (800 nm) . . . . . . . . 75
3.5 Results; table of percentage of particles moving towards the vein
margin for image set 3 (800 nm) . . . . . . . . . . . . . . . . . . 79
3.6 Results; the settings used for image set 4 (800 nm) . . . . . . . . 82
3.7 Results; table of percentage of particles moving towards the vein
margin for image set 4 (800 nm) . . . . . . . . . . . . . . . . . . 86
3.8 Results; the settings used for image set 1 (400 nm) . . . . . . . . 90
3.9 Results; table of percentage of particles moving towards the vein
margin for image set 1 (400 nm) . . . . . . . . . . . . . . . . . . 94
3.10 Results; the settings used for image set 2 (400 nm) . . . . . . . . 98
3.11 Results; table of percentage of particles moving towards the vein
margin for image set 2 (400 nm) . . . . . . . . . . . . . . . . . . 102
3.12 Results; the settings used for image set 3 (400 nm) . . . . . . . . 105
3.13 Results; table of percentage of particles moving towards the vein
margin for image set 3 (400 nm) . . . . . . . . . . . . . . . . . . 109
3.14 Results; the settings used for image set 4 (400 nm) . . . . . . . . 113
3.15 Results; table of percentage of particles moving towards the vein
margin for image set 4 (400 nm) . . . . . . . . . . . . . . . . . . 117
3.16 Results; the settings used for image set 1 (200 nm) . . . . . . . . 121
3.17 Results; table of percentage of particles moving towards the vein
margin for image set 1 (200 nm) . . . . . . . . . . . . . . . . . . 124
3.18 Results; the settings used for image set 2 (200 nm) . . . . . . . . 129
3.19 Results; table of percentage of particles moving towards the vein
margin for image set 2 (200 nm) . . . . . . . . . . . . . . . . . . 132
3.20 Results; the settings used for image set 3 (200 nm) . . . . . . . . 137
3.21 Results; table of percentage of particles moving towards the vein
margin for image set 3 (200 nm) . . . . . . . . . . . . . . . . . . 140
3.22 Results; the settings used for image set 4 (200 nm) . . . . . . . . 144

7
3.23 Results; table of percentage of particles moving towards the vein
margin for image set 4 (200 nm) . . . . . . . . . . . . . . . . . . 147
3.24 Results; the settings used for image set 5 (200 nm) . . . . . . . . 152
3.25 Results; table of percentage of particles moving towards the vein
margin for image set 5 (200 nm) . . . . . . . . . . . . . . . . . . 155
3.26 Results; the settings used for image set 6 (200 nm) . . . . . . . . 159
3.27 Results; table of percentage of particles moving towards the vein
margin for image set 6 (200 nm) . . . . . . . . . . . . . . . . . . 163
3.28 Results; the settings used for image set 7 (200 nm) . . . . . . . . 167
3.29 Results; table of percentage of particles moving towards the vein
margin for image set 7 (200 nm) . . . . . . . . . . . . . . . . . . 171
3.30 Results; mean and STD of trajectories deviating more than 10° . 174
3.31 Results; mean and STD of trajectories deviating more than 10° . 174

8
Contents

1 Introduction 12

2 Method 14
2.1 Provided Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1.1 Preparation of Liposomes . . . . . . . . . . . . . . . . . . 15
2.1.2 Zebrafish Injections . . . . . . . . . . . . . . . . . . . . . 15
2.1.3 Zebrafish Fluorescent Imaging . . . . . . . . . . . . . . . . 15
2.2 Identify Particles and Extract the Vein Mask . . . . . . . . . . . 16
2.2.1 Filtering the Images . . . . . . . . . . . . . . . . . . . . . 17
2.2.2 Identify Particles . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.3 Vein Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2.4 Distance to Boundary . . . . . . . . . . . . . . . . . . . . 26
2.3 Particle Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.3.1 Particle Image Velocimetry . . . . . . . . . . . . . . . . . 27
2.3.2 Particle Tracking Velocimetry . . . . . . . . . . . . . . . . 35
2.4 Running the PTV Code . . . . . . . . . . . . . . . . . . . . . . . 39
2.4.1 Replace Outliers With or Without Mask . . . . . . . . . . 43
2.4.2 Signal to Noise Ratio . . . . . . . . . . . . . . . . . . . . . 44
2.4.3 Remove Trajectories . . . . . . . . . . . . . . . . . . . . . 45
2.4.4 Plot Trajectories . . . . . . . . . . . . . . . . . . . . . . . 46
2.5 Extract Data from Particle Trajectories . . . . . . . . . . . . . . 48
2.5.1 Calculate Angle of Particles . . . . . . . . . . . . . . . . . 55
2.5.2 Fit Power Law . . . . . . . . . . . . . . . . . . . . . . . . 57
2.6 Crop Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

3 Results 60
3.1 800 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 60
3.2 Image Set 1 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 60
3.2.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 63
3.2.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.3 Image Set 2 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 66
3.3.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 68

9
3.3.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.3.3 Amount of Particles Moving Towards the Vein Margin . . 71
3.3.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 72
3.4 Image Set 3 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 73
3.4.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 75
3.4.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3.4.3 Amount of Particles Moving Towards the Vein Margin . . 78
3.4.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 79
3.5 Image Set 4 (800 nm) . . . . . . . . . . . . . . . . . . . . . . . . 80
3.5.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 82
3.5.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.5.3 Amount of Particles Moving Towards the Vein Margin . . 85
3.5.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 86
3.6 400 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 87
3.7 Image Set 1 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 87
3.7.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 90
3.7.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
3.7.3 Amount of Particles Moving Towards the Vein Margin . . 93
3.7.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 94
3.8 Image Set 2 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 95
3.8.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 98
3.8.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
3.8.3 Amount of Particles Moving Towards the Vein Margin . . 101
3.8.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 102
3.9 Image Set 3 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 103
3.9.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 105
3.9.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
3.9.3 Amount of Particles Moving Towards the Vein Margin . . 108
3.9.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 109
3.10 Image Set 4 (400 nm) . . . . . . . . . . . . . . . . . . . . . . . . 110
3.10.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 113
3.10.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.10.3 Amount of Particles Moving Towards the Vein Margin . . 116
3.10.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 117
3.11 200 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 118
3.12 Image Set 1 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 118
3.12.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 121
3.12.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

10
3.12.3 Amount of Particles Moving Towards the Vein Margin . . 124
3.12.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 125
3.13 Image Set 2 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 126
3.13.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 129
3.13.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
3.13.3 Amount of Particles Moving Towards the Vein Margin . . 132
3.13.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 133
3.14 Image Set 3 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 134
3.14.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 137
3.14.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
3.14.3 Amount of Particles Moving Towards the Vein Margin . . 140
3.14.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 141
3.15 Image Set 4 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 142
3.15.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 144
3.15.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
3.15.3 Amount of Particles Moving Towards the Vein Margin . . 147
3.15.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 148
3.16 Image Set 5 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 149
3.16.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 152
3.16.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
3.16.3 Amount of Particles Moving Towards the Vein Margin . . 155
3.16.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 156
3.17 Image Set 6 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 157
3.17.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 159
3.17.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
3.17.3 Amount of Particles Moving Towards the Vein Margin . . 162
3.17.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 163
3.18 Image Set 7 (200 nm) . . . . . . . . . . . . . . . . . . . . . . . . 164
3.18.1 Particle Trajectories . . . . . . . . . . . . . . . . . . . . . 167
3.18.2 Particle Trajectory Distribution Histograms and Power
Law Fit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
3.18.3 Amount of Particles Moving Towards the Vein Margin . . 170
3.18.4 Particles Found per Frame . . . . . . . . . . . . . . . . . . 171
3.19 100 nm Nanoparticles Image Sets . . . . . . . . . . . . . . . . . . 172
3.20 Mean and STD of Percentage of Particle Trajectories that are
Likely to Hit the Vein Margin . . . . . . . . . . . . . . . . . . . . 173

4 Conclusion and Discussion 175

11
Chapter 1

Introduction

Cancer is a major public health problem worldwide where it is the second lead-
ing cause of death with heart disease at the top [23]. From 1991 to 2014, the
cancer death rate dropped by 25% thanks to improvements in all aspects of
cancer treatment and medicine [23]. Current anti-cancer drugs are often highly
toxic as they are taken up throughout the body and not only the target tissue
[4]. Anti-cancer drugs have to be effective at low concentrations in the target
tissue and also safe everywhere else in the body [12]. Since the anti-cancer drugs
are rapidly excreted out of the body, have poor solubility and, are prone to be
metabolized before reaching the target, they must be given frequently and in
multiple rounds to assure high enough concentration in target tissue. This leads
to significant reduced quality of life in cancer patients [4].

To improve safety and efficacy of anti-cancer drugs with less side effects,
nanoparticles have been studied heavily these past years with thousands of ar-
ticles published [12]. The concept of selectively detecting and destroying cancer
cells with nanoparticles is a very exciting one. From the past 10 years only
0.7% (median) of the administered nanoparticle dose is found to be delivered
to a solid tumour [27]. After injection, the nanoparticles face a myriad of chal-
lenges on route to the target tissue and therefore exploring different nanoparticle
designs (size, shape and surface chemistry) and extracting the quantitative data
is very important [27],[12]. If the nanoparticles are too small (less than 10 nm)
they are cleared by the kidneys and large particles are likely to be swept up
by macrophages [12]. In tuberculosis cases where the macrophages themselves
are infected, nanoparticles loaded with rifampicin have been very successful in
zebrafish embryos [7],[26]. In application of nanoparticles to tumor tissue the
size varies between 10nm to 100nm, where the optimal size is around 20nm, and
must not be taken up by macrophages [12]. Large sized nanoparticles suffer from
limited penetration to the target tissue and are heterogeneously concentrated
between the arteries and veins [15].

The enhanced permeability and retention (EPR) effect of tumors gives sci-

12
entists more reason to be optimistic about nanoparticles. Nanoparticles, when
injected intravenously, accumulate in tissues and remain there for a longer time.
Thus the EPR effect is now widely accepted as the most basic mechanism for
selective targeting of tumor tissue with nanomedicine [14],[20],[10].

To best be able to study the flow and distribution of nanoparticles in vivo,


the zebrafish model has become very popular as it does not reject injected hu-
man cells and it is optically transparent for easy imaging [4]. This allows tumor
growth in vivo to be studied by microscopic imaging at very high resolutions
over time. In addition this also enables in vivo studies of other fluorescent ob-
jects like nanoparticles [4].

A "magic bullet" refers to nanoparticles having features such as not to be


taken up by macrophages (’stealth’ property), the ability to leak out of the vas-
culature (EPR effect) at the tumor site, accumulate in the tumor tissues and
be taken up into the cancer cells and thus killing them [4]. With the zebrafish
model scientists are more optimistic than ever in finding this so called "magic
bullet".

Qualitative flow visualization has existed since the days of Prandtl, but with
the ever growing computational power we have available today, we can quantify
the flow [3]. There are many ways to measure fluid motion, one of which is Par-
ticle Image Velocimetry (PIV). PIV is widely used in fluid dynamics and it is
one of the most popular quantitative imaging techniques. This is a non-intrusive
optical measurement method, which gives velocity fields resolved in both time
and space. PIV has been used measure velocity fields at the order of 1µm and
smaller at the micro level [17] [28], and it has also been used to study oil spills
at the macro level [16].

With high temporal and spatial resolution imaging of fluorescent nanoparti-


cle flow, the door has been opened for particle identification and particle tracking
algorithms to give greater insight into the intricate dynamics of drug delivery at
the nano-scale. In this thesis I will implement a Particle Tracking Velocimetry
(PTV) tracking software using HydroLabPIV for the PIV cross correlation, go
through how it works and use it on image data of nanoparticles ranging from
100 nm to 1200 nm. The HydroLabPIV software used has been developed at
the University of Oslo by Jostein Kolaas [11], and with this PTV tool I will
quantify the efficacy of different nanoparticle designs with regard to anti-cancer
drug delivery. One way to quantify the efficacy is to calculate the velocity fields
and track the particles to measure how many of the particles end up at the
vein margin and how the particles are distributed throughout the vein. Are
nanoparticles ranging from 400 nm to 1200 nm more likely to end up at the
vein margin than nanoparticles ranging from 100 nm to 300 nm, and whether
the distribution of the nanoparticles in the vein is different.

13
Chapter 2

Method

In this chapter we will go through the process of collecting the data, how the
program works and the algorithms used. All the code is provided on my github
repository and can be cloned directly as is [6]. We will go in detail on how to use
the program and in which order to extract the results. In addition to that, we
will go through the reasoning behind the heuristics of the programs and some
of the mathematics of the algorithms.

2.1 Provided Data


Together with Federico Fenaroli from the department of biosciences at the uni-
versity of Oslo, we extracted 135 GB of image data, which can be subdivided
into 34 image sets that each vary from 230 images up to 11987 images. There
were several steps in the process; preperation of the liposomes, injecting the
zebrafish and imaging. Each of these steps where carried out at the department
of biosciences by Federico Fenaroli alone except for the imaging step which was
done jointly. These steps are included for completeness and are detailed below.

Figure 2.1: This shows a singular vein with nanoparticles flowing through them.
The nanoparticles are somewhere between 400 nm to 1200 nm and fluorescent
and the image contains 826x157 pixels.

14
2.1.1 Preparation of Liposomes
Phosphatidyl choline (PC) was bought from Lipoid (product E PC-3), Choles-
terol (Chol) from Sigma and Phosphoethanolamine PEG 2000 (PE-PEG) from
Avanti lipids (product 880120P). Briefly, for PEGylated liposomes, 3 ml of chlo-
roform was placed in a Florence flask containing 2.4 mg of PC, 0.64 mg of Chol
and 0.69 mg of PE-PEG and 5 µl of ATTO550 or ATTO633 labelled DOPE
(ATTO-TEC). The prepared mixtures were then dried at room temperature in
the dark using a rotatory evaporator. The drying step conditions were: 150
millibar for 1h, 80 millibar for 30 min, 16 millibar for 10 min. After this pro-
cess, a film can be seen on the flask that was then hydrated at 70°C with 1
ml of PBS and vortexed to allow complete solubilisation. After this passage,
the re-suspended lipids are aspirated with a gas-tight syringe and the solution
is passed through different sizes filters (100 nm, 200 nm, 400 nm and 800 nm)
using a mini-extruder (Avanti lipids) mounted on a heating block at 70°C. Li-
posomes were analysed by dynamic light scattering (DLS) and Zetasizer.

2.1.2 Zebrafish Injections


In order to perform microinjections, borosilicate needles (GC100T-10, Harvard
instruments) were prepared using a pipette puller (P-97, Sutter instruments).
The needles were then connected to an Eppendorf Femtojet Express pump and
handled using a Narishige MN-153 micromanipulator. All the injection were
performed on zebrafish larvae previously sedated with tricaine (Finquel; 0.02%
in embryo water) and placed on a petri dish containing a hardened solution
of 2% agarose in milliQ water. Nanoparticle injections were carried out in the
posterior caudal vein in zebrafish larvae 3 days old.

2.1.3 Zebrafish Fluorescent Imaging


In depth imaging of nanoparticle flow was performed using an Andor Drangon-
fly spinning disc using an oil immersion 40X Nickon lens. For this, zebrafish
larvae after injection were placed on a glass bottom dish (MatTek) and covered
with a solution of low melting point agarose (Sigma). After solidification of the
solution, embryo water supplemented with Tricaine was added to the dish and
could then be imaged with the spinning disc.

While specific sized filters were employed there will always be nanoparticles
smaller than and bigger than the filters. While a set of data may predominantly
contain nanoparticles of 200 nm, there will always be some nanoparticles bigger,
and some smaller than that. The 800 nm nanoparticles vary from 400 nm to
1200 nm, the 200 nm nanoparticles vary from 100 nm to 300 nm and the 100
nm nanoparticles vary from 50 nm to 200 nm.

15
The imaging was done on three occasions. On the first occasion, the nanopar-
ticles we imaged were predominantly 400 nm and 800 nm. Two sets of data were
collected. One for 400 nm and one for 800 nm nanoparticles. Two different ze-
brafish was imaged, one with 400 nm nanoparticles flowing through it, and the
other with 800 nm nanoparticles flowing through it. But as previously men-
tioned, these could vary in size. Not all nanoparticles were exactly 400 nm and
800 nm.

On the other two occasions we imaged three zebrafish. One zebrafish was in-
jected with 100 nm nanoparticles and the other two zebrafish were injected with
200 nm nanoparticles. The 100 nm nanoparticles were too small to be able to
distinguish single particles which simply was a limitation of the imaging equip-
ment since even after increasing the laser intensity to 100%, we could not select
a low enough exposure time while maintaining visibility. In addition it was very
difficult to control the amount of 100 nm nanoparticles that were injected and
thus the veins were saturated with them. However in the imaging of the 200
nm nanoparticles, it was still possible to distinguish between the nanoparticles.
In one of the the two zebrafish that had 200 nm nanoparticles injected into,
there were too many nanoparticles present in the veins and therefore the other
zebrafish was injected with approximately 1/4 as many nanoparticles. Both 200
nm image sets are possible to use for particle tracking despite one being more
saturated with nanoparticles than the other.

The camera was positioned to image different veins so that many image sets
could be extracted from just one zebrafish. The faster the nanoparticles moved
through the veins, the higher frames per second (FPS), or lower exposure time,
was needed to be used so that it would be possible to see individual nanopar-
ticles in the images. But increasing the FPS, or lowering the exposure time,
came at the cost of visibility, which meant that the laser intensity needed to
be increased. When the laser intensity could not be increased any further a
2x2 pixels binning was employed. A 2x2 binning takes 4 pixels and combines
them into one. This reduces the resolution by half, but increases the brightness
intensities. 4x4 and 8x8 pixel binning would lead to particle flickering from
frame to frame and this is undesirable. The imaging could only be done for 30
to 60 seconds at most as the laser would make the fluorescent fade over time
and thereby the brightness intensities in the images would be variable. All the
image sets are acquired for 30 seconds at a time with variable FPS.

2.2 Identify Particles and Extract the Vein Mask


Daniel Blair and Eric Dufresne had written a basic particle identification code
in MATLAB, named ’pkfnd.m’, which I could modify and use [2]. First we
will look at the filtering that I added, then we will go through the heuristics
in my modified particle finding code named ’findParticles.m’ and some of the

16
modifications made compared to ’pkfnd.m’[6]. Afterwards we will look at the
calculation of the vein mask and how this vein mask is used to calculate the
distance to the vein margin, or vein border.

2.2.1 Filtering the Images


In ’findParticles.m’ I decided first to run the image through a filter, dubbed ’Ag-
gressive’ in the code, to remove the background noise and to blur out the bright
peaks slightly. The code has the capability of finding the particles without using
the ’Aggresive’ filter first also, but this may result in many false positives.

1 i f ( strcmpi ( f i l t e r , ’ Aggressive ’ ) )
2 %Gaussian f i l t e r − Lowpass
3 meshSize = p a r t i c l e L e n g t h ;
4 G = g a u s s ( meshSize , meshSize , n o i s e L e n g t h ) ;
5
6 %Box b l u r f i l t e r − Lowpass
7 m e s h S i z e = ( round ( p a r t i c l e L e n g t h / 2 ) −1)−(round(− p a r t i c l e L e n g t h
/ 2 ) +1) + 1 ;
8 B = o n e s ( round ( m e s h S i z e ) , round ( m e s h S i z e ) ) ;
9 B = B. / sum (B ( : ) ) ;
10 gConv = conv2 ( image , G, ’ same ’ ) ;
11 bConv = conv2 ( image , B, ’ same ’ ) ;
12
13 %A g g r e s s i v e f i l t e r
14 f i l t e r e d = gConv − bConv ;
15 f i l t e r e d ( 1 : ( round ( p a r t i c l e L e n g t h / 2 ) ) , : ) = 0;
16 f i l t e r e d ( ( end − round ( p a r t i c l e L e n g t h / 2 ) + 1 ) : end , : ) = 0 ;
17 f i l t e r e d ( : , 1 : ( round ( p a r t i c l e L e n g t h / 2 ) ) ) = 0;
18 f i l t e r e d ( : , ( end − round ( p a r t i c l e L e n g t h / 2 ) + 1 ) : end ) = 0 ;
19 f i l t e r e d ( f i l t e r e d < 0) = 0 ;
20
21 e l s e i f ( s t r c m p i ( f i l t e r , ’ Gaussian ’ ) )
22 %Gaussian f i l t e r − Lowpass
23 meshSize = p a r t i c l e L e n g t h ;
24 G = g a u s s ( meshSize , meshSize , n o i s e L e n g t h ) ;
25 f i l t e r e d = conv2 ( image , G, ’ same ’ ) ;
26
27 e l s e i f ( s t r c m p i ( f i l t e r , ’ Box ’ ) )
28 %Box b l u r f i l t e r − Lowpass
29 m e s h S i z e = ( round ( p a r t i c l e L e n g t h / 2 ) −1)−(round(− p a r t i c l e L e n g t h
/ 2 ) +1) + 1 ;
30 B = o n e s ( round ( m e s h S i z e ) , round ( m e s h S i z e ) ) ;
31 B = B. / sum (B ( : ) ) ;
32 f i l t e r e d = conv2 ( image , B, ’ same ’ ) ;
33 else
34 f i l t e r e d = image ;
35 end

Figure 2.3 has had a 5x5 Gaussian and a 5x5 Box blur filter applied to it and
the background noise is greatly reduced compared to the source image in figure
2.2. As we will see later, the Gaussian and the Box filters only smears out the
noise, while not completely removing them. The Box filter is an averaging filter

17
that gives each pixel the same weight, while the Gaussian filter is puts more
weight on the central pixels. The 5x5 Gaussian filter used on figure 2.2 is given
in figure 2.4. The Box Filter can be written as a NxN matrix as follows.
 
1 1 1 ... 1
1  1 1 1 . . . 1

 .. .. .. . . .. 
N · N . . . . .
1 1 1 ... 1

And the formula for the N xN Gaussian filter with a given σ > 0 is given as,
(x2 +y 2 )
e− 2σ2
, x, y ∈ [−N/2, N/2] (2.1)
2πσ 2

1 f u n c t i o n [G] = g a u s s ( rows , columns , sigma )


2 [ x , y ] = m e s h g r i d ( ( round(−rows / 2 ) +1) : ( round ( rows / 2 ) −1) , ( round
(−columns / 2 ) +1) : ( round ( columns / 2 ) −1) ) ;
3 i f ( 1 0 ∗ sigma <= min ( rows , columns ) )
4 G = 1 / ( 2 ∗ p i ∗ sigma ^2) ∗ exp(−x . ^ 2 / ( 2 ∗ sigma ^2) − y . ^ 2 / ( 2 ∗ sigma
^2) ) ;
5 else
6 G = exp(−x . ^ 2 / ( 2 ∗ sigma ^2) − y . ^ 2 / ( 2 ∗ sigma ^2) ) ;
7 G. / sum (G( : ) ) ;
8 end
9 end

The denominator in equation 2.1 is the normalizing factor that makes sure
the sum of the filter is 1 just like the Box filter. However this normalization
has been implemented in two ways in the code. If the mesh is greater than
10 times σ then we can safely use the faster performing equation 2.1, but if it
is not, then we have to divide the Gaussian filter values by the sum of all the
entries. Because equation 2.1 is continuous and its domain is the whole of R2 ,
the sum of the filter will be less than 1 when the mesh is not large enough. The
performance difference between these two are negligible when the mesh is small,
but a quick test for N = 10000 and σ = 1000 over 100 iterations shows that on
average equation 2.1 is 6.35% faster than dividing by the sum of the filter.

18
Figure 2.2: Source image of a singular vein that has been plotted in MatLab
with the brightness intensities. The nanoparticles are somewhere between 400
nm to 800 nm and fluorescent and the image contains 1021x194 pixels.

Figure 2.3: A image that has had the ’Aggressive’ filter applied to it. The image
contains 1021x194 pixels.

19
Figure 2.4: An example of a 5x5 Gaussian filter with σ = 1.

Figure 2.5 and figure 2.6 illustrate the fact that both the Gaussian and the
Box filters both smooth out the image significantly. Since the noise is being
smoothed out similarly in both the Gaussian and the Box filter, while the par-
ticles are being accentuated, we can subtract the Gaussian image from the Box
filter image and set negative values to 0, to get the ’Aggressive’ filtered image
to remove the noise completely.

In figure 2.7 we can see that there is a halo effect, an outline, that is visible
after subtracting the two images from one another and setting negative values
to 0. This outline is an artifact from convolving the filter with the image, and
therefore the outlines have a width of half the filter size. In figure 2.8 I have
removed the outline by setting it to zero. This outline is usually only a few
pixels wide as the size of the filters are dependant on the particle diameter in
the code.

20
Figure 2.5: A image that has had a 19x19 Gaussian filter applied to it. The
image contains 1021x194 pixels.

Figure 2.6: A image that has had the Box filter applied to it. The image contains
1021x194 pixels.

21
Figure 2.7: A image that has had a 19x19 ’Aggressive’ filter applied to it where
the outline from the filtering is still visible. The image contains 1021x194 pixels.

Figure 2.8: A image that has had a 19x19 ’Aggressive’ filter applied to it. The
image contains 1021x194 pixels.

22
2.2.2 Identify Particles
After the filter has been applied, we use the MATLAB function find() to find
row and column indices of values greater than a given brightness value thresh-
old. These row and column indices are now seen as the centers of our particles.
This gives a starting point. From here on I check that every pixel above the
given threshold found by the function find() is actually the brightest pixel in
the immediate vicinity of it. Later I remove all the pixels that overlap, that
they are within the particle diameter of each other. This is done because the
coordinates found are assumed to be the centers of the particles and all particles
are assumed to have the same diameter. So if the distance between two particles
is less than one particle diameter, then they overlap as the 2·radius = diameter.
And finally only keep the brightest of these overlapping pixels. Point 4 in the
process below is implemented in such a way that no particle is compared to an-
other particle twice. A vector of row and column indices are then returned. The
code is available on the github repository [6], but the whole process is shown
below.

1. Apply filter.
2. Find the pixels with values greater than the threshold.
3. Make sure there are no brighter pixels in the immediate vicinity.
4. Remove overlapping particles and keep only the brightest particle.

This algorithm does not track a particle from one image to another, it only
identifies bright points, nanoparticles. The threshold number is very important
and it does impact the tracking algorithm. This is the number to adjust to get
the perfect balance between identifying nanoparticles or identifying noise as it
is the brightness levels of the particles. It keeps only those positions that are
above the given brightness threshold.

2.2.3 Vein Mask


By adding the images in a set together to get an image that highlights the
vein as seen in the top image of figure 2.9, we can then use a Gaussian blur
filter for reducing noise and threshold it to make it black and white. In figure
2.9 the mask in the bottom is black where the vein is, and white otherwise.
This needs to be inverted for use in the distance to vein boundary calculation,
and for use as a mask in Particle Image Velocimetry (PIV) as seen in figure 2.10.

While the added brightness intensities of all the images as seen in figure 2.9
was an interesting way of looking at the distribution of nanoparticles, the prob-
lem with that was the fact that cells are perceived as dark spots in the images

23
and they move through the center of the vein often. This makes sure that the
added brightness intensities always are brighter at the vein margin, and as such,
this was not a method that could be employed.

Figure 2.9: The top image is the sum of 2181 images. The bottom image is a
binary image given by running a Gaussian filter over the top image and threshold
it. The image contains 1021x194 pixels.

Figure 2.10: The inverted image of the mask in figure 2.9. The image contains
1021x194 pixels.

It is sometimes necessary to create an outer mask and a inner mask. As


one would expect, the nanoparticles move slower at the vein margin than in the
middle. The PIV might be more accurate if we split the mask in an inner and

24
outer part and run the PIV twice, one with each mask and with smaller sub-
windows for the the outer mask as the particles move slower there. The main
way to create the inner mask is to use the ’imagesAdd.m’ MatLab script [6]
where it is possible to cut off a set amount of the upper half and the lower half
of the mask. This script is also used for making the mask in general. The outer
mask can be created by selecting the white region in figure 2.10 and contracting
the selection by a set amount of pixels. This can be done with photoshop or
even an online image editor like pixlr [1]. Figure 2.11 and figure 2.12 shows how
the outer and inner masks look respectively.

Figure 2.11: The inner part of figure 2.10 has been removed, giving us the outer
areas only. The image contains 1021x194 pixels.

Figure 2.12: The outer part of figure 2.10 has been removed, giving us the inner
area only. The image contains 1021x194 pixels.

To create the masks, we just need to run the file ’imagesAdd.m’. This will
give an interactive way of fine tuning the threshold level, the Gaussian blur filter
strength, the lower α and upper α in order to get a good vein mask. The lower
and upper α are used for removing parts of the upper or lower half of the mask.
This is mostly to remove noise and artifacts outside of the main vein. The lower
both α values are chosen, the more of the mask will be removed and vice versa.

Running ’imagesAdd.m’ will first give a dialog box asking for the folder the
images are located. After selecting the folder, a new dialog box comes up. This
one gives you the option for skipping images from the folder so that the process
goes faster and so that the composite image does not get over saturated with too
many images. Afterwards the vein mask will be plotted and a new dialog box

25
will come up asking if the vein mask is satisfactory. If it is not, you can change
the threshold, the Gaussian blur filter strength, the upper α and the lower α.
The process will be repeated until the ’Yes’ or ’Cancel’ button is pressed when
asked if the vein mask is satisfactory. Pressing the ’Yes’ button saves the mask,
the inverted mask and a plot like in figure 2.9 in a folder of your choosing.

2.2.4 Distance to Boundary


By using figure 2.10 as the arguments for the MatLab function bwdist(), we get
a new image matrix where every pixel has the distance to the vein wall as value.
This distance is calculated with the L2 norm, the usual Pythagorean distance
calculation, and the distance is given in pixels. By calculating this distance
image, we can use it as a look up table to find the distance for each particle to
the vein wall.

Figure 2.13: Every pixel has a measured distance to the vein wall as defined by
figure 2.10.

2.3 Particle Tracking


Daniel Blair and Eric Dufresnes tracking code (filename is track.m) considers all
possible identifications of the previous particle positions with the current posi-
tions, and chooses that identification which results in the minimal total squared
displacement. This tracking code works well even when particles exhibit Brow-
nian motion, but it is very sensitive to the given parameters. These parameters

26
have to be adjusted incrementally by trial and error to get right. Some docu-
mentation is given in the code files and on their website [2].

My Particle Tracking Velocimetry (PTV) works differently as it uses the


velocity field calculated from the Particle Image Velocimetry (PIV) (code by
Jostein Kolaas of University of Oslo [11]) to make a guess at where the particle
has moved to. We will go through how the PIV works, including the theory,
some of the code and what to know when selecting the different parameters in
PIV. And then we will look at the PTV code that I have written; the heuristics,
how it works and how to run it.

2.3.1 Particle Image Velocimetry


Particle Image Velocimetry (PIV) is a general class of quantative imaging tech-
niques where the seeding density is such that the distance between particles in
the images are of a few particle diameters such that all subwindows contain
several distinct particles within them. The velocity field is then often extracted
through cross correlation analysis [25].

Cross Correlation
I have decided to use cross correlation throughout even though fast Fourier
transform (FFT) of the cross correlation is faster (O[N 4 ] vs O[N 2 lnN ]). This is
because some of the advantages of FFT may be diminished as the subwindows
has to be a power of two (16x16, 32x32, 64x64 etc) [21]. In the cases of my data
the subwindows have to be rectangles and not a power of two. The normal cross
correlation for two subwindows, A and B, is given as follows:
N M
1 XX
CC(s, t) = A(i, j)B(i + s, j + t) (2.2)
N · M i=1 j=1

To find the cross correlation we first need to divide the two images into a
regular grid as seen in figure 2.14. We can then naively cross correlate every
grid with other grids surrounding it and then pick the grid that gives the highest
correlation peak. But a better way is to define a grid with overlap and a search
range like in figure 2.15. Letting the subwindows overlap makes more particles
part of the calculations, but can lead to oversampling. The search range limits
the maximum displacement and is usually set to be one third of the subwin-
dow size. That means that we assume the maximum displacement is no greater
than one third of the subwindow size in either direction. With a subwindow of
24x24 pixels and an overlap of 50%, we will get a velocity vector every 12 pixels.
Letting the search range be a third of the subwindow will mean it goes from -8
to 8 pixels in both x- and y-direction. The larger the subwindows, the larger
the maximum displacement will be, but a larger subwindow size brings with it
a lower resolution of the velocity field [11]. In figure 2.16 we can see that the

27
velocity is defined by the difference in movement in x- and y-direction.

Figure 2.14: An image that has been divided in a regular grid. The grid repre-
sents the subwindows.

28
Figure 2.15: Two images, one with red particles, other with green particles, are
placed on top of one another. Cyan rectangle is the search range. Red rectangle
is a subwindow from the first image. Green rectangle is a subwindow from the
second image. The yellow arrow is the direction of the movement between the
two rectangles. The yellow marked area between the red and green subwindows
is the overlap.

29
Figure 2.16: Two images, one with red particles, other with green particles, are
placed on top of one another. ’dy’ is the displacement in y-direction. ’dx’ is the
displacement in x-direction. Red rectangle is a subwindow from the first image.
Green rectangle is a subwindow from the second image. The yellow arrow is the
direction of the movement between the two rectangles. The yellow marked area
between the red and green subwindows is the overlap.

Replace Outliers
Detecting and replacing outliers is a way of improving the quality of the PIV
result. HydroLabPIV uses 3x3 normalized local median filter, and if parts of
the 3x3 filter is masked, a masked 5x5 local median filter is used instead. A
cubic B-spline is fitted to the velocity field using an iterative weighted least
squares fit. The fit is then iterated a few times where the residuals, normalized
by 9x9 local median of the residuals, is used to update the weights in the least
squares fit. Increasing the overlap gives more vectors and results in a higher
computational cost, but it will also improve the outlier detection [11].

Two of the MatLab files from HydroLabPIV, ’localfilt.m’ and ’lsbsfit2.m’, I


have modified. Both of these files, functions, are used during outlier detection.
With very small subwindows and/or subwindow sizes that are not square and

30
power of two. This is due to an indexing issue in the localmedian(...) function
of ’lsbsfit2.m’ and in ’localfilt.m’. It is the exact same piece of code in both files
and as long as the subwindows and search range are not set to be significantly
bigger than the image (which does not make sense to do as the recommended
search range is a third of the subwindow size) then this modification does not
alter the results. This just makes sure that MatLab indexing is respected.
1 [ I , J ] = s i z e (X) ;
2 i d y = [N+2:M 1 : I I−M+1: I−N− 1 ] ;
3 i d x = [N+2:M 1 : J J−M+1:J−N− 1 ] ;
4
5 %Shako Farhad : Added t h e f o u r l i n e s below t o make s u r e t h a t i d y and
i d x do not c o n t a i n
6 %n e g a t i v e i n t e g e r s o r z e r o s o r v a l u e s g r e a t e r than t h e d i m e n s i o n s
o f X.
7 i d y ( i d y ( : ) <1) = 1 ;
8 i d x ( i d x ( : ) <1) = 1 ;
9 i d y ( i d y ( : )>I ) = I ;
10 i d x ( i d x ( : )>J ) = J ;
11
12 Xext = X( idy , i d x ) ;

Subwindow Distortion
To improve accuracy for shear flows, using subwindow distortion can be bene-
ficial but it will cost more computationally. HydrolabPIV finds the distortion
of the image pair by integrating the Bsplines fitted to the displacements using
Runge-Kutta. The displacement is then used to interpolate a new image pair
tending toward zero/uniform displacement. To get the best accuracy 3-4 dis-
torted passes are recommended. An important choice that greatly affects the
error is interpolation of the image pair, and Lanczos resampling works better
for smaller particles with diameter between 2 and 4 pixels, while cubic b-spline
works better for particles with diameter greater than 5 pixels [11].

Subpixel Accuracy
Figure 2.17c and 2.18c shows the cross correlation plots. The peaks are where
the two subwindows are the most correlated and this peak is more pronounced
the bigger the subwindows are, as can be seen from figure 2.17 and 2.18. With
smaller subwindows, the cross correlation peaks may become ambiguous. To
use small subwindows and reduce the uncertainty, we need subpixel estimates
[25].
Using subpixel interpolation to gain increased accuracy for the PIV velocity
field is possible. Six different subpixel interpolation schemes can be used and
they were all tested and the results can be seen in figure 2.19 on page 35.
With cross correlation peaks as seen in figure 2.18, they are so narrow that
subpixel resolution is lost. Narrow correlation peaks and/or using these subpixel
interpolation schemes may introduce peak-locking, pixel-locking or pixel biasing
when the particles are smaller than just a few pixels in diameter. It is a serious

31
error source in PIV and it means that the measured location and displacement
of a particle image is to be biased towards integer values [18]. In figure 2.19
peak-locking is not tested, and only the ability to reproduce a manufactured
displacement. Both the 3x3 and 5x5 Levenberg–Marquardt (3x3lm and 5x5lm)
subpixel interpolation schemes may become singular and have no solution. The
3x3 or 5x5 least squares (3x3ls or 5x5ls) scheme is recommended.

32
(a) 32x32 subwindow of image 1. (b) 32x32 subwindow of image 2.

33
(a) 64x64 subwindow of image 1. (b) 64x64 subwindow of image 2.

34
Figure 2.19: All 6 algorithms for doing subpixel interpolation that is available
in the HydrolabPIV code was tested on 32x32, 64x64, 128x128, 256x256 and
500x500 subwindows 1000 times each. The subwindows were extracted from
two images where the second image was the same as the first image but shifted
5 pixels in the x-direction and 4 pixels in the y-direction. The x-axis shows
the time taken in seconds (s). The y-axis shows the absolute mean difference
between the interpolated displacement and the true displacement of x = 5 and
y = 4 over 1000 iterations.

2.3.2 Particle Tracking Velocimetry


With the Particle Image Velocimetry (PIV) code, HydrolabPIV, by Jostein Ko-
laas of University of Oslo [11], we had a reliable and fast way of finding the
velocity field needed to identify the particle trajectories. A particle trajectory is
defined as a finite set of coordinates which represent the location of a particle on
the image. Each such set of coordinates are grouped together by an ID number
that is unique to every unique particle.

There are many options to choose from, both in the HydrolabPIV, and in
my code. Everything pertaining to HydrolabPIV is discussed in section 2.3.1.
We will go through the heuristics of my PTV code, and also go through how to
make use of it. The code is available on the github repository [6], but the PTV
process is given below and we will go through each step.

1. If ’ensemble PIV contribution’ is selected; run an ensemble PIV once with


all the images and interpolate the velocity components to the size of the

35
images.
2. Find particle positions for the two first images, and afterwards only the
most recent image, image two.
3. Remove particles found outside of mask.

4. If ’simplify images contribution’ is selected; draw particles at the coordi-


nates particles were found from each respective image on a black canvas.
Now let the two images, used in PIV later, be a linear combination of the
images with drawn particles and the original images.
5. Calculate PIV for the image pair and if ’distorted pass’ is selected then
do N-1 distorted passes.
6. If ’ensemble PIV contribution’ is selected; let the velocity components be
a linear combination of the velocity components from point 1 and the
velocity components from point 5.

7. Interpolate the velocity components to the size of the images.


8. If ’previous velocity contribution’ is selected; let the velocity components
be a linear combination of the velocity components from the previous PIV
and the velocity components from the current PIV, both from point 6.
9. Find new particle positions using the velocity components from point 8
added to the particle positions from image one. This gives an approxima-
tion of the particle positions in image two.
10. If there are particle positions in image two within a given ’search radius’
of the new particle positions, found in point 9, connect the particle po-
sitions from the first image to the particle positions of the second image.
Give each connected particle pair an unique ID for the first two images,
otherwise, give the connected particle from image two the same ID as the
new particle positions ID, found in point 9.
11. All the particles from image two that were not connected in point 10 will
be saved with a unique ID temporarily as it may be a new particle that has
moved in to the focal plane or moved in to view from outside the image.
12. If ’particle skipped frames’ is selected; we assume that particles may dis-
appear and reappear after M number of frames. All the particles from
point 9 that were not connected in point 10 will be connected, and mark
it as a ’guessed particle’.

13. Repeat until no more images are left.


14. If ’particle skipped frames’ is selected; remove all particles with the same
ID that has more than M particles marked with ’guessed particles’ from
point 12.

36
15. Go through all the found trajectories, extract the start- and end-coordinates
of the trajectories. Then connect trajectories that have start-coordinate
within the given ’search radius’ of an end-coordinate of another trajectory,
and that are in chronological order.

In point 1 the ’ensemble PIV contribution’ refers to a inputted number


α ∈ [0, 1]. If α = 1 then we will only use the ensemble PIV velocity field
throughout all the calculations. An ensemble PIV gives an average velocity
field over all the images. In other words, with α = 1, we assume that the ve-
locity field between two and two images is about the same. Using α = 1 has its
disadvantages and its advantages. The advantages being that significantly less
computation time is required to finish the tracking. And because there some-
times are slow moving cells, we might get dark spots in the images. These dark
spots manifest as regions of the velocity field being zero, while in fact nanopar-
ticles are moving as usual behind the cells. This can be mitigated with using
the α > 0. The disadvantages of using α = 1 that the nanoparticles flowing
in the zebrafish veins flow faster and slower at regular intervals, because of the
heartbeat of the zebrafish. And an average velocity field over all the images will
not capture this phenomenon.

If α ∈ (0, 1), the ’ensemble PIV contribution’ option calculates the velocity
field as a linear combination of the ensemble PIV velocity field and the current
image to image PIV velocity field. Let E be the ensemble PIV velocity field and
I the image to image PIV velocity field, then linear combination of E and I is
implemented as follows:

F = I · (1 − α) + E · α (2.3)
In point 4 the ’simplify images contribution’ refers again to a inputted num-
ber in the interval [0, 1]. It creates a separate image where a white dot, or circle,
(with its radius being the same as the particles) will be drawn at the given par-
ticle coordinate on a black canvas, and smoothed out with a Gaussian blur to
resemble a real particle. This simplified image is then scaled such that the max-
imum brightness intensity of the dots, or circles, is the same as the maximum
brightness intensity of the particles in the source image. This ’simplification’ of
the images is done to eliminate noise and faint particles from being included in
the PIV velocity field calculation. But because the veins may at times not be
straight, bend in inwards and outwards toward the camera, particles may move
out of the focal plane and lose its brightness intensity. This may cause these
particles to not be identified in point 2. This may lead to regions on the ’simpli-
fied’ image, where the white dots, or circles, have been drawn to be completely
devoid of activity. This makes the velocity field zero in those regions. Therefore
a the same linear combination as in equation 2.3 is employed where I in this
case is the unaltered image, and E is the black canvas with the white dots, or
circles, drawn on it. This way we can make the particles found in point 2 more

37
pronounced and dominant in the PIV calculation, and still make sure that we
get some non zero velocity field on all possible regions.

In point 8 the ’previous velocity contribution’ refers again to a inputted


number in the interval [0, 1], and this is used to create a linear combination just
like in equation 2.3, where I in this case is the current velocity field, and E is
the velocity field from the previous two images. The logic behind this is that the
particles positions are integrated with the velocity field to get the new particle
positions, and sometimes the velocity field has regions of zeros due to various
reasons, for example that they are moving behind a slow moving cell, or moving
out of the focal plane. Since the particles have momentum, it is reasonable to
assume that their velocity would not become zero in a short time span; from one
image to another. Therefore letting the velocity field be a linear combination
of the current velocity field and the previous helps to let particles keep moving.
This is especially necessary if point 12 is employed.

The last point, point 14, is visualized in figure 2.20. Here we assume that
particle trajectories that are ’close’ in time and space must necessarily be by
the same particle. If a trajectory for example ends or stops on image number
10, and another trajectory is started from image number 11 and in almost the
same location as the last trajectory ended, then we assume those two particle
trajectories were disconnected because of noise and/or inaccuracies in the ve-
locity field, and/or noise in the images, and they should be connected into one
trajectory.

38
(a) Three trajectories moving in the same direction. (b) Two trajectories moving in the same direction.

Figure 2.20: A ’search radius’ of 2 was used to connect the two trajectories in
figure 2.20a that are on the same line to get only one trajectory as seen in figure
2.20b.

2.4 Running the PTV Code


To run the PTV code we need to execute the script ’runPTV.m’. And as soon
as we do, a dialog box will ask for the folder the images are placed in, and after-
wards a dialog box with several options as seen in figure 2.21 will pop up. After
having filled in the inputs, figure 2.22 will appear and give you an interactive
way of determining the brightness intensity threshold to employ. Then figure
2.25 will pop up, and here you can fine input all the different options.

The particle trajectories will be saved in an array named ’firstFoundTrack-


ingPoints’ and an array named ’sortedFFTP’ in the MatLab workspace. The
settings that are input into figure 2.25 are also saved in a structure array named
’settings’ in the MatLab workspace, and the contents of this structure array can
be seen in table 2.1.

Running the PTV code can take up to a few days (on a 4 core intel i7-7700K
at a fixed core clock speed of 5GHz with 32 GB ram at 3200 MHz PC) for an
image set depending on the resolution, amount of images and the settings used.

39
Figure 2.21: This dialog box gives the opportunity to skip every X images,
where X > 1, and/or to select a subset of the images. It is also possible to
input the particle diameter, select the filter to use and input the diameter of
the noise.

40
Figure 2.22: The left image is the original image, and Figure 2.23: The left image is the original image, and
the image to the right is the image with the selected the image to the right is the image with the selected
filter applied to it. filter applied to it and particles drawn at the particle
positions that were found due to the given threshold
from the threshold slider.

Figure 2.24: Figure 2.22 is before the threshold slider has been moved and figure
2.23 is after the threshold slider has been moved.

41
Figure 2.25: This dialog box gives the opportunity to decide wether to use mask
or not, change the brightness threshold, change the particle diameter, change the
filter, change the noise length, input the PIV overlap percentage, select the PIV
subwindow and the PIV search range, input the tracking search radius, input the
number of frames particles may disappear from view, wether to replace outliers
with or without mask or not at all, the42 percentage of contribution the ensemble
PIV should have, the percentage of contribution simplifying the images (drawn
particles) should have, the precentage of contribution the velocity field from the
previous PIV should have on the current velocity field, the amount of distorted
passes, what subpixel interpolation algorithm to use, wether to plot the PIV
signal to noise ratio, how long the shortest trajectories should be, and lastly
wether to plot the trajectories or not.
Settings field Settings value
images: 1×10 cell
imageFolder: ’C:\Images\’
masks: {’InvertedMask.png’}
maskFolder: ’C:\Images\Mask\PIVMask’
threshold: 1.1148
particleLength: 5
filter: ’Aggressive’
noiseLength: 1
overlap: 0.5000
subWindow: [120 40]
searchArea: [40 12]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 2.1: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

2.4.1 Replace Outliers With or Without Mask


Replacing outliers with mask a mask can be seen in figure 2.26. The outline of
the mask becomes blocky as it sets all the values outside of the mask to NaN
(not a number). Since the PTV code only samples the PIV velocity fields at
points within the map always, it is not needed to remove outliers with a mask.
Removing outliers without a mask is just as effective. Removing outliers with
a mask is recommended.

43
Figure 2.26: Outliers have been removed with a mask.

2.4.2 Signal to Noise Ratio


Inputting ’Yes’ in the ’Plot PIV Signal To Noise Ratio’ option in figure 2.25,
will plot the signal to noise ratio from and it is a way of checking the quality
of the PIV. A ’blocky’ and low resolution PIV signal to noise ratio, as seen in
figure 2.27, may indicate that there is not enough particles. The way to improve
the PIV signal to noise ratio is to possibly use larger subwindows so that more
particles are included [11].

44
Figure 2.27: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows. This plot shows that
the subwindows either could have been increased or that there is not enough
particles in the source images in general.

2.4.3 Remove Trajectories


The option ’Remove trajectories smaller than X points:’ in figure 2.25 does ex-
actly that. It sorts the particle trajectories according to their ID and removes
any trajectory from the list that consists of only X coordinates. This option can
help with removing particle trajectories that have been connected due to noise.
With this option we assume that particle trajectories are necessarily made up
of more than X coordinates. The faster the particles move, the longer particle
trajectories there will be and with less coordinates. So this value has to be
selected carefully, as it only looks at the coordinates in the particle trajectories
and not the distance traveled.

If the dialog box field ’Remove trajectories outside of mask:’ in figure 2.25
is filled with ’Yes’, then we will remove particle trajectories that cross over the
mask. If a mask has not been selected in figure 2.25 then a dialog box will
ask for a mask image. If no mask image is selected then it exits the, and does
not remove any trajectories. If a mask is selected then it will go through every
two coordinates in a particle trajectory and check along the line between those
coordinates whether the trajectory is outside of the mask or not. If it is out-
side, then the whole trajectory is removed. This option may remove trajectories

45
around the the edge that should not be removed. After removing the particle
trajectories, they are saved as sortedFFTP in the workspace.

2.4.4 Plot Trajectories


The last option in figure 2.25 is to whether to plot the particle trajectories or
not. This plots the ’sortedFFTP’ particle trajectories, as discussed in section
2.4.3 on page 45, on the first source image in the set of images, on the vein
mask distance image (discussed in section 2.2.4), and lastly on the magnitude
of the velocity field. The three trajectory plots are plotted as seen in figure ,
and respectively. The velocity field magnitude is defined as,

q
|V | = Vx2 + Vy2 , (2.4)

where Vx and Vy are the Velocity fields in x- and y- direction respectively.

Figure 2.28: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the first
image in a image set.

46
Figure 2.29: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

47
Figure 2.30: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

2.5 Extract Data from Particle Trajectories


After each run of ’runPTV.m’ script (see section 2.4), the unaltered particle
tracks, the sorted particle tracks, PIV velocity fields of the last two images, in-
terpolated ensemble velocity field and the interpolated velocity field of the last
two images, the signal to noise ratio and the settings inputted in figure 2.25
will be saved in the work space of MatLab with its name concatenated with an
underscore and a unique number. Now it is possible to extract more data from
the saved data by running the script ’plotAndCalculateData.m’ [6]. We will go
through how this script is set up and how we calculate the angle of a particle
trajectory relative to the shape of the vein, and how we do a power law fit on
the relative distance of a particle trajectory to the vein margin, or border.

When running ’plotAndCalculateData.m’ script, a dialog box, as seen in fig-


ure 2.31, will pop up asking for the unique number associated with the outer,
inner, and full trajectories data, respectively. Because running the same image
set with different masks, as seen in section 2.2.3, will result in different sets of
data. Settings the number to 0 in any of the fields will ignore the set of instruc-
tions that has to do with that data set.

The script will plot figure 2.32, 2.33, 2.34, 2.35, 2.36 and a set of values as

48
seen in table 2.2. If a number for the ’outer’ and ’inner’ data are inputted then
the trajectories from both data sets will be plotted together in the same way as
can be seen in the previously mentioned figures.

In table 2.2 we see ’angle’ and it is the angle used to calculate ’percentage-
OfTrajectoriesAngle’ which is the percentage of particle trajectories that had an
angle greater than ’angle’ in relation to the reference line (the red line in figure
2.33). ’percentageOfTrajectoriesTheta’ is the percentage of particle trajectories
that had an angle greater than 0 in relation to the reference line. ’signChange-
Count’ is a number describing the number of local minima and maxima in the
reference line. And lastly ’thetaMinMax’ gives the minimum and maximum an-
gle among all the angles, or θ, found. The process of how these are calculated
are discussed further in section 2.5.1 on 55.

Below we can see the first lines of the code in the ’plotAndCalculateData.m’
script. The last four lines are the default values used. These can be changed
before running the script.

1 prompt = { ’ Outer T r a j e c t o r i e s : 0 , 1 , 2 e t c ; 0 = no data . ’ , ’ I n n e r


T r a j e c t o r i e s : 0 , 1 , 2 e t c ; 0 = no data . ’ , ’ F u l l T r a j e c t o r i e s :
0 , 1 , 2 e t c ; 0 = no data . ’ } ;
2 d l g _ t i t l e = ’ Plot T r a j e c t o r i e s . ’ ;
3 num_lines = 1 ;
4 i f ( e x i s t ( ’ uniqueDataNameCounter ’ , ’ v a r ’ ) )
5 i f ( uniqueDataNameCounter == 1 )
6 d e f a u l t a n s = { num2str ( uniqueDataNameCounter ) , ’ 0 ’ , ’ 0 ’ } ;
7 e l s e i f ( uniqueDataNameCounter == 2 )
8 d e f a u l t a n s = { num2str ( uniqueDataNameCounter −1) , num2str (
uniqueDataNameCounter ) , ’ 0 ’ } ;
9 e l s e i f ( uniqueDataNameCounter == 3 )
10 d e f a u l t a n s = { num2str ( uniqueDataNameCounter −2) , num2str (
uniqueDataNameCounter −1) , num2str ( uniqueDataNameCounter ) } ;
11 else
12 d e f a u l t a n s = { num2str ( uniqueDataNameCounter −2) , num2str (
uniqueDataNameCounter −1) , num2str ( uniqueDataNameCounter ) } ;
13 end
14 else
15 defaultans = { ’0 ’ , ’0 ’ , ’0 ’ };
16 end
17 answer = i n p u t d l g ( prompt , d l g _ t i t l e , num_lines , d e f a u l t a n s ) ;
18
19 o u t e r D a t a = s t r 2 d o u b l e ( c e l l 2 m a t ( answer ( 1 ) ) ) ;
20 i n n e r D a t a = s t r 2 d o u b l e ( c e l l 2 m a t ( answer ( 2 ) ) ) ;
21 f u l l D a t a = s t r 2 d o u b l e ( c e l l 2 m a t ( answer ( 3 ) ) ) ;
22
23 %I n p u t v a l u e s used f o r c a l c u l a t i o n o f t h e p a r t i c l e t r a j e c t o r i e s ’ s
angle to
24 %a r e f e r e n c e l i n e
25 framesMovement = 1 ;
26 useMaskLine = 1 ;
27 angleFull = 10;
28 angleCombined = 1 0 ;

49
Figure 2.31: The first dialog box that appears after running the code ’plotAnd-
CalculateData.m’.

50
Figure 2.32: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

51
Figure 2.33: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

52
Figure 2.34: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

53
Figure 2.35: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The white arrows are plotted on the last coordinate in the particle
trajectory of all the unaltered particle trajectories (’firstFoundParticleTracks’
as discussed in section 2.4 on page 39) and the size of the arrow indicates the
mean particle velocity. The background is the magnitude of the velocity field
with the colorbar showing the velocity in pixels per frame. The x- and y-axis
shows pixels.

54
Figure 2.36: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The white arrows are plotted on the last coordinate in the particle
trajectory of the altered particle trajectories (’sortedFFTP’ as discussed in sec-
tion 2.4.3 on page 45) and the size of the arrow indicates the mean particle
velocity. The background is the magnitude of the velocity field with the color-
bar showing the velocity in pixels per frame. The x- and y-axis shows pixels.

Variable Names Output in terminal


angle 10
framesMovement 1
signChangeCount 14
percentageOfTrajectoriesTheta 16.0839
percentageOfTrajectoriesAngle 9.4406
thetaMinMax 1.5482 and 135.0000

Table 2.2: Output from running ’plotAndCalculateData.m’ script. The variable


names, that will appear in the MatLab workspace and in the Matlab terminal,
will have ’Outer’, ’Inner’, ’Combined’ and/or ’Full’ concatenated to these vari-
able names depending on what set of data the script is run with.

2.5.1 Calculate Angle of Particles


The script ’plotAndCalculateData.m’ (discussed in section 2.5 on page 48) calls
on the MatLab function ’CalculateParticleAngle’. This function calculates the
the angle of the last known trajectory direction to a reference line that crosses

55
through the middle of the vein, that can either be manually drawn or be gener-
ated from the vein mask as seen in figure 2.33 on page 52. This reference line is
assumed to be the approximated flow direction throughout the vein. And this
function helps to quantify how many of the particles trajectories will end up in
the vein margin.

The function takes four input values, where two of them are mandatory.
These two are the particle trajectories and a vein mask. The two last optional
inputs are ’framesMovement’ and ’useMaskLine’. By default ’framesMovement’
is set to 1 and ’useMaskLine’ is set to 1. We will go through each step of that
function and the mathematical principles employed.

1. If ’useMaskLine’ is set to 1, then the reference line through the middle of


the vein is generated from the mask by finding the distance of the vein
mask (as in section 2.2.4 on page 26) and extracting the max values along
the x-direction. If ’useMaskLine’ is set to 0, then a dialog box will pop up
asking for the reference line to be drawn on the map by clicking from left
to right, and these points are saved after pressing ’enter’ on the keyboard.
2. The selected endpoints from point 1 is plotted on top of the vein mask as
seen in figure 2.33 on page 52.
3. Extract the last two coordinates from every particle trajectory. Check if
the last recorded velocity of the particle has a velocity greater than the
distance from its current position to the closest vein margin multiplied by
the inverse of ’framesMovement’. If it passes the check, then save those
two coordinates.
4. Find the slope and bias of the line between the last two coordinates found
in point 3.
5. Check if the particle is above or below the reference line from point 1.
6. Check if the particle is moving up towards the vein margin or down towards
the vein margin, depending on point 5. If true, then execute point 7.
7. Calculate the angle between the lines from point 4 and the reference lines
from point 1, and save the angle in degrees.
8. Calculate the number of local minima and maxima there are from the
reference line from point 1.

By using the reference line from point 1, we are assuming that the flow di-
rection is flowing along the line shown in figure 2.33 on page 52. And in point
3, we assume that the the particles will keep moving along the line between
the two extracted coordinates for a given number of frames, ’framesMovement’.
This means that if ’framesMovement’ is set to 3, then we assume that the par-
ticle is moving with the same velocity, in the same direction for the next three

56
frames, and after a maximum of three frames, the particle will have reached
the vein margin. The distances from the particle position to the vein margin is
calculated with the mask as discussed in 2.2.4 on 26.

In point 4 equation 2.5 and 2.6 are employed to calculate the slope and bias.

y1 − y0
a= (2.5)
x1 − x0

b = y0 − a · x0 (2.6)
In point 5 and 6 we assume that the vein is imaged horizontally and not
vertically and we want to make sure that the particle is moving away from the
reference line and towards the vein margin. In point 3 the particle trajectories’
direction was not considered and if the particle is crossing the reference line
then it means that the particle is not moving towards the closest vein margin,
which makes the assumption for point 3 not hold as it needs more than ’frames-
Movement’ amount of frames to reach the vein margin.

In point 7 we use the following equation to calculate the angle,


  
arctan a1 −a0 a0 ∈ R
θ= 1+a1 ·a0
(2.7)
90° − arctan a1 otherwise
 

where a1 and a0 are the slopes of the main line in figure 2.33 and the lines
constructed with equation 2.5 and 2.6 from the last two coordinates of the par-
ticle trajectories respectively. The second part of the equation 2.7 is for lines
that move vertically and thus having a 90°angle with the x-axis. The slope is
not defined for such vertical lines because x1 = x0 in this case and equation 2.5
is then not defined.

In the last point, point 8, we want to quantify how many local minima and
maxima the vein has so that we can judge if the veins structure affects how
many particle trajectories are likely to move into the vein margin.

2.5.2 Fit Power Law


By employing a nonlinear least-squares solver on the blue circle data in figure
2.32, we can find a and b in equation 2.8. We want to find out if there is a
power law distribution of the particle trajectories mean distance from the vein
margin. If a < 1 or a > 1 the power law fit tells us that the flow through the
vein is a non-Newtonian pseudoplastic and dilatant fluid respectively [9]. Blood
is a pseudoplastic non-Newtonian fluid so we expect a < 1 [24]. An example of
a dilatant non-Newtonian fluid is cornstarch mixed with water. The power law

57
curve is as follows,

b · xa (xn − x)a , x ∈ [0, xn ] (2.8)

2.6 Crop Image


Some of the image data are as seen in figure 2.37 and as such there are un-
interesting regions that increases the computational load and can significantly
slow down the Particle Tracking Velocimetry (PTV). Running the ’cropIma-
gesInFolder.m’ script will open a dialog box asking for the folder of the images.
Afterwards a plot of the first image in the folder will pop up and it is then
possible to click and hold the left mouse button and drag to mark the area to
be cropped out of the source images. The cropped images will be saved in a
seperate folder in the same folder as the source images.

58
Figure 2.37: Source image with regions of no nanoparticle flow activity.

Figure 2.38: Cropped source image in figure 2.37 with ’cropImagesInFolder.m’


script.

Figure 2.39: Reducing computational load by cropping source images such that
only the regions of interest is used in the PIV calculation.

59
Chapter 3

Results

In this chapter we will go through the results of the PTV on various image
sets; PIV signal to noise plot, the plots of the particle trajectories, the distribu-
tion of said particle trajectories throughout the vein and the power law fit, the
percentage of particle trajectories moving into the vein margin and number of
particles found per frame. The last two plots discussed in section 2.5 on page
48 are omitted as the plots in section 2.4.4 on page 46 are sufficient to illustrate
the nanoparticle tracks. The ’imageFolder’ and ’maskFolder’ from the table in
section 2.4 on page 39 are omitted as they are not relevant. But all the figures
and tables (in .txt files) discussed throughout chapter 2 on page 14. But they
are all available on the github regardless [6].

3.1 800 nm Nanoparticles Image Sets


All the results from image sets that contain 800 nm nanoparticles are presented
in this section. First an image from the image set, the PIV signal to noise ratio,
the mask used on that image set and the settings used are presented. Then the
extracted results are are similarly presented. The 800 nm image sets come in
increasingly higher FPS; 50 FPS, 150 FPS and 400 FPS. The higher the framer-
ate, the smaller the subwindows can be selected, but the higher the framerate,
the more the resolution had to be reduced through pixel binning and cropping.

3.2 Image Set 1 (800 nm)


The nanoparticles in figure 3.1 are very bright and there is almost no visible
noise. The PIV signal to noise ratio plot, the percentage of particles moving
towards the vein margin table and the number of particles identified per image
plot are not presented for this image set as there was an error in the software

60
of these calculations. This image set was acquired at 50 FPS.

Figure 3.1: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2180 images and the dimensions are 1021x194 pixels.

61
Figure 3.2: The top image is the sum of 2180 images. The bottom image is a
binary image given by running a Gaussian filter over the top image and threshold
it. The image contains 1021x194 pixels.

62
Settings field Settings value
images: 1×2180 cell
masks: {’InvertedMask.png’}
threshold: 1.8000
particleLength: 4
filter: ’aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [70 30]
searchArea: [30 14]
trackingSearchRadius: 2
particleSkippedFrames: 6
replaceOutliers: 2
ensembleContribution: 0.7500
simplifyContribution: 0.7500
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 1
subpixel: {’none’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.1: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.2.1 Particle Trajectories


Because the density of nanoparticles in this image set is rather low, there are not
many particle trajectories, but they are all moving consistently in one direction
so at least it is not disturbed by noise.

63
Figure 3.3: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

64
Figure 3.4: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the magni-
tude of the velocity field.

3.2.2 Particle Trajectory Distribution Histograms and Power


Law Fit
The short particle trajectories moving from the top down have skewed the his-
togram distribution significantly. Here a = 0.2997 which means that the distri-
bution of particles indicates that the fluid is pseudoplastic non-Newtonian like
blood, but this only holds if the trajectories at the vein margin are removed
from the histogram distribution.

65
Figure 3.5: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.3 Image Set 2 (800 nm)


The nanoparticles in figure 3.6 are very bright and there is almost no visible
noise. The PIV signal to noise ratio in figure 3.7 has a high resolution. This
image set was acquired at 150 FPS.

Figure 3.6: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2557 images and the dimensions are 826x157 pixels.

66
Figure 3.7: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

Figure 3.8: The top image is the sum of 2557 images. The bottom image is a
binary image given by running a Gaussian filter over the top image and threshold
it. The image contains 826x157 pixels.

67
Settings field Settings value
images: 1×2557 cell
masks: {’InvertedMask.png’}
threshold: 0.5000
particleLength: 5
filter: ’aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [120 40]
searchArea: [40 12]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 3
subpixel: {’3x3’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.2: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.3.1 Particle Trajectories


Because the density of nanoparticles in this image set is rather low, there are not
many particle trajectories, but they are all moving consistently in one direction
so at least it is not disturbed by noise.

68
Figure 3.9: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

69
Figure 3.10: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.3.2 Particle Trajectory Distribution Histograms and Power


Law Fit
The short particle trajectories moving from the top down have skewed the his-
togram distribution a bit toward zero, but the majority of the particles flow
along the center of the vein. Here a = 0.5015 which means that the distribution
of particles indicates that the fluid is pseudoplastic non-Newtonian like blood.

70
Figure 3.11: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.3.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 8.0147% of the particle trajectories did not flow parallel to the reference
line in figure 3.12, and only 3.3990% had a deviation of more than 10 °. The
particle trajectories that deviated from the reference line are also likely to hit
the vein margin within the next frame. The maximum θ is 90°which is due to
the smaller particle trajectories moving from the top downwards.

71
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 16
percentageOfTrajectoriesTheta 8.0147
percentageOfTrajectoriesAngle 3.3990
thetaMinMax 2.2026 and 90.0000

Table 3.3: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.12: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.3.4 Particles Found per Frame


Figure 3.13 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 20 to 95.

72
Figure 3.13: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.4 Image Set 3 (800 nm)


The nanoparticles in figure 3.14 are very bright and there is almost no visible
noise. The PIV signal to noise ratio in figure 3.15 has a high resolution. This
image set was acquired at 150 FPS.

Figure 3.14: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2937 images and the dimensions are 510x97 pixels.

73
Figure 3.15: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

Figure 3.16: The top image is the sum of 2937 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 510x97 pixels.

74
Settings field Settings value
images: 1×2937 cell
masks: {’InvertedMask.png’}
threshold: 0.3250
particleLength: 5
filter: ’Aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [80 30]
searchArea: [30 10]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 3
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.4: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.4.1 Particle Trajectories


The particle trajectories are all moving consistently in one direction, but a very
small minority of the particles trajectories are moving in the opposite direction
of the flow. This perhaps indicates that the ’trackingSearchRadius’ set to 2 is
too lenient, or that the threshold was too low.

75
Figure 3.17: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

76
Figure 3.18: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.4.2 Particle Trajectory Distribution Histograms and Power


Law Fit
The short particle trajectories moving from the top down have skewed the his-
togram distribution a bit toward zero, but the majority of the particles flow
along the center of the vein. Here a = 0.7501 which means that the distribution
of particles indicates that the fluid is pseudoplastic non-Newtonian like blood.

77
Figure 3.19: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.4.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 6.6170% of the particle trajectories did not flow parallel to the reference
line in figure 3.20, and only 3.8967% had a deviation of more than 10 °. The
particle trajectories that deviated from the reference line are also likely to hit
the vein margin within the next frame. The maximum θ is 135°which is due to
some of the particle trajectories moving in the opposite direction of the flow.

78
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 12
percentageOfTrajectoriesTheta 6.6170
percentageOfTrajectoriesAngle 3.8967
thetaMinMax 3.5763 and 135.0000

Table 3.5: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.20: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.4.4 Particles Found per Frame


Figure 3.21 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 10 to 120.

79
Figure 3.21: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.5 Image Set 4 (800 nm)


The nanoparticles in figure 3.22 are very bright and there is almost no visible
noise. The PIV signal to noise ratio in figure 3.23 has a high resolution. This
image set was acquired at 400 FPS.

Figure 3.22: This shows a singular vein with nanoparticles flowing through them.
The image set contains 11986 images and the dimensions are 511x72 pixels.

80
Figure 3.23: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

Figure 3.24: The top image is the sum of 11986 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 511x72 pixels.

81
Settings field Settings value
images: 1×11986 cell
masks: {’InvertedMask.png’}
threshold: 0.0115
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [32 12]
searchArea: [12 4]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.6: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.5.1 Particle Trajectories


The particle trajectories are all moving consistently in one direction, but the tra-
jectories are very short. This is due to the search range being too big compared
to the movement of the particles from frame to frame, and perhaps the ’track-
ingSearchRadius’ could have been lower than 1 and the threshold increased.

82
Figure 3.25: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

83
Figure 3.26: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.5.2 Particle Trajectory Distribution Histograms and Power


Law Fit
The histogram distribution is a bit skewed toward zero, but the majority of the
particles flow along the center of the vein. Here a = 1.1001 which means that
the distribution of particles indicates that the fluid is dilatant non-Newtonian
unlike blood.

84
Figure 3.27: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.5.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 0.0462% of the particle trajectories did not flow parallel to the reference
line in figure 3.28. Only 0.0462% had a deviation of more than 10 °as the mini-
mum θ is 18.4349°. The particle trajectories that deviated from the reference line
are also likely to hit the vein margin within the next frame. The maximum θ is
45.0000°which means that all the particle trajectories flow in the same direction.

85
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 7
percentageOfTrajectoriesTheta 0.0462
percentageOfTrajectoriesAngle 0.0462
thetaMinMax 18.4349 and 45.0000

Table 3.7: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.28: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.5.4 Particles Found per Frame


Figure 3.29 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 10 to 65.

86
Figure 3.29: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.6 400 nm Nanoparticles Image Sets


All the results from image sets that contain 400 nm nanoparticles are presented
in this section. First an image from the image set, the PIV signal to noise ratio,
the mask used on that image set and the settings used are presented. Then the
extracted results are are similarly presented. The 400 nm image sets come in
increasingly higher FPS; 50 FPS, 150 FPS and 400 FPS just like the 800 nm
image sets. The higher the framerate, the smaller the subwindows can be se-
lected. But the higher the framerate, the more the resolution had to be reduced
through pixel binning and cropping.

3.7 Image Set 1 (400 nm)


The nanoparticles in figure 3.30 are distinguishable. The PIV signal to noise
ratio in figure 3.31 does have a good resolution and does not look very blocky.
This image set was acquired at 150 FPS.

87
Figure 3.30: This shows a singular vein with nanoparticles flowing through them.
The image set contains 1999 images and the dimensions are 511x72 pixels.

Figure 3.31: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

88
Figure 3.32: The top image is the sum of 1999 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 511x72 pixels.

89
Settings field Settings value
images: 1×1999 cell
masks: {’InvertedMask.png’}
threshold: 0.0385
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [40 12]
searchArea: [12 4]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.8: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.7.1 Particle Trajectories


The particle trajectories are moving consistently in one direction but there is
an obvious artifacting visible. The particle trajectories are very short due the
search range being too big compared to the movement of the particles.

90
Figure 3.33: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

91
Figure 3.34: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.7.2 Particle Trajectory Distribution Histograms and Power


Law Fit
The particle trajectories at the top, middle part of the plot has skewed the
histogram distribution toward zero. Here a = 0.7156 which means that the
distribution of particles indicates that the fluid is pseudoplastic non-Newtonian
like blood.

92
Figure 3.35: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.7.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 0.1775% of the particle trajectories did not flow parallel to the reference
line in figure 3.36, and the same percentage had a deviation of more than 10
°because the minimum θ is 11.3099°. The particle trajectories that deviated
from the reference line are also likely to hit the vein margin within the next
frame. The maximum θ was 45°which means that all the particle trajectories
moved in one direction.

93
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 9
percentageOfTrajectoriesTheta 0.1775
percentageOfTrajectoriesAngle 0.1775
thetaMinMax 11.3099 and 45.0000

Table 3.9: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.36: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.7.4 Particles Found per Frame


Figure 3.37 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 15 to 45.

94
Figure 3.37: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.8 Image Set 2 (400 nm)


The nanoparticles in figure 3.38 are distinguishable. The PIV signal to noise
ratio in figure 3.39 does have a good resolution and does not look very blocky.
This image set is acquired at 150 fps.

Figure 3.38: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2937 images and the dimensions are 510x97 pixels.

95
Figure 3.39: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

96
Figure 3.40: The top image is the sum of 2937 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 510x97 pixels.

97
Settings field Settings value
images: 1×2937 cell
masks: {’InvertedMask.png’}
threshold: 0.1220
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [50 18]
searchArea: [18 6]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.10: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.8.1 Particle Trajectories


The particle trajectories are moving consistently in one direction and this is an
indication of having selected a good brightness intensity threshold, but there is
an area in the middle of the vein mask (around x=210 and y=50) that has no
particle trajectories. This area is as big as the subwindow size and the velocity
field there is zero. Playing the image set in sequence shows that in this area
there is a stuck particle that is splitting the flow to go in both left and right
direction so they cancel out.

98
Figure 3.41: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

99
Figure 3.42: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.8.2 Particle Trajectory Distribution Histograms and Power


Law Fit
Here a = 0.8331 which means that the distribution of particles indicates that
the fluid is pseudoplastic non-Newtonian like blood. The Histogram distribution
does fit well to the power law.

100
Figure 3.43: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.8.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 4.0798% of the particle trajectories did not flow parallel to the reference
line in figure 3.44, and 2.4658% had a deviation of more than 10 °. The particle
trajectories that deviated from the reference line are also likely to hit the vein
margin within the next frame. The maximum θ was 90°which means that not
all the particle trajectories moved in one direction.

101
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 14
percentageOfTrajectoriesTheta 4.0798
percentageOfTrajectoriesAngle 2.4658
thetaMinMax 4.7636 and 90.0000

Table 3.11: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.44: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.8.4 Particles Found per Frame


Figure 3.45 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 20 to 180.

102
Figure 3.45: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.9 Image Set 3 (400 nm)


The nanoparticles in figure 3.46 are distinguishable. The PIV signal to noise
ratio in figure 3.47 does have a good resolution and does not look very blocky.
This image set was acquired at 150 FPS.

Figure 3.46: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2557 images and the dimensions are 826x157 pixels.

103
Figure 3.47: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

Figure 3.48: The top image is the sum of 2557 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 826x157 pixels.

104
Settings field Settings value
images: 1×2557 cell
masks: {’InvertedMask.png’}
threshold: 0.3500
particleLength: 4
filter: ’Aggressive’
noiseLength: 1
overlap: 0.7500
subWindow: [90 30]
searchArea: [30 10]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.12: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.9.1 Particle Trajectories


The particle trajectories are moving consistently in one direction. The particle
trajectories short length is most likely due to the threshold being too high, or
that there are not enough images. The magnitude velocity field is also approx-
imately zero which makes the particle trajectories found on the top side very
short.

105
Figure 3.49: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

106
Figure 3.50: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.9.2 Particle Trajectory Distribution Histograms and Power


Law Fit
The particle trajectories at the top part of the plot has skewed the histogram
distribution toward zero. Here a = 0.0545 which means that the distribution of
particles indicates that the fluid is pseudoplastic non-Newtonian like blood, but
the power law does not fit because of the left skew.

107
Figure 3.51: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.9.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 1.5097% of the particle trajectories did not flow parallel to the reference
line in figure 3.52, and 0.9535% had a deviation of more than 10 °. The particle
trajectories that deviated from the reference line are also likely to hit the vein
margin within the next frame. The maximum θ was 135°which means that not
all the particle trajectories moved in one direction.

108
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 16
percentageOfTrajectoriesTheta 1.5097
percentageOfTrajectoriesAngle 0.9535
thetaMinMax 2.8624 and 135.0000

Table 3.13: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.52: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.9.4 Particles Found per Frame


Figure 3.53 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 20 to 160.

109
Figure 3.53: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.10 Image Set 4 (400 nm)


The nanoparticles in figure 3.54 are distinguishable. The PIV signal to noise
ratio in figure 3.55 does have a good resolution and does not look very blocky.
This image set was acquired at 150 FPS.

Figure 3.54: This shows a singular vein with nanoparticles flowing through them.
The image set contains 2937 images and the dimensions are 510x97 pixels.

110
Figure 3.55: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

111
Figure 3.56: The top image is the sum of 2937 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 510x97 pixels.

112
Settings field Settings value
images: 1×2937 cell
masks: {’InvertedMask.png’}
threshold: 0.1180
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 18]
searchArea: [20 6]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.14: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.10.1 Particle Trajectories


The particle trajectories are moving consistently in one direction and this is an
indication of having selected a good brightness intensity threshold, but there is
an area in the middle of the vein mask (around x=210 and y=50) that has no
particle trajectories. This area is as big as the subwindow size and the velocity
field there is zero. Playing the image set in sequence shows that in this area
there is a stuck particle that is splitting the flow to go in both left and right
direction so they cancel out.

113
Figure 3.57: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

114
Figure 3.58: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.10.2 Particle Trajectory Distribution Histograms and


Power Law Fit
The particle trajectories at the top part of the plot has skewed the histogram
distribution toward the right. Here a = 0.8642 which means that the distri-
bution of particles indicates that the fluid is pseudoplastic non-Newtonian like
blood.

115
Figure 3.59: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.10.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 4.4225% of the particle trajectories did not flow parallel to the reference
line in figure 3.60, and 3.2632% had a deviation of more than 10 °. The particle
trajectories that deviated from the reference line are also likely to hit the vein
margin within the next frame. The maximum θ was 90°which means that not
all the particle trajectories moved in one direction.

116
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 14
percentageOfTrajectoriesTheta 4.4225
percentageOfTrajectoriesAngle 3.2632
thetaMinMax 4.3987 and 90.0000

Table 3.15: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.60: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.10.4 Particles Found per Frame


Figure 3.61 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 20 to 160.

117
Figure 3.61: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.11 200 nm Nanoparticles Image Sets


All the results from image sets that contain 200 nm nanoparticles are pre-
sented in this section. The first two image sets are of the zebrafish with many
nanoparticles injected, and the rest of the image sets are of approximately 1/4
less nanoparticles injected. For each image set first an image from the image
set, the PIV signal to noise ratio, the mask used on that image set and the
settings used are presented, and then lastly, the extracted results.

3.12 Image Set 1 (200 nm)


The nanoparticles in figure 3.62 are distinguishable, but because there are so
many of them, it creates noise. To make the PIV signal to noise ratio better,
I selected a large subwindow, as seen in table 3.16, and figure 3.63 does have a
good resolution and does not look very blocky. This simply is an indication of
the quality of the PIV, but it is an important measuring stick.

118
Figure 3.62: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3987 images and the dimensions are 988x211 pixels.

Figure 3.63: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

119
Figure 3.64: The top image is the sum of 3987 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 988x211 pixels.

120
Settings field Settings value
images: 1×3987 cell
masks: {’InvertedMask.png’}
threshold: 0.0040
particleLength: 4
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [128 36]
searchArea: [40 12]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 1
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.16: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.12.1 Particle Trajectories


Because of the density of nanoparticles in this image set, the brightness in-
tensity threshold had to be carefully selected so that only the very brightest
nanoparticles were identified, otherwise it would be very easy to include noise
as particles and disturb the particle trajectories. The particle trajectories are
moving consistently in one direction and this is an indication of having selected
a good brightness intensity threshold.

121
Figure 3.65: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

122
Figure 3.66: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.12.2 Particle Trajectory Distribution Histograms and


Power Law Fit
Because the vein mask does not have uniform thickness, there are particle tra-
jectories that have skewed the power law fit to the right. This histogram shows
that a significant amount of the nanoparticles are flowing through the center
of the vein. Here a = 1.5727 which means that the distribution of particles
indicates that the fluid is dilatant non-Newtonian unlike blood.

123
Figure 3.67: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.12.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 4.2075% of the particle trajectories did not flow parallel to the reference
line in figure 3.68, and only 0.7829% had a deviation of more than 10 °. The
particle trajectories that deviated from the reference line are also likely to hit
the vein margin within the next frame. The maximum θ was 55.3048°which
means that all the particle trajectories moved in one direction.

Variable Names Output in terminal


angle 10
framesMovement 1
signChangeCount 8
percentageOfTrajectoriesTheta 4.2075
percentageOfTrajectoriesAngle 0.7829
thetaMinMax 1.6847 and 55.3048

Table 3.17: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

124
Figure 3.68: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.12.4 Particles Found per Frame


Figure 3.69 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 800 to 1700.

125
Figure 3.69: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.13 Image Set 2 (200 nm)


The nanoparticles in figure 3.70 are distinguishable and have a higher brightness
intensity and this is because we used binning to effectively reducing the reso-
lution by half. To make the PIV signal to noise ratio better, I selected a large
subwindow, as seen in table 3.18, and figure 3.71 does have a good resolution
and does not look very blocky concidering the resolution is half of the image set
in section 3.12. This simply is an indication of the quality of the PIV, but it is
an important measuring stick.

126
Figure 3.70: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3987 images and the dimensions are 494x105 pixels.

Figure 3.71: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

127
Figure 3.72: The top image is the sum of 3987 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 494x105 pixels.

128
Settings field Settings value
images: 1×3987 cell
masks: {’InvertedMask.png’}
threshold: 0.0113
particleLength: 3
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.18: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.13.1 Particle Trajectories


Because of the density of nanoparticles in this image set, the brightness in-
tensity threshold had to be carefully selected so that only the very brightest
nanoparticles were identified, otherwise it would be very easy to include noise
as particles and disturb the particle trajectories. The particle trajectories are
moving consistently in one direction and this is an indication of having selected
a good brightness intensity threshold.

129
Figure 3.73: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

130
Figure 3.74: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.13.2 Particle Trajectory Distribution Histograms and


Power Law Fit
The binning made the vein mask more precise and thereby the skewed power
law fit seen in section 3.12 is gone. This histogram shows that a significant
amount of the nanoparticles are flowing through the center of the vein, and that
almost none of them are at the vein margin. Here a = 1.2214 which means that
the distribution of particles indicates that the fluid is dilatant non-Newtonian
unlike blood.

131
Figure 3.75: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.13.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 3.7169% of the particle trajectories did not flow parallel to the reference
line in figure 3.76, and only 0.7991% had a deviation of more than 10 °. The
particle trajectories that deviated from the reference line are also likely to hit
the vein margin within the next frame. The maximum θ was 56.3099°which
means that all the particle trajectories moved in one direction.

Variable Names Output in terminal


angle 10
framesMovement 1
signChangeCount 7
percentageOfTrajectoriesTheta 3.7169
percentageOfTrajectoriesAngle 0.7991
thetaMinMax 3.1798 and 56.3099

Table 3.19: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

132
Figure 3.76: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.13.4 Particles Found per Frame


Figure 3.77 shows that there is no significant loss in brightness intensity due
to fading of the fluorescence in the nanoparticles because the linear fit has a
slope of almost 0. The amount of nanoparticles identified per frame does vary
from approximately 150 to 620. The increase in contrast by using binning and
the higher brightness intensity threshold employed has significantly reduced the
amount of particles identified per image compared to the image set in section
3.12.

133
Figure 3.77: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.14 Image Set 3 (200 nm)


The nanoparticles in figure 3.78 are distinguishable and there are less nanopar-
ticles than the previous two image sets, but the image is very noisy. I selected
a large subwindow, as seen in table 3.20. The PIV signal to noise ratio plot is
not available for this image set.

134
Figure 3.78: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3988 images and the dimensions are 340x75 pixels.

135
Figure 3.79: The top image is the sum of 3988 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 340x75 pixels.

136
Settings field Settings value
images: 1×3988 cell
masks: {’InvertedMask.png’}
threshold: 1.2500
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [80 30]
searchArea: [30 10]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 0
ensembleContribution: 0.7500
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’5x5ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.20: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.14.1 Particle Trajectories


Because of the density of nanoparticles in this image set, the brightness in-
tensity threshold had to be carefully selected so that only the very brightest
nanoparticles were identified, otherwise it would be very easy to include noise
as particles and disturb the particle trajectories. The particle trajectories are
moving consistently in one direction and this is an indication of having selected
a good brightness intensity threshold. But in a 20 pixel wide area on left and
right side of the image, the velocity field is erratic. This is due to the size of the
subwindow. Since we have used 75% overlap and the width of the subwindow is
80 pixels, 20 pixels will not be accurately cross correlated. This is why particle
trajectories have not been connected in these two regions.

137
Figure 3.80: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

138
Figure 3.81: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.14.2 Particle Trajectory Distribution Histograms and


Power Law Fit
Here the particle trajectories clearly are more concentrated around the lower
half of the vein and this histogram represents that by being skewed towards
zero. Here a = 0.3075 which means that the distribution of particles indicates
that the fluid is psedoplastic non-Newtonian like blood, but the fit is very bad
because of the skewed distribution.

139
Figure 3.82: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.14.3 Amount of Particles Moving Towards the Vein Mar-


gin
The ’percentageOfTrajectoriesTheta’ and ’percentageOfTrajectoriesAngle’ val-
ues are incorrect as they were divided by the wrong amount of trajectories. So
these are very large due to an error. The maximum θ was 45°which means that
all the particle trajectories moved in one direction.

Variable Names Output in terminal


angle 10
framesMovement 1
signChangeCount 2
percentageOfTrajectoriesTheta 13.4615
percentageOfTrajectoriesAngle 4.7009
thetaMinMax 4.7636 and 45

Table 3.21: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

140
Figure 3.83: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.14.4 Particles Found per Frame


Figure 3.84 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 20 to 135.

141
Figure 3.84: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.15 Image Set 4 (200 nm)


The nanoparticles in figure 3.85 are distinguishable and but there is a lot of
noise present and the resolution is low. The PIV signal to noise ratio is not
available but a large subwindow was chosen as there are not many nanoparti-
cles with high brightness intensities.

142
Figure 3.85: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3983 images and the dimensions are 472x107 pixels.

Figure 3.86: The top image is the sum of 3983 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 472x107 pixels.

143
Settings field Settings value
images: 1×3983 cell
masks: {’InvertedMask.png’}
threshold: 1.0800
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [80 20]
searchArea: [30 8]
trackingSearchRadius: 2
particleSkippedFrames: 10
replaceOutliers: 0
ensembleContribution: 0.7500
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 2
subpixel: {’5x5ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.22: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.15.1 Particle Trajectories


Because of the density of nanoparticles in this image set, the brightness in-
tensity threshold had to be carefully selected so that only the very brightest
nanoparticles were identified, otherwise it would be very easy to include noise
as particles and disturb the particle trajectories. The particle trajectories are
moving consistently in one direction but there are very few particle trajectories
because not enough particles were identified per frame. Lowering the threshold
introduces too much noise.

144
Figure 3.87: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

145
Figure 3.88: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.15.2 Particle Trajectory Distribution Histograms and


Power Law Fit
This histogram shows most of the trajectories are close to the vein margin,
but as there are not enough particle trajectories, this histogram, and power
law fit, does not represent the true flow in the vein. Here a = 0.3170 which
means that the distribution of particles indicates that the fluid is pseudoplastic
non-Newtonian like blood.

146
Figure 3.89: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.15.3 Amount of Particles Moving Towards the Vein Mar-


gin
The ’percentageOfTrajectoriesTheta’ and ’percentageOfTrajectoriesAngle’ val-
ues are incorrect as they were divided by the wrong amount of trajectories. So
these are very large due to an error. The maximum θ < 90 which means that
all the particle trajectories moved in one direction.

Variable Names Output in terminal


angle 10
framesMovement 1
signChangeCount 6
percentageOfTrajectoriesTheta 11.1765
percentageOfTrajectoriesAngle 5.5882
thetaMinMax 2.2026 and 45

Table 3.23: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

147
Figure 3.90: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.15.4 Particles Found per Frame


Figure 3.91 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately a few to 45 which is why there are so few particle trajectories.

148
Figure 3.91: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.16 Image Set 5 (200 nm)


The nanoparticles in figure 3.92 are distinguishable and have a higher brightness
intensity and this is because we used binning to effectively reducing the reso-
lution by half. To make the PIV signal to noise ratio better, I selected a large
subwindow, as seen in table 3.24, and figure 3.93 does have a good resolution
and does not look very blocky concidering the resolution is half of the image set
in section 3.12. This simply is an indication of the quality of the PIV, but it is
an important measuring stick.

149
Figure 3.92: This shows a singular vein with nanoparticles flowing through them.
The image set contains 3992 images and the dimensions are 290x50 pixels.

Figure 3.93: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

150
Figure 3.94: The top image is the sum of 3992 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 290x50 pixels.

151
Settings field Settings value
images: 1×3992 cell
masks: {’InvertedMask.png’}
threshold: 0.0051
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.24: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.16.1 Particle Trajectories


Because of the density of nanoparticles in this image set, the brightness in-
tensity threshold had to be carefully selected so that only the very brightest
nanoparticles were identified, otherwise it would be very easy to include noise
as particles and disturb the particle trajectories. The particle trajectories are
moving consistently in one direction and this is an indication of having selected
a good brightness intensity threshold.

152
Figure 3.95: A plot that appears after running the code ’runPTV.m’. The white
lines are the trajectories and the white dots with black outlines represents the
particle at the last coordinate in the trajectory. The background is the distance
to vein margin as discussed in section 2.2.4.

153
Figure 3.96: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.16.2 Particle Trajectory Distribution Histograms and


Power Law Fit
This histogram shows that a significant amount of the nanoparticles are flowing
through the center of the vein, and that almost none of them are at the vein
margin. Here a = 1.9413 which means that the distribution of particles indicates
that the fluid is dilatant non-Newtonian unlike blood.

154
Figure 3.97: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.16.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 0.2672% of the particle trajectories did not flow parallel to the reference
line in figure 3.98, and only 0.2138% had a deviation of more than 10 °. The
particle trajectories that deviated from the reference line are also likely to hit
the vein margin within the next frame. The maximum θ < 90 which means that
all the particle trajectories moved in one direction.

Variable Names Output in terminal


angle 10
framesMovement 1
signChangeCount 5
percentageOfTrajectoriesTheta 0.2672
percentageOfTrajectoriesAngle 0.2138
thetaMinMax 8.1301 and 45.0000

Table 3.25: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

155
Figure 3.98: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.16.4 Particles Found per Frame


Figure 3.99 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 10 to 90.

156
Figure 3.99: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.17 Image Set 6 (200 nm)


The nanoparticles in figure 3.100 are distinguishable and I selected a large sub-
window, as seen in table 3.26, but figure 3.101 looks very blocky.

Figure 3.100: This shows a singular vein with nanoparticles flowing through
them. The image set contains 3992 images and the dimensions are 396x75
pixels.

157
Figure 3.101: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

Figure 3.102: The top image is the sum of 3992 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 396x75 pixels.

158
Settings field Settings value
images: 1×3992 cell
masks: {’InvertedMask.png’}
threshold: 0.0051
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.26: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.17.1 Particle Trajectories


The nanoparticles are distinguishable in figure 3.100 and the threshold was
selected so that only the brightest nanoparticles were included. The particle
trajectories are moving in the same direction which means that the selected
threshold did not include noise.

159
Figure 3.103: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
distance to vein margin as discussed in section 2.2.4.

160
Figure 3.104: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.17.2 Particle Trajectory Distribution Histograms and


Power Law Fit
This histogram shows that a significant amount of the nanoparticles are flowing
closer to the lower part of the vein. Here a = 0.4441 which means that the
distribution of particles indicates that the fluid is pseudoplastic non-Newtonian
like blood. The power law does not fit well because of the skewed distribution.

161
Figure 3.105: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.17.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 7.6619% of the particle trajectories did not flow parallel to the reference
line in figure 3.106, and only 2.2117% had a deviation of more than 10 °. The
particle trajectories that deviated from the reference line are also likely to hit
the vein margin within the next frame since ’framesMovement’ is set to 1. The
maximum θ < 90 which means that all the particle trajectories moved in one
direction.

162
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 4
percentageOfTrajectoriesTheta 7.6619
percentageOfTrajectoriesAngle 2.2117
thetaMinMax 4.3987 and 54.4623

Table 3.27: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.106: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.17.4 Particles Found per Frame


Figure 3.107 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 10 to 90.

163
Figure 3.107: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.18 Image Set 7 (200 nm)


The nanoparticles in figure 3.108 are distinguishable and figure 3.109 has a good
resolution as I selected a large subwindow, as seen in table 3.28.

164
Figure 3.108: This shows a singular vein with nanoparticles flowing through
them. The image set contains 3983 images and the dimensions are 295x126
pixels.

Figure 3.109: A PIV signal to noise ratio plot where the size of the blocks are, or
the resolution of the plot is an indication of there potentially not being enough
particles in the image, and/or within the subwindows.

165
Figure 3.110: The top image is the sum of 3983 images. The bottom image
is a binary image given by running a Gaussian filter over the top image and
threshold it. The image contains 295x126 pixels.

166
Settings field Settings value
images: 1×3983 cell
masks: {’InvertedMask.png’}
threshold: 0.0057
particleLength: 2
filter: ’no’
noiseLength: 1
overlap: 0.7500
subWindow: [64 24]
searchArea: [20 8]
trackingSearchRadius: 1
particleSkippedFrames: 10
replaceOutliers: 2
ensembleContribution: 0.5000
simplifyContribution: 0.5000
blur: ’gaussian’
sigma: 0.5000
previousVelocityContribution: 0.5000
distortedPass: 0
subpixel: {’3x3ls’}
trajectoryLength: 2
removeLinesOutsideOfMask: {’Yes’}

Table 3.28: The settings structure array contains all the input values such that
comparing the quality of the PTV and rerunning the PTV code can be done
easily.

3.18.1 Particle Trajectories


The nanoparticles are distinguishable in figure 3.108 and the threshold was
selected so that only the brightest nanoparticles were included. The particle
trajectories are moving in the same direction which means that the selected
threshold did not include noise.

167
Figure 3.111: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
distance to vein margin as discussed in section 2.2.4.

168
Figure 3.112: A plot that appears after running the code ’runPTV.m’. The
white lines are the trajectories and the white dots with black outlines represents
the particle at the last coordinate in the trajectory. The background is the
magnitude of the velocity field.

3.18.2 Particle Trajectory Distribution Histograms and


Power Law Fit
This histogram shows that a significant amount of the nanoparticles are flowing
closer to the vein margin. The vein mask thickness is approximately uniform
which means that the skewed histogram is not due to the vein mask, but rather
due to the particle trajectories being close to the vein margin. Here a = 0.3168
which means that the distribution of particles indicates that the fluid is pseu-
doplastic non-Newtonian like blood. The power law does not fit well because of
the skewed distribution.

169
Figure 3.113: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The power law has been fitted to the histogram pillar centers. There
are 46 points in total. The histogram is comprised of the grey bins, the blue cir-
cles are the histogram bin values and the red line is the fitted power law curve.
The binned distances in pixels are on the x-axis and the number of particles
that fall within those given distance bins is on the y-axis.

3.18.3 Amount of Particles Moving Towards the Vein Mar-


gin
Only a 4.1802% of the particle trajectories did not flow parallel to the reference
line in figure 3.114, and only 2.3378% had a deviation of more than 10 °. The
particle trajectories that deviated from the reference line are also likely to hit
the vein margin within the next frame since ’framesMovement’ is set to 1. The
maximum θ = 90 which means that not all the particle trajectories moved in
one direction.

170
Variable Names Output in terminal
angle 10
framesMovement 1
signChangeCount 2
percentageOfTrajectoriesTheta 4.1802
percentageOfTrajectoriesAngle 2.3378
thetaMinMax 4.3987 and 90.0000

Table 3.29: Output from running ’plotAndCalculateData.m’ script. See section


2.5 for more information.

Figure 3.114: A plot that appears after running the code ’plotAndCalculate-
Data.m’. The red line is the vein reference line, and it is assumed that the flow
direction of particles is along this line.

3.18.4 Particles Found per Frame


Figure 3.115 shows that there is no significant loss in brightness intensity due to
fading of the fluorescence in the nanoparticles because the linear fit has a slope
of almost 0. The amount of nanoparticles identified per frame does vary from
approximately 30 to 220.

171
Figure 3.115: A plot that appears after running the code ’plotAndCalculate-
Data.m’. It shows the number of particles that was identified with a given
brightness intensity threshold for each image in the set. The blue line is the
number of particles identified from the images, and the red line is the linear fit
of that data. Along the x-axis is the frame number, and the y-axis shows the
number of particles identified.

3.19 100 nm Nanoparticles Image Sets


The image sets for 100 nm nanoparticles are not usable for tracking. The parti-
cles are not distinguishable as seen in figure 3.116. I ran a special an ensemble
over all the images with distorted passes to try to get some information out of
the flow and it can be seen in figure 3.117. It does not tell anything interesting
or new, but it is included for completeness sake.

The image in figure 3.116 has been enhanced for visibility in an image ed-
itor. The contrast and brightness has been increased. The bright white dots
that are visible on the top half of the image are not moving particles, rather
accumulation of nanoparticles that have gotten stuck at certain points. The
nanoparticles flowing through the bottom half of the image look like gaussian
noise with motion blur because the cameras exposure time could not be lowered
enough to capture the nanoparticles.

The average velocity field shown in figure 3.117 can only use the black spots
shown in figure 3.116, which are cells, for reference in calculating the velocity
field and this is not sufficient to get granular, detailed, information about the

172
velocity field as the subwindows have to be much too large.

Figure 3.116: This shows a singular vein with nanoparticles flowing through
them. The image set contains 1654 images and the dimensions are 2048x371
pixels.

Figure 3.117: A plot that appears after running the code ’PIVDistortedPass.m’.
It shows the average velocity field over all the images in the set.

3.20 Mean and STD of Percentage of Particle


Trajectories that are Likely to Hit the Vein
Margin
The percentage of particle trajectories that are likely to hit the vein margin
within the next frame is interesting. The mean percentage of particle trajecto-

173
ries that are likely to hit the vein margin for 800 nm, 400 nm and 200 nm yields
these results;

Nanoparticle size Mean STD


800 nm 2.4473% 2.0943%
400 nm 1.7150% 1.4029%
200 nm 1.2691% 0.9489%

Table 3.30: The mean and STD of the percentage of particle trajectories that
are likely to hit the vein margin within the next frame with a deviation from
the reference line greater than 10°.

Nanoparticle size Mean STD


800 nm 4.8926% 4.2549%
400 nm 2.5474% 2.0459%
200 nm 4.0067% 2.6220%

Table 3.31: The mean and STD of the percentage of all particle trajectories
that are likely to hit the vein margin within the next frame.

174
Chapter 4

Conclusion and Discussion

Is analysis, interpretation / synthesis and discussion professionally founded and


justified and clearly linked to the issue? Is the discussion at a high academic
level? Can the candidate apply his / her knowledge and skills in new areas and
place the results in a larger context?

Does the candidate give a reasonable assessment of the importance of the


results? Is the candidate critical of different sources of information? Are un-
certainties, such as method errors, measurement errors, and others considered
and discussed? Are relevant academic, occupational and research ethical issues
analyzed?

From the 16 image sets (4 image sets with 800 nm particles, 4 image sets
with 400 nm particles and 7 image sets with 200 nm particles and 1 image set
with 100 nm particles) the results are very spread since the settings and image
quality can drastically change the results.

We wanted to answer if nanoparticles ranging from 400 nm to 1200 nm are


more likely to end up at the vein margin than nanoparticles ranging from 100
nm to 300 nm, and whether the distribution of the nanoparticles in the vein is
different. In table 3.30 on page 174, we can see that for the particle trajectories
that had to have a angle greater than 10°in relation to the reference line, the
mean and STD is decreasing with the size of the nanoparticles. Because we only
have a very few data points for calculating these, we can not say if this actually
holds or if this pure coincidence. More image sets needs to be tested, and more
data added so that the trend can be more definitive.

There were no clear differences in the histogram distributions with different


nanoparticle sizes. The histogram distributions were mostly skewed towards
zero, but some were also skewed towards the maximum distance from the vein
margin, the right side. Having perfectly distributed histograms were rare, but
it did occur, and often these had an a > 1. While 11 out of the 15 image sets

175
with a power law fit gives a < 1, meaning that the fluid is pesudoplastic as ex-
pected. Not all of these 11 power law fits can be trusted because the histogram
distributions are either skewed towards zero or skewed towards the right, or the
maximum distance to the vein margin. Furthermore the vein masks do not have
uniform thickness and therefore deriving the power law fit from the histogram
distribution of distances to the vein margin is ill advised. The power law often
doesn’t fit because the vein is not a perfect cylinder since that is what the model
is based on. Some parts of the vein are thicker and thinner and therefore the
distribution of trajectories throughout the vein may be skewed.

All the plots of number of particles identified at a given threshold per image
oscillate. What causes these oscillations is unknown. We know that the heart-
beat of the zebrafish visibly accelerates the flow of the nanoparticles in given
intervals. Perhaps this is causing these oscillations as the increased velocity
creates motion blur in the images and the brightness intensity of the particles
are reduced. Or perhaps it is the laser used to illuminate the particles that is on
a specific frequency that the camera catches. There were many issues with the
imaging as the nanoparticles were in one zebrafish moving too fast for the cam-
era to catch, while in another zebrafish the flow was much slower. This made
it so that the resolution of the images did not always coincide with the size of
the nanoparticles as the settings had to be adjusted to make the nanoparticles
visible for the given flow velocity.

While the flow of nanoparticles in veins are dominated by the blood flow,
the nanoparticles seem to exhibit Brownian motion in the form of erratic move-
ment. This was visible to us at times when watching the 800 nm particles under
the microscope. The British botanist, Robert Brown looked at Clarkia puchella
pollen in water with a microscope and the contents of the pollen seeped into the
water. The amyloplasts that that brown saw moving had an average radii of 2
µm[19] which is 2000nm. This is significantly (about 2-10 times) larger than the
nanoparticles that are flowing through the zebrafish. If the amyloplasts were
small enough to have their movement affected by water molecules, then perhaps
this is why we see an erratic movement from the nanoparticles, but it could also
be turbulence in the blood flow that the nanoparticles are reacting to. But to
capture this small motion with my current PTV, we need even higher resolution
images, or better software.

Employing Deep Learning techniques to particle tracking would be very in-


teresting as Correlation filters with Long-Short Term Memory and Recurrent
Neural Networks has had great success in general object tracking [13],[5]. While
Deep Learning is very popular today and has been used in many fields to great
success, Artifical Neural Networks has been used to do PIV [22] and it has been
used to perform PTV [8]. Both have shown great advantages and further re-
search into this could yield even more interesting and precise results.

We only studied how the size of the nanoparticles affect the distribution

176
of nanoparticles in the zebrafish veins, but the shape and surface chemistry is
important as well. Unless a fully physics based model of a vein with blood flow
and nanoparticles is made and studied with perhaps a quantum computer, and
generate many different virtual nanoparticles to find the best combination of
size, shape and surface chemistry, we still need to use PIV and other quantita-
tive imaging methods.

I have written a MatLab script that can generate synthetic particle images
(particleLuminosity.m, ParticleEmitter.m, particleGeneratorMainProgram.m) where
the particles are generated from a mathematical model [22] and each particle is
unique with its position from frame to frame being saved. The particles move
along a given velocity field, and it is possible to input a factor of random motion
to each particle individually, and each particle can flicker if needed. The velocity
fields can be calculated with PIV. This can be a great starting point for future
research into particle tracking with either Artificial Neural Networks or Deep
learning algorithms. With MatLab, Keras, TensorFlow and many other frame-
works, it is possible to get started with Deep Learning and Artificial Neural
Networks easily and quickly. The world of nanoparticle research is wide open
for mathematicians, programmers, physicists and others.

177
Bibliography

[1] Pixlr Online Image Editor. https://pixlr.com/editor/, 2018.


[2] Daniel Blair and Eric Dufresne. Matlab code repository.
http://site.physics.georgetown.edu/matlab/code.html.
[3] Dana Dabiri. Cross-correlation digital particle image velocimetry – a re-
view. pages 1–54.
[4] Lasse Evensen, Patrick L. Johansen, Gerbrand Koster, Kaizheng Zhu, Lars
Herfindal, Martin Speth, Federico Fenaroli, Jon Hildahl, Shahla Bagheri-
fam, Claudia Tulotta, Lina Prasmickaite, Gunhild M. Maelandsmo, Ewa
Snaar-Jagalska, and Gareth Griffiths. Zebrafish as a model system for char-
acterization of nanoparticles against cancer. Nanoscale, 8:862–877, 2016.
[5] Kuan Fang. Track-rnn: Joint detection and tracking using recurrent neural
networks.
[6] Shako Farhad. GitHub with all code available.
https://github.com/ShakoFarhad/MasterThesis, 2018.
[7] Federico Fenaroli, David Westmoreland, Jørgen Benjaminsen, Terje Kol-
stad, Frode Miltzow Skjeldal, Annemarie H. Meijer, Michiel van der Vaart,
Lilia Ulanova, Norbert Roos, Bo Nyström, Jon Hildahl, and Gareth Grif-
fiths. Nanoparticles as Drug Delivery System against Tuberculosis in Ze-
brafish embryos: Direct visualization and treatment. ACS Nano, 8(7):7014–
7026, 2014. PMID: 24945994.
[8] I Grant and X Pan. The use of neural techniques in piv and ptv.
Measurement Science and Technology, 8(12):1399, 1997.
[9] E. J. Hinch. Lecture 3: Simple Flows. Woods Hole Oceanographic Institu-
tion.
[10] Arun K. Iyer, Greish Khaled, Jun Fang, and Hiroshi Maeda. Exploiting
the enhanced permeability and retention effect for tumor targeting. Drug
Discovery Today, 11(17):812 – 818, 2006.
[11] Jostein Kolaas. Getting started with HydrolabPIV v1.0. Research report
in mechanics http://urn.nb.no/URN:NBN:no-23419, 2016.

178
[12] Richard Korsmeyer. Critical questions in development of targeted nanopar-
ticle therapeutics. Regenerative Biomaterials, 3(2):143–147, 2016.
[13] Chao Ma, Jia-Bin Huang, Xiaokang Yang, and Ming-Hsuan Yang. Adap-
tive correlation filters with long-term and short-term memory for object
tracking. arXiv preprint arXiv:1707.02309, 2017.

[14] Hiroshi MAEDA. Vascular permeability in cancer and infection as related


to macromolecular drug delivery, with emphasis on the EPR effect for
tumor-selective drug targeting. Proceedings of the Japan Academy, Series
B, 88(3):53–71, 2012.
[15] Yu Matsumoto, Joseph W. Nichols, Kazuko Toh, Takahiro Nomoto, Hora-
cio Cabral, Yutaka Miura, R. James Christie, Naoki Yamada, Tadayoshi
Ogura, Mitsunobu R. Kano, Yasuhiro PMatsumura, Nobuhiro Nishiyama,
Tatsuya Yamasoba, You Han Bae, and Kazunori Kataoka. Vascular bursts
enhance permeability of tumour blood vessels and improve nanoparticle
delivery. Nature Nanotechnology, 11:862–877, 2016.

[16] Marcia K McNutt, Rich Camilli, Timothy J Crone, George D Guthrie,


Paul A Hsieh, Thomas B Ryerson, Omer Savas, and Frank Shaffer. Review
of flow rate estimates of the deepwater horizon oil spill. Proceedings of the
National Academy of Sciences, 109(50):20260–20267, 2012.
[17] Carl D Meinhart, Steve T Wereley, and Juan G Santiago. Piv measurements
of a microchannel flow. Experiments in fluids, 27(5):414–419, 1999.
[18] Dirk Michaelis, Douglas R Neal, and Bernhard Wieneke. Peak-locking
reduction for particle image velocimetry. Measurement Science and
Technology, 27(10):104005, 2016.
[19] Philip Pearle, Brian Collett, Kenneth Bart, David Bilderback, Dara New-
man, and Scott Samuels. What Brown saw and you can too. American
Journal of Physics, 78(12):1278–1289, 2010.
[20] Uma Prabhakar, Hiroshi Maeda, Rakesh K. Jain, Eva M. Sevick-Muraca,
William Zamboni, Omid C. Farokhzad, Simon T. Barry, Alberto Gabizon,
Piotr Grodzinski, and David C. Blakey. Challenges and Key Considerations
of the Enhanced Permeability and Retention Effect for Nanomedicine Drug
Delivery in Oncology. Cancer Research, 73(8):2412–2417, 2013.
[21] Oliver Pust. Piv: Direct cross-correlation compared with fft-based cross-
correlation. In Proceedings of the 10th International Symposium on
Applications of Laser Techniques to Fluid Mechanics, Lisbon, Portugal,
volume 27, page 114, 2000.
[22] Jean Rabault, Jostein Kolaas, and Atle Jensen. Performing particle
image velocimetry using artificial neural networks: a proof-of-concept.
Measurement Science and Technology, 28(12):125301, 2017.

179
[23] Rebecca L. Siegel, Kimberly D. Miller, and Ahmedin Jemal. Cancer statis-
tics, 2017. CA: A Cancer Journal for Clinicians, 67(1):7–30, 2017.
[24] Takamasa Suzuki, Sadao Araki, Hideki Yamamoto, Kimito Kawamura, Hi-
roko Aida, Dominik Bernitzky, and Roberto Plasenzotti. Measurement of
Flow Properties of Mammalian Blood with Different Hematocrit Values
Using Falling Needle Rheometer. Journal of Systemics, 12(4):18–20, 2014.
[25] J Kristian Sveen and Edwin A Cowen. Quantitative imaging techniques
and their application to wavy flows. In PIV and water waves, pages 1–49.
World Scientific, 2004.
[26] Carina Beatrice Vibe, Federico Fenaroli, David Pires, Steven Ray Wilson,
Vanya Bogoeva, Raja Kalluru, Martin Speth, Elsa Anes, Gareth Griffiths,
and Jon Hildahl. Thioridazine in PLGA nanoparticles reduces toxicity and
improves rifampicin therapy against mycobacterial infection in zebrafish.
Nanotoxicology, 10(6):680–688, 2016. PMID: 26573343.
[27] Stefan Wilhelm, Anthony J. Tavares, Qin Dai, Seiichi Ohta, Julie Audet,
Harold F. Dvorak, and Warren C. W. Chan. Analysis of nanoparticle
delivery to tumours. Nature Reviews Materials, 1, 2016.
[28] Stuart J Williams, Choongbae Park, and Steven T Wereley. Advances
and applications on microfluidic velocimetry techniques. Microfluidics and
Nanofluidics, 8(6):709–726, 2010.

180

Das könnte Ihnen auch gefallen