Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Reply to “Comment on ‘A study on tetrahedron-based inhomogeneous Monte-Carlo optical simulation’”

Open Access Open Access

Abstract

We compare the accuracy of TIM-OS and MMCM in response to the recent analysis made by Fang [Biomed. Opt. Express 2, 1258 (2011)]. Our results show that the tetrahedron-based energy deposition algorithm used in TIM-OS is more accurate than the node-based energy deposition algorithm used in MMCM.

©2011 Optical Society of America

Reply

Simulation speed

In [2], we compared the latest versions of several optical Monte Carlo (MC) simulation packages with our recently developed TIM-OS [1]. Particularly, MMCM was downloaded on September 29, 2010 from its website (http://mcx.sourceforgo.net/mmc) and compiled with the best setting in the package. As shown in Dr. Fang’s comment [5], he recently updated the MMCM package that now takes advantage of the SSE instructions and the Intel compiler, yielding a substantial performance gain. However, the latest MMCM still does not take the thread racing condition into account. As pointed out by Alerstam [4], thread racing may compromise data integrity. We also observed this problem in the MMCM results.

It is underlined that TIM-OS photon-tetrahedron intersection style has a less computational complexity than the Plücker-coordinate scheme used in MMCM [2,5]. When we do photon-tetrahedron intersection tests, a photon is actually inside a tetrahedron. Such a tight restriction on the position of the photon greatly reduces the computational complexity. As a result, while the Plücker-coordinate algorithm utilizes all the equations in [3], the original TIM-OS algorithm only uses the popular ray-plane intersection equation.

Simulation accuracy

Figure 1 illustrates the problem in [5]. While the solid curve shows the true value ytruth, ymmc(i) and ytimos(i) are the values used in [5] to compare MMCM and TIM-OS. However, each ytimos(i) datum he used had two parts: ytimos(i)=((i1)ΔxiΔxf(x)dx+iΔx(i+1)Δxf(x)dx)/2, where (i1)ΔxiΔxf(x)dx and iΔx(i+1)Δxf(x)dx were the values TIM-OS estimated at the positions (i1/2)Δx and (i+1/2)Δx, respectively. Hence,ytimos(i) actually was a linear interpolation of two TIM-OS results. It is not fair to compare a linearly interpolated TIM-OS result to a directly computed MMCM result.

 figure: Fig. 1

Fig. 1 Illustration of the problem in Dr. Fang’s Comment.

Download Full Size | PDF

To address this discrepancy for the problem shown in Fig. 1, we compared the results of MMCM and TIM-OS to the true value 1/(iΔx) at an arbitrarily selected point iΔx. In this case, by the meshing requirements of the two simulators, the integral range for MMCM was from (i1)Δx to (i+1)Δx and the range for TIM-OS was from (i1/2)Δx to (i+1/2)Δx. We have

ytruth=f(x)=1/xymmc=((i1)Δx(i+1)Δxf(x)φi(x)dx)/Δx=((i+1)ln(i+1)+(i1)ln(i1)2iln(i))/Δxytimos=((i1/2)Δx(i+1/2)Δxf(x)dx)/Δx=(ln(i+1/2)ln(i1/2))/Δx

Then, the relative errors for MMCM and TIM-OS were derived as

errormmc=(ymmc1/iΔx)iΔx=i(i+1)ln((i+1)/i)i(i1)ln(i/(i1))1errortimos=(ytimos1/iΔx)iΔx=i(ln(i+1/2)ln(i1/2))1

Therefore limi>errormmc/errortimos=2. Figure 2 plots errormmc/errortimos for 2i20.

 figure: Fig. 2

Fig. 2 Comparison of MMCM and TIM-OS in terms of the relative error.

Download Full Size | PDF

Furthermore, we considered a more realistic example in which a pencil beam passed through an absorbing-only media, and the intensity of the light beam would obey Beer’s law along the light path. We got similar result: limΔx>0errormmc/errortimos=2 and errormmc/errortimos>1 for Δx>0. We also set up a mesh to test MMCM and TIM-OS under the above condition. Our experimental results are in an excellent agreement with the analytical prediction. We prepared a package containing all the files for the reader to repeat the experiments, which can be downloaded from http://imaging.sbes.vt.edu/software/tim-os.

Acknowledgment

The work is partially supported by NIHR01HL098912.

References and links

1. H. Shen and G. Wang, “A tetrahedron-based inhomogeneous Monte Carlo optical simulator,” Phys. Med. Biol. 55(4), 947–962 (2010). [CrossRef]   [PubMed]  

2. H. Shen and G. Wang, “A study on tetrahedron-based inhomogeneous Monte Carlo optical simulation,” Biomed. Opt. Express 2(1), 44–57 (2011). [CrossRef]   [PubMed]  

3. J. Havel and A. Herout, “Yet faster ray-triangle intersection (using SSE4),” IEEE Trans. Vis. Comput. Graph. 16(3), 434–438 (2010). [CrossRef]   [PubMed]  

4. E. Alerstam, W. C. Yip Lo, T. D. Han, J. Rose, S. Andersson-Engels, and L. Lilge, “Next-generation acceleration and code optimization for light transport in turbid media using GPUs,” Biomed. Opt. Express 1(2), 658–675 (2010). [CrossRef]   [PubMed]  

5. Q. Fang, “Comment on ‘A study on tetrahedron-based inhomogeneous Monte-Carlo optical simulation’,” Biomed. Opt. Express 2, 1258–1264 (2011).

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (2)

Fig. 1
Fig. 1 Illustration of the problem in Dr. Fang’s Comment.
Fig. 2
Fig. 2 Comparison of MMCM and TIM-OS in terms of the relative error.

Equations (2)

Equations on this page are rendered with MathJax. Learn more.

y t r u t h = f ( x ) = 1 / x y m m c = ( ( i 1 ) Δ x ( i + 1 ) Δ x f ( x ) φ i ( x ) d x ) / Δ x = ( ( i + 1 ) ln ( i + 1 ) + ( i 1 ) ln ( i 1 ) 2 i ln ( i ) ) / Δ x y t i m o s = ( ( i 1 / 2 ) Δ x ( i + 1 / 2 ) Δ x f ( x ) d x ) / Δ x = ( ln ( i + 1 / 2 ) ln ( i 1 / 2 ) ) / Δ x
e r r o r m m c = ( y m m c 1 / i Δ x ) i Δ x = i ( i + 1 ) ln ( ( i + 1 ) / i ) i ( i 1 ) ln ( i / ( i 1 ) ) 1 e r r o r t i m o s = ( y t i m o s 1 / i Δ x ) i Δ x = i ( ln ( i + 1 / 2 ) ln ( i 1 / 2 ) ) 1
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.