Colin27 Example

82 views
Skip to first unread message

Gang Li

unread,
Jan 14, 2025, 9:20:15 AM1/14/25
to mcx-users
Hi Dr Fang,

I am trying to reproduce the Fig. 4 in your original MMC paper, according to your guide in README.txt. I have successfully completed steps 1 to 3 as outlined below. However, I couldn't complete step 4 because after step 3 there is no data saved as brain.dat, I just found a filesaved as brain.nii. Could you help me address this problem? 
For your reference, the Colin27 example I used is from MCXStudio-win64-v2024.2\MCXStudio\MCXSuite\mmc\examples\colin27
The outputs after running run_test.sh have been attached below.
==================
1. First, you need to download the Colin27 atlas mesh from

   http://mcx.sourceforge.net/cgi-bin/index.cgi?MMC/Colin27AtlasMesh
   
   after download, you should extract file "MMC_Collins_Atlas_Mesh_Version_2L.mat"
   and put it under this folder

2. Start matlab, run createmesh to generate all the mesh files.

3. run the simulation bash script run_test.sh

4. The time-resolved fluence/flux maps will be saved in a
file named brain.dat. You can then load it to make plots.
You will need the qmeshcut function from iso2mesh toolbox.
Please refer to examples/meshtest/plotmmcsph.m script for
more details.
==================
屏幕截图 2025-01-13 213823.png
屏幕截图 2025-01-13 214644.png
Thanks.
Gang

Qianqian Fang

unread,
Jan 14, 2025, 11:10:18 AM1/14/25
to mcx-...@googlegroups.com, Gang Li

hi Gang,

after we published the DMMC and GPU-MMC papers (see below)

http://dx.doi.org/10.1117/1.JBO.24.2.020503
http://dx.doi.org/10.1117/1.JBO.24.11.115002

the DMMC (dual-grid MMC) method has been set as the default method for MMC running on OpenCL (--gpuid >=1) because of its higher accuracy and speed.

because DMMC outputs fluence in a voxelated grid, just like what MCX does, the output type of this example has been switched to a volume data format, NIfTI (.nii), see the -F nii flag in the run_test.sh

the output file brain.nii contains a 4D array which can be loaded using loadnifti() provided by the jsonlab toolbox: https://github.com/NeuroJSON/jsonlab

if you want to save fluence on each mesh node instead of a 3D array, you must add "-M S" in the command line, and set -F to ascii. this returns to the output before switching to DMMC.


Qianqian

--
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 visit https://groups.google.com/d/msgid/mcx-users/c88b736d-b8d7-44c1-be33-f3aa0201c70an%40googlegroups.com.

Gang Li

unread,
Jan 14, 2025, 12:06:22 PM1/14/25
to mcx-users
Hi Dr Fang,

Thank you for your reply. I have downloaded jsonlab. Could you outline the steps to load brain.nii using loadnifti() and plot the influence? 

Thanks.
Gang

Qianqian Fang

unread,
Jan 14, 2025, 12:10:50 PM1/14/25
to mcx-...@googlegroups.com, Gang Li

data = loadnifti('brain.nii');

cwfluence=sum(data.NIFTIData, 4);

mcxplotvol(log10(abs(cwfluenc)));


to use mcxplotvol(), you need to add path to mcx/utils folder.

Reply all
Reply to author
Forward
0 new messages