Skip to content

Importance sampling-accelerated Monte Carlo simulation of full-spectrum backscattered diffuse reflectance and FD-OCT

Notifications You must be signed in to change notification settings

Jianing-Mao/fullwaveOCT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Full-Spectrum-Monte-Carlo

Fast Monte Carlo simulation of full-spectrum backscattered diffuse reflectance (F-BDR) and FD-OCT

full-wavelength FD-OCT B-scan image

Get Started

The code is builded in MATLAB R2020a and ANSI C. Please install the MatScat in your MATLAB.

Prepare scattering parameters

Run TT_para_gen.m to generate the wavelength-dependent parameters for TT scattering phase functions.

Run mus_gen.m to generate the wavelength-dependent scattering coefficients.

Make sure the parameters (wavelength, angles, diameter, RI, number density...) are the same in both files. Copy the outputs to the code directory.

Begin Monte Carlo simulation

Step I: prepare the tissue

Run GenTissue.m to generate the simulation setting at all wavelengths.

Step II: run the Monte Carlo

For the A-line F-BDR simulation:

Compile the fullwaveMC.c

gcc fullwaveMC.c -lm -o test

Run the generated file with two arguments: (1) arg1:1/0, 1 means continuous simulation up to the wavelength sampling point specified in arg2, 0 means a single simulation of a wavelength sampling point specified in arg2; (2) arg2: 1-samplePoints, wavelength sampling point. For example, continuous simulation from sampling points 1-1024:

./test 1 1024

For the B-scan simulation:

Compile the fullwaveMC_Bscan.c

gcc fullwaveMC_Bscan.c -lm -o test

Run the generated file with one arguments: (1) arg1: the index of the detectors:

./test 128

You can generate a Bscan by running the simulation of all of the detector in parallel:

./test 1
./test 2
...

Step III: show the results

For the A-line F-BDR simulation:

Run lookFBDR.m to show the F-BDR result.

For the B-scan simulation:

Run lookFBDR_Bscan.m to show the F-BDR result.

Run lookImage_Bscan.m to show the B-scan image with full-wavelength information.

Example

To be implemented

  • Integrate all parameters and procedures into a calling function (now we need to carefully check the parameters of the generation, running, and viewing codes)
  • More realistic light source
  • ...

Citation

If you use this code in your own research, please cite the following papers:

https://opg.optica.org/boe/fulltext.cfm?uri=boe-14-9-4644&id=536404

https://opg.optica.org/boe/fulltext.cfm?uri=boe-13-12-6317&id=518908

Acknowledgement

The codes are built on MatScat, open-source codes in OMLC and OCT_MC. We sincerely appreciate the authors for sharing their codes.

About

Importance sampling-accelerated Monte Carlo simulation of full-spectrum backscattered diffuse reflectance and FD-OCT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published