On 08/29/2011 05:37 AM, Yamashita Okito wrote:
Dear Dr.Qiangqian
I am Okito Yamashita, a researcher in ATR in Kyoto.
(Takeaki Shimokawa who previously asked a question about cuda is
my collegue.)
I am sorry for asking questions not using the mailing-list.
Dear Okito
Apologize for the delay to get back to you.
Last week I was out of office for a few days.
I am now
using your MCX (ver 0.5) software to make a forward model for NIRS
experiments.
However I am now confused about how the coordinate of voxel spece
and sourse position is defined.
Would you give me some idea what some lines of the .inp file mean?
1000000 # total photon, use -n to overwrite in the command line
29012392 # RNG seed, negative to generate
30.0 30.0 1.0 # source position (in grid unit)
0 0 1 # initial directional vector
0.e+00 1.e-09 1.e-10 # time-gates(s): start, end, step
semi60x60x60.bin # volume ('unsigned char' format)
1 60 1 60 # (the first number is not used), dim, start/end indices
1 60 1 60 # (the first number is not used), dim, start/end indices
1 60 1 60 # (the first number is not used), dim, start/end indices
1 # num of media
1.010101 0.01 0.005 1.37 # scat. mus (1/mm), g, mua (1/mm), n
4 1 # detector number and radius (in grid unit)
30.0 20.0 1.0 # detector 1 position (real numbers in grid unit)
30.0 40.0 1.0 # ...
20.0 30.0 1.0
40.0 30.0 1.0
The above is an example .inp file you mention in the documentation
of MCX. Actually I have two questions.
It does seems to be confusing. let me explain.
The
first one is about lines 7-9 and line 3. I suppose lines 7-9,
respectively, defines x,y,z coordinate for each voxel of
semi60x60x60.bin but I had unexpected results as follows.
When I tried your default settings, I had a result (let's say
Result1).
When I changed the lines 7-9 to 1 60 2 61 from 1 60 1 60, I had
another result (Result2).
Result2 was different from Result1 as I had expected.
When I changed the line 3 to 30 30 0 from 30 30 1, while keeping
other settings unchanged, now I had an error which says improper
source position. This was unexpected.
In case of Result2, source position 30,30,1 is also out of the
range [2:61 2:61 2:61] but it worked. The third setting did not
work. How do I interpret this results ? Wolud you let me know
what lines 7-9 means and how they are related to line3 ?
For lines#7-9, the 3rd and 4th numbers are not explained well.
The 3rd column defines a 3D point (in voxel/grid unit), the 4th
column
defines another point. These two points define a rectangular
region. When you run mcx_cached or mcx_det_cached, this region
will be stored inside the shared memory when you specify "-R -1"
in the command line. Any other cases, this input will be ignored.
The
second question is about the detector positions.
in MCX, there is a command line option --srcfrom0. By
default, srcfrom0 is turned off (0). That means all src/det
coordinates assumes a volume with an origin of (1,1,1).
The origin is located at the exterior corner (tip) of the
first voxel. When you set "--srcfrom0 1" in the command
line, the origin becomes (0,0,0).
Your
program works even if line12 is changed to 0 1 and the following
lines are deleted.
How does the result from this setting differ from your default
setting ?
if you do not define any detectors, you will not be able to
detect any photons from the detector (the .mch file should
contain no record).
I have read your documentation carefully but I have not found any
description on the topics above.
I would really appreciate it if you would give me any idea.
Please let me know if this explanation match what you have observed.
If not, I can debug the code to see if there is a bug in the code.
Qianqian
Best regards
Okito Yamashita
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.