Fast Monte Carlo simulation of full-spectrum backscattered diffuse reflectance (F-BDR) and FD-OCT
The code is builded in MATLAB R2020a and ANSI C. Please install the MatScat in your MATLAB.
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.
Run GenTissue.m to generate the simulation setting at all wavelengths.
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
...
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.
- 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
- ...
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
The codes are built on MatScat, open-source codes in OMLC and OCT_MC. We sincerely appreciate the authors for sharing their codes.