1 Introduction

Nowadays, there are a lot of applications of visible photons in health, so they have become more important in the diagnostic and therapy for different pathologies [1,2,3,4]. However, it has to deal with the presence of high scattering and high absorption in biological tissues. To tackle the problem is required to comprehend the behavior of light inside the irradiated medium or biological tissue, it can be estimated from model calculations using measured optical properties or direct measurements. Specifically, photon transport simulations using Monte Carlo technique have offered a useful tool to develop codes that can be used to estimate light distribution with different geometries and optical properties. Then, the light transport simulation has been applied in optical imaging or phototherapy [5,6,7,8,9]. The optical dosimetry can be computed by Monte Carlo simulation in depth lesions using optical fiber or a biological carrier for treatment [2] and superficial lesions with an external light source, in photodynamic therapy, etc. On the other hand, in the diagnostic when the source is distributed inside the tissue [10,11,12], it is usually applied to superficial lesions due to light must goes through small thickness of tissue plus the skin to reach the detector [13]. It is noteworthy, that the detector quantifies ballistic and diffuse photons in optical imaging technique. In the transport simulation model were considered both kinds of photons: (a) ballistic photons (those that were not reflected at first interface and those that went through the medium 1 – medium 2 – medium 1 without interacting) [14], (b) diffuse photons (those that interact with medium 2) [15, 16]. In diagnostic, the mentioned photons have influence on image quality and; in therapy, they determine the possible damage to the tissue. To understand and analyze the behavior of photons and improve the therapy or diagnostic techniques, it has been performed transport simulations of visible photons in homogeneous medium, heterogeneous medium, biological tissue, etc. [17,18,19]. However, to accomplish visible photons transport, it is necessary to know the probabilities of light interaction with the biological tissue or some optically equivalent medium, through the reduced scattering coefficient (\( {\mu}_s^{\prime } \)), scattering coefficient (μ s ), absorption (μ a ), total (μ t ), and anisotropy (g) as a function of wavelength (λ) [20,21,22,23,24]. Furthermore, it is known that the accuracy of \( {\mu}_s^{\prime }={\mu}_s\left(1-g\right) \) depends on how well were made the diffuse light measurements. In many cases, \( {\mu}_s^{\prime } \), μ s , μ a , μ t and g have been measured in vitro and in vivo for different types of tissue and these quantities have shown differences of one order of magnitude or greater [21, 23,24,25].

Therefore, the aim of this work was to develop an event-by-event Monte Carlo code for light transport to identify and quantify ballistic, diffuse and absorbed photons, as well as their interaction coordinates inside the biological tissue.

2 Method

A new Monte Carlo code called MCLTmx code (Monte Carlo Light Transport mx) was developed in C++ language (Dev-C++ compiler) for visible photons transport according to previously published data [20, 25,26,27]. All random variable involved in light transport was obtained with Monte Carlo technique. The mean free path length was computed between two interactions considering photon scattering and absorption processes, if necessary scattering angles were calculated, until the photon disappeared or went out of region of interest. A three-layer array (medium 1 – medium 2 – medium 1) was used, forming a semi-infinite sandwich (Fig. 1). The source was placed at (0, 0, 0), emitting towards positive Z, where initial directional cosines were (0, 0, 1). Input data were: refractive indices, target thickness, number of particle histories, and λ from which the code calculated anisotropy factor and scattering and absorption coefficients. Output data are specular reflection (SRfx), diffuse reflection (DRfx), ballistic transmission (BTrmt), diffuse transmission (DTrmt), total transmission (TTrmt), and absorption (Abs). Additionally, the MCLTmx code has the option to save reflection, transmission, and interaction coordinates.

Fig. 1
figure 1

Sandwich geometry used in Monte Carlo simulation

2.1 Ballistic photons

Reflected ballistic photons in the first interface were identified if randomly number generated was less than or equal to the specular reflection [27], if this number is larger, the photon gets into the diffusive medium 2, assuming its first interaction would be beyond the second boundary and if not reflected on it, the photon was quantified as transmitted ballistic photon. The simulated BTrmt was compared against theoretical transmittance given by the Beer-Lambert expression.

2.2 Diffuse photons

Data reported in literature for tissue interaction coefficients are different until one order of magnitude for same tissue, so that in this work were used those with greater agreement. The relationship between the angles of incidence and refraction was obtained by Snell’s law. Interaction probabilities inside tissue as a function of wavelength were calculated by reduced dispersion coefficient obtained from (Jacques SL, 2013) [23] with the following equation,

$$ {\mu}_s^{\prime}\left(\lambda \right)=46{\left(\frac{\lambda }{\left(500\ nm\right)}\right)}^{-1.421}\kern1em \left[{cm}^{-1}\right] $$
(1)

Anisotropy was obtained from [22] using the following function,

$$ g\left(\lambda \right)=0.943-5.6{e}^{-0.0084\ \lambda } $$
(2)

Using Eqs. 1 and 2, the dispersion coefficient was obtained by the following equation,

$$ {\mu}_s\left(\lambda \right)=\frac{\mu_s^{\prime }}{\left(1-g\left(\lambda \right)\right)} $$
(3)

On the other hand, the absorption coefficient as a function of wavelength was obtained from the data shown in [21] with following equation,

$$ {\mu}_a\left(\lambda \right)=\left\{\begin{array}{c}5.54+2939.68\left(\frac{32.7}{4{\left(\lambda -414.8\right)}^2+{32.7}^2}\right)\kern1.5em si\ 350\le \lambda <510\ \left[ nm\right]\\ {}2.30+1073.01\left(\frac{81.2}{4{\left(\lambda -550\right)}^2+{81.2}^2}\right)\kern2em si\ 510\le \lambda \le 750\ \left[ nm\right]\end{array}\right. $$
(4)

It is noteworthy that, in validation case the following input data were used: 0.02 cm medium thickness with the following optical properties, μ s  = 90cm −1, μ a  = 10cm −1, g =  . 75, n 2 = 1 y n 2 = 1.0001, agreement with reported in [26, 27], also 0.05, 0.1, 0.5, and 1 cm thicknesses were used to compute DRfx, BTrmt, DTrmt, and Abs.

On the other hand, to obtain DRfx, BTrmt, DTrmt, and Abs for air-tissue-air geometry, the MCLTmx code requires the following input data: wavelengths to calculate the quantities mentioned in Eqs. 1 to 4, refractive indices, target thickness (tissue), and number of particle histories. 0.02, 0.05, 0.1, 0.5, and 1 cm thicknesses and 350, 400, 450, 500, 532, 550, 600, 633, 650, 700, and 750 nm wavelengths were used.

3 Results

It was verified that random numbers generator had a uniform distribution between 0 and 1. If this condition is not satisfied, diffuse reflectance and transmittance can shift until 25% in validation case.

To ensure that light transport was correct, the validation was performed using a semi-infinite sandwich geometry, five simulations were carried out with 1 × 107 number of particle histories for each one. For 0.02 cm thickness, following results were obtained: SRfx = 6.17 × 10−5 ± 1.7 × 10−6, DRfx = 0.09743 ± 7.4 × 10−5, BTrmttheoretical = 0.13533, BTrmt = 0.13542 ± 1.12 × 10−4, DTrmt = 0.52549 ± 1.1 × 10−4, TTrmt = 0.66092 ± 1.1 × 10−4, and Abs = 0.24157 ± 1.4 × 10−4. Diffuse reflectance obtained with MCLTmx was compared with previous studies [27], where DRfx are 0.09711 (Prahl et al.), 0.09734 (MCML), and 0.09739 (van de Hust), these values showed differences smaller than 0.1% respect to Prahl et al. [26] and less than 0.01% respect to MCML and Van de Hust (1980) as is shown in Wang et al. [27]. On the other hand, total transmissions were 0.66159, 0.66096 and 0.66096 for Prahl et al. (1989), MCML and Van de Hust (1980), respectively, these values showed differences smaller than 0.101% respect to that calculated with MCLTmx. Besides that, thicknesses mentioned in method section were used, it was found that the standard deviation calculated for MCLTmx code is increased as a function of thickness from 0.5 to 2% for all quantities, except for diffuse or total transmittance (where ballistic is zero) with 0.5 cm thickness, where standard deviation was 14.41%, because only 5 to 7 photons can escape from second layer with that thickness, running 1 × 107 number of particle histories. The behavior of each quantity mentioned is shown in Fig. 2.

Fig. 2
figure 2

Reflectance, transmittance, and absorbance vs thickness (validation), where BTrmtfit is an analytical function fitted to data of ballistic transmission (BTrmt)

The total attenuation coefficient was also calculated and corroborated with data from Fig. 1 corresponding to BTrmt. It presented a difference of 0.11% with that used as input data in the simulation. Also, from Fig. 1, the following amounts: DRfx, BTrmetric, BTrmt, DTrmt, TTrmt, and Abs can be determined as a function of thickness of the propagation medium, as well as they can be useful for optical dosimetry, because the code allows to know the amount of energy deposited within the target region as a function of the incident beam. On the other hand, it is possible to know the number of photons that leave the medium and its output coordinates, this will allow the reconstruction of images for optical diagnostic.

DRfx, BTrmttheoretical, BTrmt, DTrmt, TTrmt, and Abs as a function of wavelength and thickness for the biological tissue were obtained, and show in Fig. 3.

Fig. 3
figure 3

Thickness effect on diffuse reflectance (DRfx), where 350 to 750 represent the wavelength of the source

Figure 4 shows that the diffuse transmittance as a function of wavelength and thickness, which agrees with that observed experimentally.

Fig. 4
figure 4

Thickness effect on diffuse transmittance (DTrmt), where 350 to 750 represent the wavelength of the source

Absorbance data as a function of wavelength and thickness are also available as shows in Fig. 5, this will allow to perform optical dosimetry applied for example, in photodynamic therapy, etc.

Fig. 5
figure 5

Thickness effect on light absorption in biological tissue (Abs), where 350 to 750 represent the wavelength of the source

Although the MCLTmx code performs light transport correctly, the results of the Figs. 3, 4 and 5 depend on the accuracy of the scatter and absorption coefficients used. Simulation time was less than 10 min using a 2.7 GHz processor.

4 Discussion

After validating the MCLTmx code, the quantities DRfx, BTrmttheoretical, BTrmt, DTrmt, TTrmt, and Abs for the biological tissue were obtained, increasing the thickness of tissue and wavelength of the incident light, with 1 × 107 number of particle histories with five simulations for each case. It is noteworthy that, the differences in each of five simulations were less than 1%, this cause that the error bars are not visible in Figs. 3, 4, and 5. Except for three cases, which were less than 6%. From Fig. 3, the diffuse reflection does not present a pattern as a function of the wavelength, but it reaches a minimum or maximum, which is different for each wavelength. It is noteworthy that, the MCLTmx code has advantage over other Monte Carlo simulations [19, 26, 27], because each quantity mentioned above is calculated separately, at this stage is able to simulate three-dimensional transport in homogeneous biological structures in a sandwich geometry or any volume determined by mathematical functions as spheres, ellipses, etc. Nevertheless, the MCLTmx code cannot perform simulation in heterogeneous biological structures because does not support a rectangular spatial grid like that reported in (Majaron B, 2015) [19].

Ballistic transmittance decreases when energy decreases or wavelength increases and it becomes almost zero from 0.05 cm onwards in biological tissue; these results were agreement with theoretical transmittance given by the Beer-Lambert expression and those reported in literature, where it was shown that the imaging-depth range remains limited to 0.1 cm at best in human soft tissues because of aberrations and multiple scattering [28, 29], then thickness and ballistic photon fluence limit the image quality of ballistic optical tomography, due to many methods have been developed to increase this imaging-depth range [30].

On the other hand, diffuse photons are useful in biomedical optics and medicine, for example in optical coherence tomography (OCT), OCT performs high resolution, cross-sectional imaging of the internal microstructure in biological tissues by measuring echoes of backscattered light [31, 32], the MCLTmx code could be useful in OCT because it can follow all photons and promises to be useful in many clinical applications.

Adding up ballistic and diffuse contributions from results, it was obtained the known light behavior at macroscopic level, that is, the total transmittance increases with the wavelength. Additionally, the MCLTmx code shown that transmitted light at the macroscopic level is mainly due to diffuse radiation contribution, because the diffuse transmittance is greater one order of magnitude than ballistics transmittance for thicknesses of up to 0.5 cm. The above could be considered in image reconstruction where the ballistic part of the beam is mainly considered, for example, in fluorescence microscopy where both contributions are separated to better the image quality [33]. On the other hand, it was reported a computational technique that uses all photons to form an image, opening new avenues in non-invasive testing, analysis, and diagnosis [34], and it presents another potential use for the MCLTmx code. Mentioned studies are related to optical window, it defines the range of wavelengths where light has its maximum depth of penetration in biological tissue, so it is primarily limited by absorption process. Therefore, the results in Figs. 3, 4, and 5 are useful to determine the optical window in that specific tissue. In general, the MCLTmx code could make it possible to compute the optical windows of any kind of biological tissue using their respective cross-sections in the simulation. Another advantage of this new code is that can be determined which wavelength will be optimal to make an optical image in a specific case because the code allows to work with a spectrum of wavelengths. It may also be used in Cerenkov imaging technique because in this effect is emitted a light spectrum [12]. Currently Cerenkov luminescence (CLT) tomography is a novel imaging modality to study charged particles with optical methods by detecting the Cerenkov luminescence produced in tissue; it is a powerful imaging technique that allows dynamically and three-dimensionally resolving the metabolic process of radiopharmaceuticals. It uses optical method to detect radiopharmaceuticals with low cost and high sensitivity. However, because of the strong absorption and scatter of biological tissues, the reconstruction of CLT is always converted to an ill-posed linear system which is hard to solve, so they are continuously developed reconstruct algorithms [35,36,37]. Therefore, the MCLTmx code will become a useful tool to reconstruct a Cerenkov image or correct it if it is reconstructed by another method as mentioned in (Liu H, 2016; Zhong J, 2011) [35, 36].

In general, the MCLTmx code can be applied in biomedicine specifically in optical imaging and optical dosimetry, using following input data: anisotropy, refractive indices, dispersion and absorption coefficients of the medium, and wavelength of incident light. Also, the light transport in other materials using the MCLTmx code is possible by changing the corresponding cross-sections and all input data.

5 Conclusions

An efficient code was developed to perform light transport in biological tissue called MCLTmx. It allows to know the specular reflection, diffuse reflection, ballistic and diffuse transmission, and absorption of photons for wavelengths from 350 to 750 nm; although, this can be changed to increase or decrease the interval.

The new code can also save the coordinates of each interaction, so it is a useful tool for optical dosimetry and optical imaging.

In general, the MCLTmx code will be useful for light transport inside any medium, using the corresponding values of refractive indices, anisotropy, scattering and absorption coefficients, and wavelength.