Вы находитесь на странице: 1из 5

1

BME 311 - Spring 2015


FINAL PROJECT

For the final project, you are going to use a light propagation model to measure the
amount of light that comes out of a tissue sample of thickness = z. The tissue is purely
absorbing. The ability of the tissue to absorb is characterized by its absorption
coefficient = a. A light beam will enter the tissue at normal to the entrance surface of
the tissue. A portion of the beam will be absorbed before leaving.
Monte Carlo Theory
The Monte Carlo program will be the light propagation model used for this final project.
This model follows the random walk of a packet of photons. The packet of photons is
initially given a weight of 1.0. The program will calculate the distance the photon packet
travels after entering the tissue. At the end of this travel distance, a portion of the packet
is absorbed. At this point, the weight will drop, and the program will calculate the next
distance. Eventually, two things may occur.

The weight of the tissue will drop so low within the tissue that the packet of
photons is considered completely extinguished before leaving, or

Some of the weight of the packet will exit out of the tissue through the back tissue
boundary
Since light propagation is based on probability, the distance that the photon packet travels
will be decided at random.
The steps of travel for each photon packet is as follows:
1. Entrance of the photon packet into the tissue
From the very beginning, you should set the random number generator at the
beginning of the program (see lecture 4, first example)
A circular light beam of radius = 1.0 cm will enter a rectangular piece of tissue with a
thickness = L. The light beam travels along the z-axis. The other rectangular dimensions
are as follows:

x- axis (length) = 2.4 cm

y-axis (height) = 2.4 cm


The center of the beam will enter at the center of the tissue entrance face (see picture
below). A packet of photons will enter the tissue at a different point within the light
beam boundary. The specific location within the light beam will be determined by the
following equations:
x = (beam radius) * sqrt() * cos(2)

y = (beam radius) * sqrt() * sin(2)


where and are random numbers chosen by MATLAB and beam radius is the
radius of the light beam. Have the program find those random numbers before inserting
them into the equations for x and y.
The beam will start at z = 0.

2. Photon Packet Travel Through Tissue


The photon packet will begin with the weight = 1.0. You will calculate the distance that
the photon packet travels in the tissue before the first interaction. As mentioned before,
this is based on probability, and is given by the following:
s = -ln(a
where s = the step distance travel of the photon packet and a is the absorption coefficient
of the tissue.
After the photon packet has traveled, the weight of the photon is reduced due to
absorption by the tissue. The new photon packet weight is given by the following:
W(new) = W(old) * exp(-a * s)

The new location of the photon along the z direction is given by the following:
z = z + s;
Remember that since the tissue is not scattering, the photon packet travels mainly along
the z-axis, thus x and y location of the photon packet does not change until the photon
packet escapes the tissue or is totally absorbed.
This process in step 2 is repeated until the photon packet weight falls below a threshold
or the photon escapes.
2.a. Photon escape:
Eventually, the photon packet will reach the thickness (L) of the tissue. The s might put
the photon beyond the boundary. If that is the case, then you need to establish the final z
to be the length of the tissue and the s value to be the following:
s(new) = L z(old)
The weight will be calculated using the s(new) value. That is the final weight that leaves
at that specific spot (x,y,z) on the exit face of the tissue.
A 2-D matrix Td will be creating that will represent the transmission of the photons
that come out of the exit surface of the tissue. The final weight that leaves each pixel
section of the tissue exit surface will be recorded.
Eventually, all the weight will be accumulated and from this sum of all the weights that
leave the tissue exit surface, the collimated transmittance will be calculated using the
following equation:
Tc = total weight / number of photon packets.
For Td ,the distance between each entry will be 1 mm. Therefore, our tissue and the
exit tissue surface will have pixels of equal sides = 1 mm. The Td at each pixel will be
recorded using the following equation:
Td = (Exit surface weight matrix) ./ number of photon packets
For this final project you will give the Tc and the Td
3. Photon Packet Termination
When the photon packet weight falls below 0.001 prior to escaping the tissue boundary,
then the life of the photon is determined by using the roulette method, which goes by the
following:

If 1 / 10, then W(new) = 10 * W(old)

If > 1 / 10, then W = 0

Once the photon has either terminated inside the tissue or has exited out of the tissue
through its surface, a new photon packet is launched.
A total of 1,000,000 photon packets will be launched before the end of the program.

Final Results:
Create a GUI with the following
Input fields:

a1
a2
Zminimum
Zmaximum

Your program will compute a Z array comprised of 10 steps between the given
Zminimum and Zmaximum. You are going to get a final Tc for each increment of z for each a.
Hence, you will use all the z lengths for each a.
Your program will also output Td, a 2D-Matrix of the amount and locations of the
photons leaving the tissue. You will visualize Td as a grayscale image.
Your GUI must have the following output plots
Outputs:

A plot of -ln(Tc) as a function of Z for each a. The user will specify two
values of a, so there will be two traces. Make each trace a different color.
Four grayscale images (use imshow) for four Td matrixes, one for Zminimum
and another for Zmaximum for each value of a.

Image of Td for a1 and Zmin

Image of Td for a1 and Zmax

Image of Td for a2 and Zmin

Image of Td for a2 and Zmax

Your GUI must also provide a button, which when pressed, will save 4 jpegs of
each of the Tds above with the names 'Td_Mu_(a value)_Z_(Z value)'.
RECOMMENDATION: When you do the Td matrix, the x and y locations (e.g. x =

2.4, y = 1.3,) that are calculated are going to be floating numbers while locations (their
entry point) in the Td matrix are in integers (e.g. Td(10,20) where 10 and 20 are the
locations in the matrix for that particular pixel where the weight is leaving). You can use
the round command to correlate the pixel of the Td matrix to the actual location where
the photon packet is exiting the exit tissue surface.

Вам также может понравиться