The Monte Carlo technique is a flexible method for simulating light propagation in tissue. The simulation is based on the random walks that photons make as they travel through tissue, which are chosen by statistically sampling the probability distributions for step size and angular deflection per scattering event. After propagating many photons, the net distribution of all the photon paths yields an accurate approximation to reality.
There are a variety of ways to implement Monte Carlo simulations of light transport. One approach is to predict steady-state light distributions. Below we provide a steady-state model (MCML) for multi-layered media that is well developed and documented and has been used by many groups. The other approach is to predict time-resolved light distributions.
Despite appearances to the contrary (e.g., MCML), Monte Carlo code does not need to be long and complicated. To emphasize this idea of the inherent simplicity of the Monte Carlo approach, I have written three short programs. Enjoy!
tiny_mc.cmc_tiny.c.small_mc.ctime_mc.csmall_mc.c above, and shows how simply time resolved simulations can be done.mc321.cSimple steady-state Monte Carlo in spherical, cylindrical and planar coordinates. (ANSI standard C.) Used in the article:
SL Jacques, Light distributions from point, line and plane sources for photochemical reactions and fluorescence in turbid biological tissues. Photochem. Photobiol. 67:23-32, 1998.
trmc.cMCML is a steady-state Monte Carlo simulation program for multi-layered turbid media with an infinitely narrow photon beam as the light source. Each layer has its own optical properties of absorption, scattering, anisotropy, and refractive index. The simulation is 3D, but the results are stored in an r-z array in cylindrical coordinates denoting radial and depth positions. Outputs include the radial position and angular dependence of local reflectance and transmittance, and the internal distribution of energy deposition and fluence rate within the multilayered medium. The program can be easily modified.
The simulation is specified by an input text file called, for example, "sample.mci", which can be altered by any simple text editor. The output is another text file called, for example, "sample.mco". (The names are arbitrary.)
This program was originally implemented by Marleen Keijzer, Scott Prahl, and Steven Jacques in Pascal. A later version was written in Standard ANSI C by Lihong Wang and Steven Jacques which has been distributed on the Internet since 1992 and successfully modified by many groups. Some references on this method are:
The details of the light propagation model are given in Prahl et al. 1989 which can be downloaded. This paper is a terse but complete description of the Monte Carlo simulation and convolution. The report by Wang et al. 1995 is the latest summary of the current MCML method.
You can download the MCML source code as ASCII text files, as an encoded source.tar.gz file, and as pre-compiled versions for the PC, Macintosh and SUN. A full 117-page manual and a brief ASCII manual are also provided.
Download source code ASCII source code | Source-code.tar.gz
Download executable code: PC | Mac | Sun
Download manual: | MCML & CONV Manual | Mini Manual in ASCII
A MATLAB program called lookmcml.m will read the output file of MCML, using a subroutine called getmcml.m and a colormap called makec2f.m. These can be downloaded at:
lookmcml.m
getmcml.m
makec2f.m
CONV is a convolution program which uses the MCML output file to convolve for photon beams of variable size or shape (Gaussian or flat field). CONV can provide a variety of output formats (reflectance, transmission, iso-fluence contours, etc.) which are compatible with standard graphics applications.
Download source code: ASCII source code | Source-code.tar.gz
Download compiled code: PC | Mac | Sun
Download manual: MCML & CONV Manual | Mini Manual in ASCII
© 2007 Scott Prahl