Dear Dr. Fang,
I am working on a project involving MC simulations in layered media. I would be grateful if you could provide some guidance on the following issues to enable us start using the MCX code:
1) For the mcxlab 2020 version software package, after downloading and extracting, the main mcxlab function file and .mex file appear to be missing (needed to run the mcxlab). I just wanted to ask your advice on where we could obtain these files from. Also, would an earlier version of the mex file work for the 2020 mcxlab package and would the function file (found online) work for any version of mcxlab?
2) Can the MC code output the total pathlength travelled by each photon in each tissue type?
3) Can we output the x,y,z locations and tissue type at that particular location as each photon travels through the medium?
These are the queries I have and I'm eagerly looking forward to hearing from you!
Best,
Saurabh
Dear Dr. Fang,
I am working on a project involving MC simulations in layered media. I would be grateful if you could provide some guidance on the following issues to enable us start using the MCX code:
1) For the mcxlab 2020 version software package, after downloading and extracting, the main mcxlab function file and .mex file appear to be missing (needed to run the mcxlab). I just wanted to ask your advice on where we could obtain these files from. Also, would an earlier version of the mex file work for the 2020 mcxlab package and would the function file (found online) work for any version of mcxlab?
hi Saurabh,
it sounds like you've downloaded the mcx source code package?
please download and extract the mcxlab package built for your
platform, you should see mcx.mex* and mcxlab.m in the top folder.
mcx.mex is for GNU Octave, we have only been successful in
compiling it for Linux so far, is that what you are looking for?
2) Can the MC code output the total pathlength travelled by each photon in each tissue type?
yes, mcx/mcxlab outputs partial pathlength, see README
https://github.com/fangq/mcx#detected-photon-data
https://github.com/fangq/mcx/blob/master/mcxlab/mcxlab.m#L197
https://github.com/fangq/mcx/blob/master/mcxlab/mcxlab.m#L257-L258
https://github.com/fangq/mcx/blob/master/mcxlab/mcxlab.m#L313
3) Can we output the x,y,z locations and tissue type at that particular location as each photon travels through the medium?
yes, trajectory data are returned as the 5th output of mcxlab
https://github.com/fangq/mcx/blob/master/mcxlab/mcxlab.m#L271-L278
https://github.com/fangq/mcx/blob/master/mcxlab/mcxlab.m#L317
let me know if you have further questions.
Qianqian
These are the queries I have and I'm eagerly looking forward to hearing from you!
Best,
Saurabh
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/46748b70-ceab-4d83-bed7-cec6a71f1701n%40googlegroups.com.
Hello Dr. Fang,Thank you very much for your prompt response.First, I read through the links that show where I can find the partial pathlength. But, it says that it computes and gives the cumulative pathlength of all mediums. If suppose I have 2 or 3 mediums, is it possible to find out the pathlength for each medium the photon travels through individually?
I still don't fully understand what you are looking for - yes,
the partial pathlength is accumulated pathlengths in each medium per
photon. if you have 3 medium, each detected photon
outputs 3 numbers, representing the total paths it travels in each
medium.
Second, regarding the trajectory, the 5th output of mcxlab gives the trajectory of each photon at only one location. It has the format - (id,x,y,z,weight,reserved). I have 2 questions pertaining to this. In this format, x,y,z represent which position of the photon? Also, can the code help me get the x,y,z locations at every position the photon travels inside the medium?(since it just shows me values for just one position now?)
the x/y/z coordinates on those trajectories are in voxel units,
so a simple rounding operation can convert them to the voxel i/j/k
indices, and you can use that voxel index to look up the medium
type, is this what you are looking for?
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/68e69838-6ae4-4636-9fcd-ee260f159218n%40googlegroups.com.