Comments (8)
Oh! Okay!
No, I just naively wanted the ASCII since I thought it would be more direct/fast to do.
I did not notice the section in the readme about the jnii format, that looks interesting.
Thank you for taking the time to point it out. I'll use this format since its aim seem to be focused at being easy to use and generic. Thank you for the jnii initiative, it looks interesting.
Marc
from mcx.
@PyMarc2, you can set the outputtype to 'energy' and sum the values in the output array for each label mask.
from mcx.
I get this error when outputting in ASCII or BIN in MCX, and MCX-CL
MCXCL ERROR(-2):the specified output data type is not recognized in unit mcx_utils.c:4108
The other output types all work but seem unintelligeable from a human standpoint.
from mcx.
mcx/mcxcl has --outputtype
and --outputformat
. it sounds like you set --outputformat
instead of --outputtype
that I suggested above. can you confirm?
please see the accepted options in the command line
https://github.com/fangq/mcx/blob/v2023/src/mcx_utils.c#L5133-L5137
https://github.com/fangq/mcx/blob/v2023/src/mcx_utils.c#L5163-L5169
in the command line, you set -O E
. in the JSON file, you set Session.OutputFormat
key to "energy"
; in mcxlab, you set cfg.outputtype to 'energy'
for the proper flags to use, see
https://github.com/fangq/mcx/blob/v2023/doc/mcx_command_option_cheatsheet.xlsx
from mcx.
Thank you for your swift answer!
However, I must precise my question.
My question is
How do I get the output arrays.
I thought I had to set the output format to ascii to be able to read the arrays by eye, or with a python script.
What I did
I use the compiled MCXStudio version.
First parameters
Output Type: E- energy density
Output Format: nii
![image](https://private-user-images.githubusercontent.com/31829033/304608119-e5865dc1-7de1-49df-98e6-846d165854de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTMzNDcxODksIm5iZiI6MTcxMzM0Njg4OSwicGF0aCI6Ii8zMTgyOTAzMy8zMDQ2MDgxMTktZTU4NjVkYzEtN2RlMS00OWRmLTk4ZTYtODQ2ZDE2NTg1NGRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDE3VDA5NDEyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM3MGQ3NGMyZWZlNzM2M2UwZDNjNWI0NjJhY2MxZDI2MjcyM2Y0ZmY2NGJhMjdkMjZiMzgzYzM5OWM0Zjg3MTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DPx7kX-keI0G5MZF96OKNPqVtQ6Xd3P36nofxOSbBqI)
When the simulation is run:
mcxcl --session 1 --input C:\Users\marc-\MCXOutput\mcxclsessions\1\1.json --root C:\Users\marc-\MCXOutput\mcxclsessions\1 --outputformat nii --gpu 10000000 --autopilot 1 --photon 1000000 --normalize 1 --save2pt 1 --reflect 1 --savedet 0 --unitinmm 1,00 --seed 1648335518 --atomic 1 --specular 0 --array 0 --dumpmask 0 --repeat 1
This works and outputs the correct file.
Second parameters
Output Type: E- energy density
Output Format: ascii
This is the terminal output:
mcxcl --session 1 --input C:\Users\marc-\MCXOutput\mcxclsessions\1\1.json --root C:\Users\marc-\MCXOutput\mcxclsessions\1 --outputformat ascii --gpu 10000000 --autopilot 1 --photon 1000000 --normalize 1 --save2pt 1 --reflect 1 --savedet 0 --unitinmm 1,00 --seed 1648335518 --atomic 1 --specular 0 --array 0 --dumpmask 0 --repeat 1
EXEPATH=C:\ProgramData\MCXStudio\MCXSuite\mcxcl\bin\mcxcl.exe
EXEPATH=C:\ProgramData\MCXStudio\MCXSuite\mcxcl\bin\mcxcl.exe
"-- Executing Simulation --"
"-- Task completed --"
MCXCL ERROR(-2):the specified output data type is not recognized in unit mcx_utils.c:4108
The error is the same with MCX.
** Finally **
Maybe there is another way of getting the output arrays that I am not aware of.
from mcx.
bin
and ascii
are only valid output formats if you run mmc. see
https://github.com/fangq/mmc/blob/v2023/src/mmc_utils.c#L3094
if you use mcx or mcxcl, they are not supported. please use the recommended jnii or nii format.
https://github.com/fangq/mcx?tab=readme-ov-file#volumetric-output
was there a particular reason you don't want to use nii or jnii?
from mcx.
@fangq
Sorry for the question, but how are the layers labelled?
I have 3 boxes with different materials.
In the output jnii file, I cannot see any label.
The NIFTIData field seem to be populated with the voxel data.
Is there any documentation that teach me how to do so? I couldn't find anything that explain in details.
from mcx.
Hello @fangq
Still couldn't find a way to add labels to the output array.
Any help would appreciated.
I considered manually remembering the indices of the objects I create.
But in the case of spherical shells, I think it would be much easier if there is a label mask.
Thank you!
from mcx.
Related Issues (20)
- Pytorch seems to be broken after calling pmcx.run()
- Tutorial on how to import arbitrary 3d shapes. HOT 1
- Error in make HOT 1
- pmcx buffer overflow error if bc parameter has 12 characters HOT 1
- "misaligned address" error when using cfg.invcdf and cfg.angleinvcdf
- Failed to apply double-float-buffer approach in #41 to `dref` cause loss of accuracy
- Tissue propoerty for different wavelenght HOT 2
- `pmcx.mcxlab` fails to typecast `traj.id` output from float32 to uint32
- mcx2json unable to export simulations of continuously-varying media
- mcxlab: Where to find "sphdiffusionslab.m" required by "demo_validation_heterogeneous.m"? HOT 1
- Support per voxel mua/mus/g/n continuous medium type
- Different scattering coefficient of water in demo_skinvessel.m compared to mcxyz.c HOT 1
- svmc is broken after commit 7e1aec0
- pmcx dettpsf overwrites input detp structure HOT 1
- [CRITICAL] double-multiplication of initial weight in single-pattern-source fluence output HOT 3
- Gaussian divergence for slit source HOT 3
- Replay fails when simulating with multiple light sources HOT 6
- Post v2024.2 release actions
- Multi-source simulation fails to return the source ID for detected photons and trajectories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcx.