Skip to main content
Biomedical Optics Express logoLink to Biomedical Optics Express
. 2023 Jan 4;14(2):559–576. doi: 10.1364/BOE.477237

Tutorial on Monte Carlo simulation of photon transport in biological tissues [Invited]

Steven L Jacques 1,*
PMCID: PMC9979671  PMID: 36874486

Abstract

A tutorial introduction to Monte Carlo (MC) simulation of light propagation in biological tissues. MC statistical sampling is introduced, the basic design of a MC program is explained, and examples of application in biomedicine are presented.

1. Introduction

The penetration of light into and within a biological tissue is the key to many diagnostic and therapeutic uses of lasers and other light sources in medicine and biology. The dose of light experienced by a target structure within a tissue, eg., a blood vessel or a tumor, guides the irradiance and exposure time required for a particular photochemical, photothermal, or photomechanical effect. Understanding how photons propagate within and escape from a tissue is necessary for proper interpretation of optical diagnostic measurements. The field of biomedical optics and biophotonics is currently very actively using computer simulations of light transport to guide clinical protocols and develop optical tools for medicine and biology.

Monte Carlo (MC) simulations of light transport in media with absorption and scattering properties has long been an important tool in many fields. The MC method is a statistical sampling of probability density functions, and an early application was study of the movement of neutrons in fissile materials for nuclear reactions; see [1] for a history of early MC development. MC simulations have been widely used in astrophysical, atmospheric, oceanic, and now biomedical applications. This paper does not attempt a review of the field. Rather, this tutorial introduces MC to newcomers to the field. At its heart, MC is quite simple and demystifying the computation is a goal of the paper.

There have been many MC programs written by many investigators. Some recent examples are mcml [2], MCmatlab [3], and mcx [4]. Others have created websites that allow users to run simulations on-line, such as the Biophotonics Initiative [5], mcxspace [6], Cloud based Monte Carlo [7], and Multi-Scattering [8].

The paper begins with an introduction to Monte Carlo sampling, then discusses the basic structure of an MC program, and concludes with three example problems: (1) How does skin architecture affect skin color? (2) What exposure time is needed for photobiomodulation of the knee? (3) Will a pulsed laser treatment reach the bulb of a hair follicle?

2. Monte Carlo sampling

2.1. Concept

Monte Carlo sampling is the random sampling of a probability density function, p(x), to pick a value x. This section illustrates MC sampling using a bucket of marbles, then presents the general approach toward finding an analytic expression that uses a random number (RND) to pick a value of x. Two examples are given: (1) picking a stepsize for a photon to propagate before being scattered, and (2) picking a launch position for launching each photon as a large number of photons are delivered to a tissue as a collimated Gaussian beam.

Bucket of marbles

Consider a bucket that you are going to fill with a N marbles, for example N = 1000. Divide the range of x into discrete steps of x, for example 100 steps of size dx = 0.01 between 0 and 1. Calculate the corresponding discrete values of p(x) that correspond to each discrete value of x, where p(x) is a normalized probability density function. For each x value, write the value of x on a set of Np(x)dx marbles and place these marbles in the bucket. For example, if x = 0.2 and p(x) = 5e5x , x = 1.8394, then Np(x)dx equals round((1000)(1.8394)(0.01)) = 18 marbles, on which you write the value 0.2 and place in the bucket. After doing this for all your steps of x, you now have a bucket filled with 1000 labeled marbles, but more are labeled with small values of x and fewer are labeled with large values of x, since p(x) is an exponential decay function.

Now proceed to sample p(x) by picking a marble from the bucket. The value on the marble is your x1. Put the marble back into the bucket, shake the bucket, and draw a second marble, yielding a new x1. Repeat. This process of sampling marbles in the bucket is a simple version of the Monte Carlo method. Figure 1 illustrates the concept of the bucket filled with marbles.

Fig. 1.

Fig. 1.

Monte Carlo sampling. On the left, marbles distributed as p(x) are labeled by their x value. On the right, the labeled marbles have filled a bucket. Randomly drawing a marble from the bucket yields a marble labeled by x.

Sampling diagram

Now consider using the Monte Carlo method to sample a generic probability density function p(x), normalized such that

abp(x)dx=1 (1)

The corresponding probability distribution function is F(x):

F(x)=axp(x)dx (2)

Now consider a random number generator that generates a random number RND. The p(RND) equals a constant 1 over the interval 0 to 1, since any value of RND has an equal chance. Consequently, F(RND) = RND, which is a linear increase from 0 to 1 with a slope of 1. To sample the p(x), equate the probability distribution functions, F(RND) = F(x), in other words, let F(x) = RND. Then solve for x to yield a new equation x = function(RND). Now, the sampling of p(x) uses a randomly generated RND1 to produces a value x1 . This is a computational approach toward Monte Carlo sampling.

This strategy is illustrated in Fig. 2, using p(s)=μseμss , which is the probability density function for the step size (s) a photon will take before being scattered. The p(s) is properly normalized (integral of p(s) from 0 to equals unity). The function F(s) is

F(s)=0sp(s)ds (3)
Fig. 2.

Fig. 2.

Monte Carlo sampling of p(s) using a random number RND. A choice of RND1 connects to a value s1 by equating the F(r) to RND. The hatched areas under the curves p(RND) and p(s) are equal.

Choosing a random number value RND1 , equate RND1 and F(s) and solve for s , which specifies s1 , the sampled value of s :

RND1=F(s)=1eμsss1=ln(RND1)μs (4)

A second example is shown in Fig. 3, illustrating the sampling of a 2D Gaussian beam with a 1/e radius of w. This example is useful for launching a photon into tissue using a collimated Gaussian beam. The goal is to sample the distribution for radial position (r) of photon in the 2D Gaussian beam. Therefore, the rings of integration ( 2π r dr ) must be included and the probability properly normalized: p(r)=e(r/w)22πrπw2 . The integral of p(r) is F(r) = 1e(rw)2 . Solving for a particular r1 using a particular RND1 ,

r1=wln(RND1) (5)
Fig. 3.

Fig. 3.

Monte Carlo sampling to specify the radial position (r) for launching a photon, such that a population of launched photons would mimic a collimated Gaussian beam with a 1/e radius of w = 3 mm.

This sampling method to specify the launch position for each photon can be applied to a variety of beam shapes amenable to Eq. (2). For beams not amenable to Eq. (2), a lookup table can be used, analogous to the bucket of marbles.

3. Monte Carlo program

This section discusses the basis elements of a MC simulation. The program has three input files: (1) a tissue volume, which specifies the 3D distribution of tissue types (epidermis, dermis, blood, etc.), (2) a list specifying the optical properties of each tissue type (absorption coefficient, scattering coefficient, etc.), (3) a list of run parameters (number of photons to launch, voxel sizes, beam size, etc.) that control the simulation.

3.1. Tissue volume

Consider a tissue volume modeled as a cubic array, T(x,y,z), where each voxel is assigned an integer value that specifies a particular tissue type. A complex tissue, such as skin with its several layers (epidermis, papillary dermis, vascular plexus, reticular dermis) along with an embedded tumor and a large blood vessel would have 6 tissue types. The T(x,y,z) voxels would be filled with integers between 1 to 6 to create the tissue structure. The following example shows MATLAB code for generating a two-layer skin tissue (epidermis, dermis) with a 200- μ m-dia. blood vessel (as shown in Fig. 4). There is specular reflectance of the incident beam at the air/tissue interface ( rsp=(1.41.01.4+1.0)2 = 0.0278, nair=1.0,ntissue=1.4 ). There is also total internal reflectance when photons strike the air/tissue boundary obliquely as they attempt to escape the tissue ( ri 0.53).

Fig. 4.

Fig. 4.

Example of skin tissue with a large blood vessel. The air/skin interface is at z = 1 mm. (A) Tissue structure showing T(z,x)@y=0. There is a 100- μ m-thick epidermis and a 1-mm-dia. blood vessel centered at 1 mm below the skin surface. (B) Relative fluence, ϕ [ mm2 ] in response to a 1-mm-diameter 500-nm-wavelength beam of light.

There are a variety of ways to generate a tissue volume T(x,y,z) for input to a MC simulation, this is just one example.

Ny=400; Nx=Ny; Nz=Ny;
dx = 0.010; % mm, 10-um bin size.
dz = dx;
x = ([1:Nx]′–Nx/2)*dx;
z = [1:Nz]′*dx;
T = double(zeros(Nx,Ny,Nz)); % number of voxels in tissue cube
T = T + 4;  % fill background with skin (4 = dermis)
zsurf = 1;  % position of air/skin surface
for iz=1:Nz % for every depth z(iz)
    % air
    if iz<=round(zsurf/dz) % dz = voxel size
        T(:,:,iz) = 1; % 1 = air
    end
    % epidermis (100 um thick)
    if iz>round(zsurf/dz) & iz<=round((zsurf+0.100)/dz)
        T(:,:,iz) = 5; % 5 = epidermis
    end
    % blood vessel @ xc, zc, radius, oriented along y axis
    xc = 0;       % [mm], center of blood vessel
    zc = Nz/2*dz; % [mm], center of blood vessel
    vesselradius  = 0.5; % blood vessel radius [mm]
    for ix=1:Nx
           xd = x(ix) - xc;    % vessel, x distance from vessel center
           zd = z(iz) - zc;    % vessel, z distance from vessel center
           r = sqrt(xd^2 + zd^2);  % r from vessel center
           if (r<=vesselradius)    % if r is within vessel
               T(ix,:,iz) = 3;   % 3 = blood. Extend pattern over all y.
           end
    end %ix
end % iz

3.2. Tissue optical properties

For each tissue type, the optical properties can be generated as a function of wavelength by specifying tissue parameters:

  • 1.

    B = blood volume fraction (B=1 indicates blood at 150 g/l hemoglobin, or 2.3 mM)

  • 2.

    S = oxygen saturation of hemoglobin in mixed arteriovenous vasculature

  • 3.

    W = water content as volume fraction

  • 4.

    M = melanosome volume fraction (eg., M 0.07 for tanned Caucasian)

  • 5.

    F = volume fraction of fat

  • 6.

    a = scattering strength ( a=μs(1g1) at reference wavelength, eg., λref = 500 nm)

  • 7.

    fray = fraction of Rayleigh scatter at λref

  • 8.

    fmie = fraction of Mie scatter at λref ( fmie=1fray )

  • 9.

    bmie = scattering power for Mie scatter

  • 10.

    g1 = anisotropy of scatter ( g1=<cos(θ)> , θ is polar angle of photon deflection)

The above tissue parameters are used to calculate the optical properties for a tissue type:

μa=BSμa.oxy+B(1S)μa.deoxy+Wμa.water+Fμa.fat+Mμa.melμs=a(fray(λλref)4+(1fray)(λλref)bmie)μs=μs1g1 (6)

The parameter μa is the absorption coefficient. The parameter μs=μs(1g1) is the reduced scattering coefficient and is used since the literature on tissue optical properties has routinely measured and reported μs . However, MC simulations use μs=μs1g1 . Alternatively, it is common to use μs=a(λλref)b , which works well in the visible wavelength range. The value of anisotropy g1 is sparsely specified in the literature for various tissues, and a value of g1 = 0.90 is commonly used. However, g1 does vary with wavelength and tissue type, and is a parameter deserving more study.

A two-term scattering function can allow separate control of the forward and backward contributions to the overall scattering function [9]. The forward component dominates the penetration of light into a tissue and subsequently the diffuse reflectance due to multiply scattered photons. The backward component dominates the early scatter, perhaps the first 10 scattering events, and the subdiffuse reflectance for the superficial layer of a tissue. The average optical scattering of a tissue may be described by a Plum and Pudding model [10], in which a nucleus (plum) sits within a background of sub-micron scattering structures (pudding).

To illustrate how to use the above tissue parameters, the following excerpt from a MATLAB program makeTissueList.m shows the calculation for epidermis, having requested the optical properties for λ = 460 nm. A matrix of absorption spectra, MU(nmLIB,1:5) has been loaded, in which 5 columns specify the absorption coefficient of 5 tissue parameters versus wavelength (nmLIB = 300-1000 nm): μa.oxy for oxygenated hemoglobin in blood, μa.deoxy for deoxygenated hemoglobin in blood, μa.water for water, μa.mel for the interior of a cutaneous melanosome, μa.fat for fat. Interpolation yields 5 values for these 5 parameters at a requested wavelength. In this excerpt, a blood-free epidermis with a skin type II is specified. The oxygen saturation S is ignored because there is no blood.

nm = 460; % requested wavelength
MU2 = interp1(nmLIB,MU,nm); % horizontal vector
j=5;  % pointer to tissue type
tissue(j).name  = ′epidermis′;
B = 0; % blood volume fraction
S = 0; % saturation of hemoglobin
W = 0.75; % water volume fraction
M = 0.03; % melanosome volume fraction
F = 0; % fat volume fraction
a = 2; % mm^-1, scattering strength = reduced scattering coeff. at lambda_ref=500nm
fray  = 0.0; % fraction of reduced scattering at 500nm due to Rayleigh scattering
% 1-fray = fraction of reduced scattering at 500nm due to Mie scattering
bmie  = 1.0; % Mie scattering power
g1    = 0.90; % anisotropy of scatter
musp  = a*(fray*(nm/500).^-4 + (1-fray)*(nm/500).^-bmie); % reduced scattering
X     = [B*S B*(1-S) W M F]′; % vertical vector
tissue(j).mua = MU2*X;  % matrix multiplication --> absorption coeff.
tissue(j).mus = a/(1-g1); % scattering coeff.
tissue(j).g1  = g1; % anisotropy of scatter

The values of μa (tissue(j).mua), μs (tissue(j).mus), and g1 (tissue(j).g1) are then passed to the MC program as part of the input file.

3.3. Launching photons

This section discusses launching photons. Each photon, sometimes called a “photon bundle", is assigned a weight W = 1.0 at launch, and this W will slowly decrease as absorption occurs with every incremental step of the photon (discussed later in the DROP section). A large number of photons ( Nphotons ) is launched, where the number depends on the output desired. Only a few thousand may be needed to generate total diffuse reflectance ( Rd [dimensionless]). Perhaps 105 may be needed to generate the point spread function ( R(r) [mm1] ). A few million may be needed to generate the 3D fluence distribution ( ϕ(x,y,z) [mm2] ). In all cases, launching more photons reduces the variance in output.

A useful exercise is to run a set of MC simulations, each with its random number generator initiated with a unique seed. Consequently, the outputs of each simulation will be unique. Then the variance of the outputs can be calculated, which offers an estimate of the precision of the result.

Launch position, x,y,z

Each photon is launched at some position x,y,z. Consider how to launch photons at the tissue surface (z=0) as a collimated Gaussian beam with a 1/e radius w . MC sampling specifies the radial position r of each photon that is launched, then the x,y positions are calculated:

r=wln(RND)β=2π RNDx=r cos(β)y=r sin(β) (7)

Each photon is launched with a “weight" W =1. During propagation the photon’s W will drop as photon energy is deposited along the photon’s path, which is discussed later (see Drop).

Photon trajectory, ux,uy,uz

The MC program launches a photon at a position x,y,z with a trajectory vector of unit length specified by ux,uy,uz, where ux is the projection of the vector onto the x-axis, uy projects onto the y-axis, and uz projects onto the z-axis, and therefore ux2+uy2+uz2=1 . For example, a photon launched at x=0, y=0, z=0 at an angle of 22.5 degrees ( π /8 radians) off the normal to the surface and parallel to the x-z plane would have a trajectory specified by ux = cos( π /8), uy = 0, uz = cos( π /8). Figure 5 illustrates this example.

Fig. 5.

Fig. 5.

Launching photons (A) A photon is launched at 22.5 degrees ( π/8 radians) off the normal to the surface at x=0,y=0, parallel to the x-z plane (i.e., an oblique pencil beam). The trajectory is ux=sin( π /8), uy=0, and uz=cos( π /8). (B) MC simulation shows the launched photons penetrating a soft tissue (wavelength = 500 nm, μa = 0.112 cm1 , μs = 100 cm1 , g1 =0.90, for the case of 1% blood volume fraction (B) and 75% oxygen saturation of hemoglobin in the mixed arterio-venous vasculature.)

3.4. Propagating photons

A generic flow diagram for propagating photons in a MC simulation is shown in Fig. 6. The following subsections describe the steps in this flow diagram.

Fig. 6.

Fig. 6.

Flow chart for a simple Monte Carlo simulation. Refraction of transmission if photon crosses boundary between voxels, or trajectory change if reflected, based of Fresnel transmission/reflection.

The transport of unpolarized light (a population of photons with randomized orientations of their electric fields) is considered. The basic steps are hop, drop, spin, and check, as in Fig. 6.

Hop

The HOP step samples a step size ( s ) for the photon before it encounters its next scattering event,

s=ln(RND)μs (8)

This step size is weighted exponentially, and is sampled as illustrated in Fig. 2. Alternatively, the program mcml.c uses the expression,

s=log(RND)μt (9)

where μt=μa+μs . The step s is between “interactions", at which a fraction of the photon weight, albedo=μsμt , survives and a fraction 1albedo is absorbed. The two methods give the same results when many photons are launched. However, Eq. (8) is perhaps more appropriate when considering the first few scattering events in a tissue, such as the study of photon scatter in a superficial epithelium. This tutorial uses the first method (Eq. (8)).

The position of a photon is updated by the step size s , where the movement in each x,y,z direction is scaled by the trajectory vectors ux,uy,uz :

x=x+suxy=y+suyz=z+suz (10)

where ux , uy , uz are the projections of the photon trajectory onto the x, y, and z axes.

Crossed a boundary?

The voxel in which the photon resides is specified by the ix, iy, iz pointers to the voxel, which are obtained by taking the integer value of each x,y,z position. For example in MATLAB notation, the function ix=floor(x/dx) where dx is the voxel size converts x1<x<x2 to ix1 such that x(ix1)=x1 . In other words it does not “round up" to ix2 when ix is closer to ix2 . In C code, ix=(int)((x0.5)/dx) accomplishes the same function. Similarly, iy and iz are determined. If the voxel pointers before and after taking step s are the same, the photon is still in the same voxel. But if they differ, then the photon is crossing a voxel boundary.

If the photon is attempting to cross a boundary, then the step s must be divided into a step s1 to the voxel boundary, drop some photon weight in the current voxel (see Drop below), then take the remainder of the step, s2 , in the next voxel, governed by the optical properties of that voxel. The photon step is split based on its dimensionless value μs1s where subscript 1 indicates the current voxel. The step along x to the voxel boundary at x2 is s1=ix2 dxx with a dimensionless value μs1s1 , where μs1 is the scattering within the current voxel. Similarly, the steps along y and z are calculated. The minimum s1 along the x,y,z directions becomes the step size to the boundary. The photon hops to the boundary with step s1 , and drops some weight in the current voxel (see Drop section). The position of the photon is advanced by a negligible amount (eg., 109 mm) to cross the boundary. Then it continues with its remaining weight in the new voxel with a step s2 based on the remaining dimensionless step, μs1(ss1) , as in the following equations,

s1=ix dxxs2=μs1(ss1)μs2 (11)

Transmit or reflect?

Not explicitly shown in Fig. 6 is a decision on whether to reflect off the boundary being crossed or to transmit across the boundary. This decision occurs in the cross boundary step of Fig. 6. If the refractive indices of the current and next voxel, n1 and n2 , are different, then a subroutine is called, which is based on Fresnel reflectance, [r ca2]=RFresnel(n1,n2,ca1,ca2) where r is the Fresnel reflectance of the boundary, n1 and n2 are the refractive indices of the current and new voxel, ca1 is the cosine of the angle of incidence onto the boundary, and ca2 is the cosine of the angle of transmittance. The subroutine returns r and ca2 . A random number RND is then generated, and if RNDr then the photon reflects off the boundary. Otherwise, it transmits into the new voxel at the angle ca2 . This handling of the boundary works well when regions of different refractive indices are aligned with the xy, xz, or yz planes. However, a tissue structure with curved regions of different refractive indices requires guidance by the curved surface to refract correctly. An example of such guidance is demonstrated in the MC program reported by Tran and Jacques [11].

Escaping?

When crossing a boundary, a transmitted photon may be crossing a surface boundary (eg., tissue/air) and escaping the tissue. In this case, after the partial step to the boundary and the calculation of the escaping trajectory angle, the photon weight can be assigned to increment an element of an array of escaping flux J(x,y,z) at some x,y,z position, at some angles of escape J( α,β ), or a combined J(x,y,z, α,β ). If the photon is not escaping, it returns to the step “Cross boundary?" and continues propagating.

Drop

The DROP step deposits some of the photon weight ( W ) into an array element associated with the current voxel, A(x,y,z) , then decreases the surviving weight of the photon,

T=es1μa(x,y,z)A(x,y,z)A(x,y,z)+W(1T)WWT (12)

where s1 is the step length taken within the current voxel, μa(x,y,z) is the absorption coefficient of the current voxel, and W is the current weight of the photon. Each photon contributes to the accumulation of the spatial distribution of deposited photon weight, A(x,y,z) [dimensionless], which records the fraction of the total energy of all delivered photons that was deposited in each x,y,z voxel. This A(x,y,z) is later converted to relative fluence rate (see OUTPUT module).

Spin

The SPIN step changes the trajectory of the photon based on a chosen scattering function, i.e., it updates the parameters ux, uy, uz. Figure 7 shows the calculations within the SPIN module. Each use of RND is a freshly generated random number.

Fig. 7.

Fig. 7.

The SPIN module changes the trajectory of the photon, specified by (ux,uy,uz).

This example uses the Henyey-Green scattering function, controlled by the anisotropy g1 for the tissue in the current voxel. First, the polar deflection angle, θ , is sampled, yielding the parameter costheta. Second, the azimuthal angle of scatter, ψ , is sampled, yielding cospsi, as if it were randomly distributed between 0 and 2π , since the scattering structures are randomly oriented. This is the usual assumption but in some cases, for example striated muscle, there is an orientation to the scattering structures and the azimuthal angle may have to be sampled appropriately. Third, the costheta and cospsi along with the current trajectory (ux,uy,uz) are used to create a new trajectory (uxx,uyy,uzz), which is then assigned to ux,uy,uz. Hence, the photon trajectory has been adjusted by a single scattering event.

Check

A final step in this iterative hop, drop, spin, check process is the Check module to properly terminate a photon. Since the photon weight W continually decreases as the photon propagates, at some point the W is so low that continuing to propagate the photon adds little to the final solution. However, one cannot simply terminate the photon because the residual W will be lost, violating conservation of energy and resulting in an erroneous result. So the photon is statistically terminated using the so-called “Roulette Method". When W drops below a threshold value, a random number (RND) is generated, and if RND is less than a value chance (0 < chance < 1), then W is increased by 1chance . Otherwise, the photon is terminated.

chance = 0.10
threshold = 0.001
if W <= threshold
     if RND<chance, W = W/chance
     else W=0 (kill photon)
else do_nothing (photon continues)

The choice of threshold = 0.001 means that 99.9% of a photon’s weight has been deposited before considering to extend the photon’s life by increasing its weight. The choice of chance = 0.1 means that the photon terminates 90% of the time and 10% of the time the photon’s W is increased 10-fold to allow the photon to continue propagating. Statistically this procedure conserves energy (Escape + Absorption = 1). The conservation of energy is the key reason for the roulette method. When a photon’s lifetime is extended, it may escape as reflectance or transmission, or it may be absorbed. The expanded spatial extent of photon movement afforded by this lifetime extension of 0.01% of the photons balances the loss of photon movement for 99.99% of the photons.

Once a photon is terminated, another photon with a fresh W = 1.0 is launched. Photons are launched until the requested number of photons is reached, which terminates the launching of photons. The simulation is now complete, and the program then proceeds to the OUTPUT module to generate a report of results.

3.5. Output

After Nphotons photons have been launched, a final step of scaling is needed to generate the output for the user.

3.5.1. Absorbed photon fraction, A(x,y,z)

The absorbed fraction A(x,y,z) holds the total weight deposited by all the photons in the voxel at x,y,z. This weight is then normalized by the number of photons launched and by the volume of the voxel to yield a density of photon deposition, A [counts]NphotonsVvoxelA [cm3] . For an input of 1 J, A indicates J/cm3 . For an input of 1 W, A indicates W/cm3 .

3.5.2. Photon energy concentration or fluence, ϕ (x,y,z)

The Monte Carlo simulation has recorded and scaled A(x,y,z) as [cm3] , which is related to the fluence ϕ(y,x,,z) [cm2] at that voxel by the absorption coefficient [cm1] of that voxel,

ϕ(x,y,z)=A(x,y,z)μa(x,y,z) (13)

If the incidence is 1 J of energy, as in a pulsed laser, the fluence ϕ has units of [ J/cm2 ], which might be called the radiant exposure experienced by the voxel. If the incidence is 1 W of power, the fluence rate ϕ is expressed as [ W/cm2 ], which might be called the irradiance experienced by the voxel. The fluence rate ϕ in [ W/cm2 ] is proportional to the instantaneous energy density in the voxel, C [J/cm3] : ϕ=cC , where c [cm/s] is the speed of light in the medium ( c=c0n . c0 is speed in vacuo, n is refractive index).

3.5.3. Escaping flux, J(x,y,z, α,β )

The light that escapes the tissue was recorded as photon weight W escaping at some x,y,z position and angles α,β , J(x,y,z, α,β ) [dimensionless weight]. To illustrate, consider the total escape at all angles from one voxel at the front surface of a tissue slab where light was delivered, J(x,y) at z=0. This escaping weight is then normalized by the number of photons launched and the surface area ( dxdy ) of the voxel from which the photons escaped: J(x,y)J(x,y)Nphotonsdxdy with units of [ cm2 ], which is a flux density. Such escape from the irradiated surface may be called local reflectance, R(x,y) , and the total diffuse reflectance is Rd=x,yR(x,y)dxdy . Escape from the rear surface of a tissue slab may be called local transmittance and the total diffuse transmission similarly calculated. For tissue geometries other than slabs, total reflectance and transmittance are not always the best descriptors, and the local flux density of escape may be more appropriate.

It is also possible to record the escaping photon weight as a function of the polar ( α ) and azimuthal ( β ) angles of escape into the medium outside the tissue. Usually, the azimuthal variation of escape is uniform since scatters are randomly oriented, so only the polar variation is recorded. For example, record J(α) where α is divided into n increments from 0 to π/2 , i.e., reflectance orthogonal to tissue surface ( 0 ) to the extreme of broad scatter ( 90 ). Then, the cumulative sum of J(α) from 0 up to some αcollection yields the escape that would be collected by the numerical aperture of a detector centered on the z-axis at x,y=0,0 ( NA=sin(αcollection) ). Interpolation of this cumulative sum can yield the collection of any particular detector (eg., optical fiber, camera).

In summary, the MC simulation can yield a deposition, a fluence, or an escaping flux expressed as a fraction of the delivered power [W] or energy [J]. Considering effects of light on the tissue, the deposited energy, J/cm3 per J delivered = cm2 , causes heating or photochemistry. Considering diagnostics, the escaping flux, W per W delivered = reflectance (not including specular reflectance), or escaping flux density, W/cm2 per W delivered = local reflectance, provide information about the tissue. Deposited energy within the tissue will affect the escaping flux, allowing the diagnostic detection of local absorbing structures like a blood vessel or tumor.

3.6. Nuances in MC code

There are nuances when setting up a MC simulation. For example, the lateral boundaries at ± x and ± y may allow photons to escape the simulation volume and never return, which drops the fluence near these boundaries. Setting the boundaries to act like a mirror can prevent such loss, but now there are virtual images of the source and tissue structure appearing outside the volume and too much light may return from the boundary. Either a compromise between these two boundary conditions is needed, or photons are allowed to propagate outside the simulation volume and later return into the volume. Another nuance is to be sure that the boundaries between different tissue types are aligned with the bins of the simulation. For example, if the boundary between two tissue types occurs within a voxel, rather than at the front or rear surface of the voxel, then photons in that voxel will sometimes act as if in the first tissue type and sometimes as if in the second tissue type, resulting in odd results at that voxel. The possible nuances depend on the particular implementation of a MC simulation.

3.7. Polarized light and coherence

The character of a photon can be characterized by the orientation and phase of its oscillating electric field. A population of photons can be described by a polarization state, the Stokes vector = [I Q U V]. Ramella-Roman et al. [12] describe a MC simulation of polarized light propagation, which was recently implemented in a GPU-accelerated simulation [13].

The propagation of coherence by a MC simulation tracks the orientation and phase of a photon as it propagates. At a detector or region of interest, multiple photons add via vector addition to yield the net intensity, orientation, and phase. Fischer et al. [14] describe a MC simulation that predicts the spatial coherence of light propagation. Shen et al. [15] describe propagation of coherence in random medium. Sawicki et al. [16] describe a MC simulation of coherent backscatter from a tissue.

4. Example uses

4.1. How does skin architecture affect skin color?

The light reflected from the skin over the 380-720 nm range of wavelengths yields the perceived color of the skin. A set of Monte Carlo simulations can specify a diffuse reflectance spectrum Rd(λ) over this range of wavelengths ( λ ), which can be converted into a triplet of red, green, and blue values (R,G,B) which combine to yield a perceived color.

The CIE standard observer functions, x¯,y¯,z¯ , multiply the reflectance spectrum, the illumination spectrum ( Iillum(λ) ), and the daylight spectrum ( Id65(λ) ), followed by integration to yield an X,Y,Z triplet of values.

X=380nm720nmx¯RdIillumId65 dλY=380nm720nmy¯RdIillumId65 dλZ=380nm720nmz¯RdIillumId65 dλ (14)

The next step uses a transformation matrix M to transform the triplet X,Y,Z into the triplet R,G,B (an XYZ sRGB transformation). This M is based on the daylight illumination ( Id65 , 6500 color temperature).

[R G B]T=M×[X Y Z]T (15)

where superscript  T indicates the transpose to a vertical vector, and M is the transformation matrix,

M=|3.24045421.53713850.49853140.96926601.87601080.04155600.05564340.20402591.0572252| (16)

The resulting R,G,B triplet combines to yield the skin color. The wavelength dependence of the Id65 and the M matrix cancel each other. If Iillum = 1.0 and R = 1.0 for all wavelengths, the R,G,B triplet yields a white color on a computer screen. If a particular Iillum(λ) is used in Eq. (14), then the displayed color will properly portray the perceived color under that particular illumination.

Consider a four-layer skin architecture: (1) a pigmented epidermis with low melanin to allow better display of the skin color, (2) a superficial papillary dermal layer with low blood content (just thin capillaries), (3) a 50- μ m-thick vascular plexus with 5% blood content serving as the reservoir for supplying the capillaries, and (4) a deeper reticular dermis with a few larger blood vessels feeding/draining the vascular plexus. Figure 8 shows the skin model and the resulting colors. When the plexus is close to the skin surface, the skin color is slightly orange. As the plexus is moved further from the surface, the skin turns slightly pink. Why?

Fig. 8.

Fig. 8.

As a 50- μ m-thick vascular plexus with 5% blood content is moved further from the skin surface, the skin color changes from slightly orange to slightly pink. Above the plexus, the dermis is relatively blood free with only thin capillaries circulating red blood cells. Blue light is partially reflected from this superficial layer before it can reach the blood in the plexus and be absorbed, hence blue reflectance increases. This simple model only approximates true skin structure to illustrate the effect.

In the homogeneous skin model, the red, green, and blue light pass through a uniformly blood-perfused skin. The absorption of light by blood scales as blue > green > red, yielding an R,G,B triplet of [0.86 0.70 0.49], which is slightly orange. In the layered skin model, the red light and green light penetrate into the reticular dermis, then diffuse back out to escape at the surface, hence red and green light pass through the vascular plexus twice. Blue light, however, has difficulty penetrating into the plexus because it is strongly scattered by the relatively blood-free superficial layer. Consequently, blue light partially avoids absorption by blood and more blue is reflected. The R,G,B triplet is [0.87 0.73 0.72], which is slightly pink.

The same effect of architecture can be seen in pink gums, blue eyes, and blue monkey butts. The latter two examples feature a superficial collagenous layer overlaying a layer of melanin pigment. Blue light scatters and red and green penetrate to the melanin and are absorbed. In summary, tissue architecture affects the perceived color of a tissue.

4.2. Exposure time for photobiomodulation of the knee?

Photobiomodulation therapy (PBMT) is a phototherapy often using deep red light to elicit a biological effect on a tissue such as decreasing inflammation after tissue injury. The mechanism of PBMT is still a subject of investigation and several possible mechanisms are considered [17]. One mechanism involves interaction of treatment light with the cytochrome C pigment in the inner walls of the mitochondria, thereby affecting electron transport.

A typical dose of light for PBMT is 1 J/cm2 . Figure 9 shows the irradiation of a knee with 0.707-W collimated beam delivered uniformly over a 3-cm-dia. spot, which equals 0.100 W/cm2 irradiance. This irradiance is commonly used in phototherapy to avoid overheating by allowing blood flow to cool the tissue. The figure indicates that fluence rate in the soft tissue between the patella and bone is about 0.01 W/cm2 . Delivery of the beam for two minutes yields (0.01 W/cm2 )(60 s/min)(2 min) = 1.2 J/cm2 within the soft tissue. Therefore, a two-minute treatment may be approximately sufficient for treatment.

Fig. 9.

Fig. 9.

Photobiomodulation therapy (PBMT) of the knee. The delivery of 0.707 W of treatment light at 808-nm wavelength over a 3-cm-dia. spot yields an irradiance E = 0.100 W/cm2 , which penetrates into the knee to yield about 0.01 W/cm2 fluence in the soft tissue between the patella and bone.

4.3. Will a pulsed laser treatment reach the bulb of a hair follicle?

Laser treatment sometimes employs thermal coagulation of tissue to achieve a therapeutic effect. A popular example is the use of a pulsed laser to cause thermal damage to the bulb of a hair follicle for the purpose of hair removal. Figure 10 illustrates the penetration of a 0.4-cm-dia. 1024-nm infrared pulsed laser down to the bulb. The focus does not reach the bulb due to light scattering by the tissue, however, diffusion allows light to reach the bulb. The energy deposition in the bulb reaches about 100 J/cm3 per J delivered. Therefore, a 1.9-J 10-ms laser pulse (15 J/cm2 exposure at skin surface) increases the 30 C skin temperature to (1.9 J)(100 J/cm3 /J)/(4   C. J/cm3 ) + 30 C = 77 C, which is sufficient to thermally damage the bulb.

Fig. 10.

Fig. 10.

(A) Penetration of a pulsed 1024-nm-wavelength 0.4-cm-dia. laser beam focused to the bulb of a hair follicle at a depth of 0.3 cm in the skin. The beam loses its focus within 1 cm and only diffuse light reaches the bulb. The depression of fluence along z at x=0 is due to absorption by the melanin pigment in the epithelium of the hair shaft. (B) The energy deposition in the bulb is sufficient to achieve thermal damage. The bulb has a 50% volume fraction of cutaneous melanosomes.

5. Conclusion

This tutorial has briefly discussed the typical design of a Monte Carlo (MC) simulation of light transport for the purposes of diagnostics and dosimetry during biomedical applications of light. There are now a number of MC simulations available on the internet for biomedical, oceanic, atmospheric, and astrophysical applications. The tutorials for using specific MC programs can instruct on how to use these programs.

Acknowledgments

The author’s adventure with Monte Carlo simulations was shared with Scott Prahl, Marleen Keijzer, Lihong Wang, Jessica Ramella-Roman, Ting Li, Yinchu Chen, and Anh Phong Tran, who all contributed to development of mcml.c and mcxyz.c.

Disclosures

The author declares no conflicts of interest.

Data availability

No data were generated or analyzed in the presented research.

References

  • 1.Metropolis N., “The beginning of the Monte Carlo method,” Los Alamos Science, Special issue, 125–1330 (1987). [Google Scholar]
  • 2.Wang L., Jacques S. L., Zheng L., “MCML - Monte Carlo modeling of light transport in multi-layered tissues,” Computer Methods and Programs in Biomedicine 47(2), 131–146 (1995). 10.1016/0169-2607(95)01640-F [DOI] [PubMed] [Google Scholar]
  • 3.Marti D., Aasbjerg R. N., Anersen P. E., Hansen A. K., “MCmatlab: an open-source, user-friendly, MATLAB-integrated three-dimensional Monte Carlo light transport solver with heat diffusion and tissue damage,” J. Biomed. Opt. 23(12), 1 (2018). 10.1117/1.JBO.23.12.121622 [DOI] [PubMed] [Google Scholar]
  • 4.Fang Q., Boas D. A., “Monte Carlo simulation of photon migration in 3D turbid media accelerated by graphics processing units,” Opt. Express 17(22), 20178 (2009). 10.1364/OE.17.020178 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.“Virtual Photonics Technology Initiative,” (2022) https://virtualphotonics.org.
  • 6.“MCX, Monte Carlo eXtreme, a GPU-accelerated photon transport simulator,” (2022), http://mcx.space.
  • 7.“Cloud based Monte Carlo tool for photon transport,” (2022), http://www.lighttransport.net.
  • 8.Jönsson J., Berrocal E., “Multi-Scattering software: part I: online accelerated Monte Carlo simulation of light transport through scattering media,” Opt. Express 28(25), 37612–37638 (2020). 10.1364/OE.404005 [DOI] [PubMed] [Google Scholar]
  • 9.Jacques S. L., McCormick N. J., “Two-term scattering phase function for photon transport to model subdiffuse reflectance in superficial tissues,” Biomed. Opt. Express, in press (2022). [DOI] [PMC free article] [PubMed]
  • 10.Xu M., “Plum pudding random medium model of biological tissue toward remote microscopy from spectroscopic light scattering,” Biomed. Opt. Express 8(6), 2879 (2017). 10.1364/BOE.8.002879 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Tran A. P., Jacques S. L., “Modeling voxel-based Monte Carlo light transport with curved and oblique boundary surfaces,” J. Biomed. Opt. 25(02), 1 (2020). 10.1117/1.JBO.25.2.025001 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Ramella-Roman J. C., Prahl S. A., Jacques S. L., “Three Monte Carlo programs of polarized light transport into scattering media: part I,” Opt. Express 13(12), 4420–4438 (2005). 10.1364/OPEX.13.004420 [DOI] [PubMed] [Google Scholar]
  • 13.Yan S., Jacques S. L., Ramella-Roman J. C., Fang Q., “Graphics-processing-unit-accelerated Monte Carlo simulation of polarized light in complex three-dimensional media,” J. Biomed. Opt. 27(08), 083015 (2022). 10.1117/1.JBO.27.8.083015 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Fischer D. G., Prahl S. A., Duncan D. D., “Monte Carlo modeling of spatial coherence: free-space diffraction,” J. Opt. Soc. Am. A 25(10), 2571–2581 (2008). 10.1364/JOSAA.25.002571 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Shen Z., Sukhov S., Dogariu A., “Monte Carlo method to model optical coherence propagation in random media,” J. Opt. Soc. Am. A 34(12), 2189 (2017). 10.1364/JOSAA.34.002189 [DOI] [PubMed] [Google Scholar]
  • 16.Sawicki J., Kastor N., Xu M., “Electric field Monte Carlo simulation of coherent backscattering of polarized light by a turbid medium containing Mie scatterers,” Opt. Express 16(8), 5728 (2008). 10.1364/OE.16.005728 [DOI] [PubMed] [Google Scholar]
  • 17.Hambin M. R., Farraresi C., Huang Y., Freitas de Freitas L., Carroll J. D., Low-level Light Therapy: Photobiomodulation (SPIE Press, 2018). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

No data were generated or analyzed in the presented research.


Articles from Biomedical Optics Express are provided here courtesy of Optica Publishing Group

RESOURCES