Git Product home page Git Product logo

Comments (8)

PyMarc2 avatar PyMarc2 commented on July 27, 2024 1

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.

fangq avatar fangq commented on July 27, 2024

@PyMarc2, you can set the outputtype to 'energy' and sum the values in the output array for each label mask.

from mcx.

PyMarc2 avatar PyMarc2 commented on July 27, 2024

@fangq

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.

fangq avatar fangq commented on July 27, 2024

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.

PyMarc2 avatar PyMarc2 commented on July 27, 2024

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

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
image

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.

fangq avatar fangq commented on July 27, 2024

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.

PyMarc2 avatar PyMarc2 commented on July 27, 2024

@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.

PyMarc2 avatar PyMarc2 commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.