Upload
aasimaly
View
214
Download
0
Embed Size (px)
Citation preview
7/25/2019 MonteCarlo-1.pptx
1/59
Biomedical Optics II II
Monte Carlo Modeling of
Photon Transport
2011/09/28
7/25/2019 MonteCarlo-1.pptx
2/59
Radiative Transfer in LivingTissue
2College of Engineering, Peking University II
How to
solve the
problem?
Maxwells
equations?
Modelingbased onscattering
and
absorption
Monte Carlosimulation
Radiativetransferequation
7/25/2019 MonteCarlo-1.pptx
3/59
Monte Carlo
College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
4/59
!College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
5/59
"College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
6/59
The simulations treat photons as neutral particles
rather than as a wave phenomenon.
It is assumed that the photons are multiply
scattered by tissues. Sometimes, phase and
polarization are assumed to be randomized andcan be ignored.
Monte CarloSimulations
#College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
7/59
Photon transport in biological tissue can benumerically simulated by the Monte Carlo method.
The trajectory o a photon is modeled as a
persistent random wal!, with the direction o eachstep depending on that o the previous step.
"y contrast, the directions o all o the steps in a
simple random wal! are independent.
"y trac!ing a suicient number o photons, we can
estimate physical #uantities such as diuse
relectance.
Introduction
$College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
8/59
The medium is random $se %dice& to build it
' system with !nown probability distributions
(scattering and absorption)
Monte Carlo
8College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
9/59
*rom +u and -oblingerIn all applications o the Monte Carlo method, a stochastic
model is constructed in which the epected value o a
certain random variable (or o a combination o several
variables) is e#uivalent to the value o a physical #uantityto be determined.
This epected value is then estimated by the average o
multiple independent samples representing the random
variable introduced above.*or the construction o the series o independent samples,
random numbers ollowing the distribution o the variable
to be estimated are used.
Denition of Monte CarloMethod
9College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
10/59
The photon propagation is random and determined by tissue optical properties
/. 0istance to net scattering event1 'pply 2dice2 with properties set by the
mean ree3path3length (determined by the scattering and absorption
coeicients) to set the path length beore a scattering or an absorption
event occur.
4. 0irection ater scattering1 'pply 2dice2 with phase unction 5 anisotropy
o scattering to set the scattering angles.
10College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
11/59
Main advantage6o limitation concerning boundary conditions or
spatial localisation o inhomogeneities in the tissue
77 *leiblilityMain disadvantage
Problem o getting good statistics, particularly i the
point o interest is located ar away rom the point oentry o the light and the scattering and absorption
coeicients are high 77 long CP$ time
11College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
12/59
It is important to realize that the Monte Carlo method estimatesensemble3averaged #uantities.
'n ensemble o biological tissues is modeled or the average
characteristics o photon transport8 the ensemble consists o all
instances o the tissues that are microscopically dierent but
macroscopically identical.
9ules are deined or photon propagation rom the probability
distributions o, or eample, the angles o scattering and the step
sizes.
The statistical nature re#uires trac!ing a large number o photons,
which is computationally time3consuming.
Multiple physical #uantities can be simultaneously estimated,
however.
Ensemble veraging
12College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
13/59
In this chapter, photons are treated as waves ateach scattering site but as classical particles
elsewhere.
Coherence, polarization, and nonlinearity areneglected.
Structural anisotropy33not to be conused with
scattering angular anisotropy33in tissuecomponents, such as muscle ibers or collagens, is
neglected as well.
Simplications
1College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
14/59
0etermine the spatial interval between twosuccessive interaction events
0etermine the scattering angle
0etermine the survival o the photon
Three Ma!or SamplingProcedures
1!College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
15/59
The mean ree path or an absorption orscattering event
Step size (unction o :aand :s)
The scattering angle
0election angle, ; (unction o anisotropy,
g)
'zimuthal angle, The step size o the photon is calculated based on
sampling the probability or the photonDs mean ree
path
> I step size too small, MC is ineicient, but i step
size is too large, poor approimation o real photon
travel
> Choose step size rom probability density unction
0College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
31/59
&he total attenuation coefficient
9ecall that the probability o interaction o a photon
with a medium per unit path length is
PGs/,s/5ds/HJLtds/
1College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
32/59
&he total attenuation coefficient
The probability o interaction o a photon with a
medium per unit path length is related to the gradient
o transmission
2College of Engineering, Peking University II
/
//
( )
( )t
dT sds
T s =
7/25/2019 MonteCarlo-1.pptx
33/59
&he total attenuation coefficient
The probability distribution unction (rom "eerDs
law) is deined as
College of Engineering, Peking University II
/ / /
/ / /
( ) ( ) ep( )
( ) / ( ) / ep( )
t
t
P s s T s s
P s s T s s
> = =
< = =
7/25/2019 MonteCarlo-1.pptx
34/59
'inal expression
Solving or %s& yields
!College of Engineering, Peking University II
ln
t
s
=
7/25/2019 MonteCarlo-1.pptx
35/59
Sampling the Step Si)e
( )
( ) ( )
tt
t
t
ss
s
ssP
ln/ln=
=
=
=
or
si$estep#ampled
)exp(methodondistributiInverse
)exp(
si$estepoffunctionondistributi*umulative
"College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
36/59
#College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
37/59
$College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
38/59
8College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
39/59
9College of Engineering, Peking University II
li h i l
7/25/2019 MonteCarlo-1.pptx
40/59
Sampling the Scattering ngle
[ ]4
4 BM4
44
4
=enyey3reenstein phase unction./
(cos ) , @,4(/ 4 cos )
Sampled scattering angle.
/ // i @cos 4 / 4
4 / i @
gp
g g
gg gg g g
g
=
+
+ = +
=
Sampling the )imuthal
7/25/2019 MonteCarlo-1.pptx
41/59
Sampling the )imuthalScattering ngle
( )
G@,4
/
4
4
p
)
=
=
!1College of Engineering, Peking University II
M i h Ph P *
7/25/2019 MonteCarlo-1.pptx
42/59
Moving the Photon Pac*et
iz
iy
ix
szz
syy
sxx
+
+
+
!2College of Engineering, Peking University II
b ti
7/25/2019 MonteCarlo-1.pptx
43/59
bsorption
WWW
W
W
t
a
=
+pdate of Photon Propagation
7/25/2019 MonteCarlo-1.pptx
44/59
+pdate of Photon PropagationDirection
( )
( )
( ) ( )
( ) ( )( ) ( )
( ) ( ) ( )
eists.solutione'lternativ
.N,N,Nin,anglesazimuthalandpolarhasalongNnpropagatiophotonringPostscatte
.N,N,Ngettoorabout,,9otate(4)
.,,scoordinateteintermediagettoorabout,,9otate(/)
,N,N,Nscoordinatelocalto,,scoordinateglobalromtransormTo
.,anglesazimuthalandpolarhasnpropagatiophotonringPrescatte6ote
.cossgnsinsincossinthen,/I
.coscossin/
,cos/
)sincos(sin
,cos
/
)sincos(sin
@
OOOO
OOO
@
@@
4
4
4
zyxzk
zyxyzyx
zyxzzyx
zyxzyx
k
,,
z
'
z
'
y
'
xz
zz
'
z
y
z
xzy'
y
x
z
yzx'
x
===
+=
+
+=
+
=
!!College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
45/59
Please go to ianan QuDs ppt /Bb.pd and /Bc.pd.
!"College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
46/59
int main ()
Ralbedo J mus (mus 5 mua)8
rs J (n3/.@)O(n3/.@)(n5/.@)(n5/.@)8 O specular relection O
critangle J s#rt(/.@3/.@nn)8 O cos o critical angle O
binspermp J /emicronsperbin(mua5mus)8
or (i J /8 i KJ photons8 i55)R
launch ()8
while (weight 7 @) R
move ()8
absorb ()8
scatter ()8U
U
printresults()8
return @8
U
Monte Carlo Program
!#College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
47/59
void launch() O Start the photon O
R J @.@8 y J @.@8 z J @.@8
u J @.@8 v J @.@8 w J /.@8
weight J /.@ 3 rs8
U
void bounce () O Interact with top surace O
R
double t, temp, temp/,r8
w J 3w8
z J 3z8
i (w KJ critangle) return8 O total internal relection O
t J s#rt(/.@3nOnO(/.@3wOw))8 O cos o eit angle Otemp/ J (w 3 nOt)(w 5 nOt)8
temp J (t 3 nOw)(t 5 nOw)8
r J (temp/Otemp/5tempOtemp)4.@8 O *resnel relection O
rd 5J (/.@3r) O weight8
weight 3J (/.@3r) O weight8
U
Monte Carlo Program
!$College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
48/59
void move() O move to net scattering or absorption event O
Rdouble d J 3log((rand()5/.@)(9'60M'V5/.@))8
5J d O u8
y 5J d O v8
z 5J d O w8
i ( zKJ@ ) bounce()8
U
void absorb () O 'bsorb light in the medium O
R
int binJzObinspermp8
i (bin 7J "I6S) bin J "I6S3/8
heatGbinH 5J (/.@3albedo)Oweight8weight OJ albedo8
i (weight K @.@@/)R O 9oulette O
bit 3J weight8
i (rand() 7 @./O9'60M'V) weight J @8 else weight J @./8
bit 5J weight8
U
U
Monte Carlo Program
!8College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
49/59
void scatter() O Scatter photon and establish new direction O
Rdouble /, 4, B, t, mu8
or(88) R Onew directionO
/J4.@Orand()9'60M'V 3 /.@8
4J4.@Orand()9'60M'V 3 /.@8
i ((BJ/O/54O4)KJ/) brea!8
U
i (gJJ@) R O isotropic O
u J 4.@ O B 3/.@8
v J / O s#rt((/3uOu)B)8
w J 4 O s#rt((/3uOu)B)8
return8
U
Monte Carlo Program
!9College of Engineering, Peking University II
7/25/2019 MonteCarlo-1.pptx
50/59
mu J (/3gOg)(/3g54.@OgOrand()9'60M'V)8mu J (/ 5 gOg3muOmu)4.@g8
i ( abs(w) K @.W ) R
t J mu O u 5 s#rt((/3muOmu)(/3wOw)B) O (/OuOw34Ov)8
v J mu O v 5 s#rt((/3muOmu)(/3wOw)B) O (/OvOw54Ou)8
w J mu O w 3 s#rt((/3muOmu)O(/3wOw)B) O /8
U else R
t J mu O u 5 s#rt((/3muOmu)(/3vOv)B) O (/OuOv 5 4Ow)8
w J mu O w 5 s#rt((/3muOmu)(/3vOv)B) O (/OvOw 3 4Ou)8
v J mu O v 3 s#rt((/3muOmu)O(/3vOv)B) O /8
U
u J t8
U
Monte Carlo Program
"0College of Engineering, Peking University II
l
7/25/2019 MonteCarlo-1.pptx
51/59
void printresults() O Print the results O
Rint i8
print(2XsYnXsYnYnScattering J X?.BcmYn'bsorption J X?.BcmYn2,t/,t4,mus,mua)8
print(2'nisotropy J X?.BYn9er Inde J X?.BYnPhotons J X?ld2,g,n,photons)8
print(2YnYnSpecular 9el J X/@.ZYn"ac!scattered 9el J X/@.Z2,rs,rd(bit5photons))8
print(2YnYn 0epth =eatYnGmicronsH GAcm[BHYn2)8
or (iJ@8iK"I6S3/8i55)R
print(2X\.@ X/4.ZYn2,iOmicronsperbin, heatGiHmicronsperbinO/e(bit5photons))8
U
print(2 etra X/4.ZYn2,heatG"I6S3/H(bit5photons))8
U
Monte Carlo Program
"1College of Engineering, Peking University II
M C l P
7/25/2019 MonteCarlo-1.pptx
52/59
char t/G?@H J 2Small Monte Carlo by Scott Prahl (httpomlc.ogi.edu)28
char t4G?@H J 2/ Acm[4 $niorm Illumination o Semi3Ininite Medium28
]include Kstdio.h7
]include Kstdlib.h7
]include Kmath.h7
]deine "I6S /@/
double mua J Z8 O 'bsorption Coeicient in /cm O
double mus J WZ8 O Scattering Coeicient in /cm O
double g J @.4Z8 O Scattering 'nisotropy 3/KJgKJ/ O
double n J /.Z8 O Inde o reraction o medium O
double micronsperbin J 4@8O Thic!ness o one bin layer O
long i, photons J /@@@@@8
double ,y,z,u,v,w,weight8double rs, rd, bit, albedo, critangle, binspermp, heatG"I6SH8
Monte Carlo Program
"2College of Engineering, Peking University II
3
7/25/2019 MonteCarlo-1.pptx
53/59
Monte Carlo can simulate photon transport inbiological tissue
Three steps move, absorb, scatter
Aeight deines its alive or dead
The trajectory o a photon is modeled as a
persistent random wal!. The directions are
independent.
3ummar(
"College of Engineering, Peking University II
4 t& di
7/25/2019 MonteCarlo-1.pptx
54/59
httpomlc.ogi.educlassroomeceZB4classinde.html
Tinymc.c, Smallmc.c, mcB4/.c
httpomlc.ogi.edusotwaremc
MCM+ download
httplabs.seas.wustl.edubmeAangmc.html
4urt&er readings
"!College of Engineering, Peking University II
# *
http://omlc.ogi.edu/classroom/ece532/class4/index.htmlhttp://omlc.ogi.edu/classroom/ece532/class4/index.htmlhttp://labs.seas.wustl.edu/bme/Wang/mc.htmlhttp://labs.seas.wustl.edu/bme/Wang/mc.htmlhttp://labs.seas.wustl.edu/bme/Wang/mc.htmlhttp://omlc.ogi.edu/classroom/ece532/class4/index.htmlhttp://omlc.ogi.edu/classroom/ece532/class4/index.html7/25/2019 MonteCarlo-1.pptx
55/59
/. Plot the =enyey reenstein *unction with dierent g.
4. Arite a program (in C or M'T+'") to describe a simple
random wal! in 3y plane. The direction is uniormly
random in B\@ degrees, and the wal!ing step size ollows
the same way o a photon transportation in a mediumwith LJ/@@ cm. Plot your result and hand in your
program. (up to 4@ steps)
B. 9ewrite the tinymc.c program to Matlab.
#ome,or*
""College of Engineering, Peking University II
E-periment. Monte Carlo
7/25/2019 MonteCarlo-1.pptx
56/59
pSimulation
"#College of Engineering, Peking University Biomedical Optics II
Fiber
5= 633 nm
E-periment. Monte Carlo
7/25/2019 MonteCarlo-1.pptx
57/59
pSimulation
"$College of Engineering, Peking University Biomedical Optics II
Fiber
5= 633 nm
E-periment. Monte Carlo
7/25/2019 MonteCarlo-1.pptx
58/59
pSimulation
"8College of Engineering, Peking University Biomedical Optics II
Fiber
5= 633 nm
E i t t
7/25/2019 MonteCarlo-1.pptx
59/59
$sing g J @.W, and the measured scattering coeicient aswell as other parameters, apply Monte Carlo simulation
(net eperiment), then compare your simulated result
with your measured data.
E-periment report