Monte Carlo simulation using GPU units on personal computers

Information

  • Patent Application
  • 20070282575
  • Publication Number
    20070282575
  • Date Filed
    June 05, 2007
    17 years ago
  • Date Published
    December 06, 2007
    17 years ago
Abstract
A method of performing a Monte Carlo analysis uses a graphical processor unit of a computer system, individual data sets to be analyzed are allocated to respective pixel locations in a graphical processor unit memory for Monte Carlo simulation and the outcome of the Monte Carlo simulation is calculated for each data set using stream processing in the graphical processor unit.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings:



FIG. 1 is a flow diagram for 3-D reconstruction in optical in-vivo imaging for a bioluminescence molecular imaging case;



FIG. 2 is a flow diagram showing the substeps for implementing parallel Monte Carlo simulations using a GPU;



FIG. 3 is a flow diagram for 3-D reconstruction in optical in-vivo imaging for a fluorescence molecular imaging case; and



FIG. 4 is a block diagram of a computer system for implementing the present invention.





DETAILED DESCRIPTION OF THE PRESENTLY PREFERRED EMBODIMENTS


FIG. 1 is a flow diagram for 3-D reconstruction in optical in-vivo imaging for a bioluminescence molecular imaging case. In the overall approach to 3-D reconstruction, assumptions are made about a sample's optical properties. More specifically, an initial estimate of the distribution of light-emitting material, i.e., the starting points of the photons, is first made, step S10. This initial estimate is typically based on the measured radiation from the surface or outermost layer of the animal. A simulation of the photons propagating through the animal is performed using Monte Carlo simulation, step S12. The resulting brightness and spectral properties at the surface of the animal are calculated using the results of the Monte Carlo simulation, step S14. The modeled light signal at the surface of the animal calculated at step S12 is then compared with an actual observed light signal, step S16. Based on the difference determines in step S16, the internal distribution of light-emitters used by the Monte Carlo simulation is adjusted, step S18, and steps S10-S18 are performed iteratively until the modeled light signal agrees with the actual observed light signal within an acceptable error, step S20.


One aspect of the present invention involves parallel processing of the Monte Carlo simulations for propagation of the photons of step S12 using pixel shaders of a graphical processor unit (GPU). The pixel shaders of a GPU are designed to work with pixels, each of which has a separate value for red, green, blue, and alpha channels (RGBα). The pixel shaders are parallel processing units which read data (RGBα values) from a texture memory, perform a function or kernel, and write the output to a framebuffer. The function or kernel typically is used to generate, e.g., lighting effects, on the pixels of an image. The GPU has several memory planes per pixel so that it can process an entire image efficiently, without data bottlenecks.


To process the propagation of photons in parallel, the Monte Carlo simulation must be organized in a way that is amenable to processing by a GPU. This requires transforming the problem from a sequential type problem in which each photon simulation is performed sequentially, to a parallel problem in which a plurality of the photon simulations are performed in parallel. In a preferred embodiment all of the photon simulations are performed in parallel using the pixel shaders of the GPU.


According to one embodiment of the present invention shown in FIG. 2, the photons are input to the GPU texture memory as a bit map, step S12-A, wherein the values of RGB channels of a pixel shader input represent the x, y, z coordinates of the photon. Accordingly, each photon is represented as a pixel in an image. A kernel is performed by each of the pixel shaders, step S12-B. The kernel to be performed by each pixel shader is a Monte Carlo code such as, for example, code written by Scott Prahl, which is publicly available at the Oregon Medical Laser Center's website, http://omlc.ogi.edu/software. This kernel or program simulates light propagation and outputs x, y, z coordinates after propagation or where the photon was absorbed in the sample.


A 1024×1024 bit map image may be created to represent over a million photons. The assignment of a specific pixel location to a specific photon does not mean that this photon corresponds to that physical location, either as a starting point or an ending point in its path. While an image processing GPU is utilized, and the calculation is organized in terms of pixels, the GPU is not performing a conventional display calculation, but is instead tracking the outcome for a million photons as they propagate through a two- or three-dimensional sample.


In addition to using a graphics API such as DirectX, the GPU could be programmed using a GPU programming language such as CUDA by Nvidia™ to perform the above tasks directly on x, y, z data of the photons.


For a fluorescence molecular imaging case, one may treat this in the same way as the bioluminescence case. This effectively assumes uniform excitation of the fluorescent material at all points within the organism. A more detailed model illustrated in the flow chart of FIG. 3 starts by modeling the propagation of excitation light from the surface of the animal, where it is applied, and determining how it propagates through the animal by Monte Carlo simulation, step S110. This simulation of the excitation light uses optical constants appropriate to the wavelength of excitation light, which may for example include visible or infrared light. The output of this step yields a distribution of excitation energy at internal points within the animal. An estimate of the distribution of light emitting material is made, step S112. The excitation field, combined with the distribution of light-emitting material, is then used to develop a probability distribution of photon starting points, step S114. These photons, in turn, propagate through the animal by further Monte Carlo simulation, which uses optical constants appropriate to the emission wavelengths of light, step S116. The resulting brightness and spectral properties at the surface of the animal are calculated using the results of the Monte Carlo simulation, step S118. The modeled light signal at the surface of the animal calculated at step S118 is then compared with an actual observed light signal, step S120. Based on the difference determined in step S120, the internal distribution of light-emitting material used by the Monte Carlo simulation is adjusted, step S122, and steps S110-S122 are performed iteratively until the modeled light signal agrees with the actual observed light signal within an acceptable error, step S124. In this way, an end-to-end model of the excitation and emission processes is developed.


This process can be used for in-vivo imaging of mice, humans, and any other animal where one wishes to view light through a scattering or absorptive layer of tissue. While it is especially valuable for non-invasive imaging of intact whole-animals, the process may also be applied to imaging through one or more layers of a specimen which has had some of the overlying material removed from the path. An example would be the use of the present invention to image structures within tissue while in the operating theatre.


In general, the above concept may be used to model any light interaction with tissue. For example, the present invention may be used to simulate laser/tissue interaction to determine the appropriate wavelength, power, and exposure time for treatment of conditions such as, for example, port wine stain. It may be used to determine the optical properties of materials. In this case, the Monte Carlo simulation is performed using different optical properties until the model output matches the actual output. The inventive method could also be used in depth estimate calculations by modeling a point source of a light at various depths. By including the absorption and scattering coefficients as a function of wavelength, the change in the spectrum of light measured at the surface as a function of depth could be determined.



FIG. 4 is a computer system 400 used to implement the present invention. The computer system 400 includes a main memory 405, a central processing unit (CPU) 410, and a GPU 415 having a plurality of pixel shaders 420 and a GPU memory 425. According to the present invention, the CPU 410 runs an application which allocates data sets in the main memory (or generated by a program), which is to be subjected to a Monte Carlo simulation, to pixel locations in the GPU memory 425. The pixel shaders 420 perform the Monte Carlo simulation on each of the data sets to calculate an outcome. A statistical distribution is accumulated for the outcomes of the Monte Carlo simulations.


Although the above examples describe using all four values, represented as RGBA, in the GPU's 4-vector processors, the present invention also applies to Monte Carlo simulations where the data being read in could contain pixel vector lengths of 1, 2, 3, or 4. In addition, some cases may require more than four pieces of information per trial. In that case, more than one image may be used as the input, wherein the same pixel location in each of the images contains the relevant information for one trial. For example, in the case in which light includes a location and a direction vector, the RGB of a pixel in one image may include starting location information x, y, z for a trial and the RGB of the same pixel in a second image may include starting direction information Ux, Uy, Uz.


Thus, while there have shown and described and pointed out fundamental novel features of the invention as applied to a preferred embodiment thereof, it will be understood that various omissions and substitutions and changes in the form and details of the devices illustrated, and in their operation, may be made by those skilled in the art without departing from the spirit of the invention. For example, it is expressly intended that all combinations of those elements and/or method steps which perform substantially the same function in substantially the same way to achieve the same results are within the scope of the invention. Moreover, it should be recognized that structures and/or elements and/or method steps shown and/or described in connection with any disclosed form or embodiment of the invention may be incorporated in any other disclosed or described or suggested form or embodiment as a general matter of design choice. It is the intention, therefore, to be limited only as indicated by the scope of the claims appended hereto.

Claims
  • 1. A method of performing a Monte Carlo analysis using a graphical processor unit, comprising the steps of: allocating individual data sets to respective pixel locations in a graphical processor unit memory for a Monte Carlo simulation; andcalculating the outcome of the Monte Carlo simulation for each data set using stream processing in the graphical processor unit.
  • 2. The method of claim 1, wherein the Monte Carlo simulation simulates propagation of a particle through a medium.
  • 3. The method of claim 1, wherein the Monte Carlo simulation simulated propagation of a photon in a sample tissue.
  • 4. The method of claim 3, wherein the outcome is used for in vivo imaging.
  • 5. The method of claim 1, wherein the individual data sets represent starting points of photons in a sample for bioluminescence molecular imaging and the Monte Carlo simulations simulate propagation of the photons through a tissue.
  • 6. The method of claim 1, wherein the individual data sets represent starting points of excitation light for fluorescence molecular imaging and the Monte Carlo simulations simulate propagation of the photons through a tissue.
  • 7. The method of claim 6, wherein the outcome of the Monte Carlo simulations yields a distribution of excitation energy within the tissue, wherein a further step of allocating is performed to allocate starting points of fluorescence photons and a further step of calculating is performed, the Monte Carlo simulation of the second step of calculating simulating propagation of the fluorescence photons in the tissue.
  • 8. The method of claim 1, wherein said step of allocating comprises creating a bit map image, wherein at least one of the red, green, blue, and alpha channels of each pixel of the bit map image includes values representative of the data set.
  • 9. The method of claim 8, wherein the data sets each represent a two dimensional location and two of the red, green blue, and alpha channels represent x, y coordinates of the location.
  • 10. The method of claim 8, wherein the data sets each represent a three dimensional location and three of the red, green blue, and alpha channels represent x, y, z coordinates of the location.
  • 11. The method of claim 1, further comprising the step of accumulating statistical distribution of the outcomes of the Monte Carlo simulations.
  • 12. A computer system for performing Monte Carlo simulations, comprising: a central processing unit;a main memory; anda graphical processing unit with a plurality of pixel shaders and a graphical processing unit memory;the central processing unit running an application comprising computer executable steps of allocating individual data sets to respective pixel locations in a graphical processor unit memory for a Monte Carlo simulation, and calculating the outcome of the Monte Carlo simulation for each data set using stream processing in the graphical processor unit.
  • 13. The computer system of claim 11, wherein the application further comprising computer executable step of accumulating statistical distribution of the outcome of the Monte Carlo simulations.
  • 14. The computer system of claim 11, wherein the Monte Carlo simulation simulates propagation of a particle through a medium.
  • 15. The computer system of claim 11, wherein the Monte Carlo simulation simulated propagation of a photon in a sample tissue.
  • 16. The computer system of claim 15, wherein the outcome is used for in vivo imaging.
  • 17. The computer system of claim 11, wherein the individual data sets represent starting points of photons in a sample for bioluminescence molecular imaging and the Monte Carlo simulations simulate propagation of the photons through a tissue.
  • 18. The computer system of claim 11, wherein the individual data sets represent starting points of excitation light for fluorescence molecular imaging and the Monte Carlo simulations simulate propagation of the photons through a tissue.
  • 19. The computer system of claim 18, wherein the outcome of the Monte Carlo simulations yields a distribution of excitation energy within the tissue, wherein a further step of allocating is performed to allocate starting points of fluorescence photons and a further step of calculating is performed, the Monte Carlo simulation of the second step of calculating simulating propagation of the fluorescence photons in the tissue.
  • 20. The computer system of claim 11, wherein said step of allocating comprises creating a bit map image, wherein at least one of the red, green, blue, and alpha channels of each pixel of the bit map image includes values representative of the data set.
  • 21. The computer system of claim 20, wherein the data sets each represent a three dimensional location and three of the red, green blue, and alpha channels represent x, y, z coordinates of the location.
CROSS REFERENCE TO RELATED APPLICATIONS

The present invention claims priority to U.S. Provisional Application No. 60/810,957, filed on Jun. 5, 2006.

Provisional Applications (1)
Number Date Country
60810957 Jun 2006 US