How to import density and elemental information of a DICOM file into FLUKA simulation?

Dear FLUKA experts,

I’m trying to import a DICOM file into FLUKA to perform simulations of carbon ion therapy.
I know FLUKA has its own HU-density and HU-material conversion.
But now I’d like to use my own method to obtain the density and elemental information of that DICOM file.
In this case, I have several additional 3D matrices (density distribution, and some elemental density distributions like H, C, O etc.) that are already obtained, and I want to import these matrices into FLUKA. These 3D matrices have the same dimension as the DICOM file.
Is possible to do so?

Thanks a lot!

Best regards,
Kaiwen Li

Dear @kwlibuaa

There is no existing mechanism to support these additional matrices.
Flair should be able to load them if they are in DICOM format, however it will require a translation table to convert the value they contain to a material that FLUKA can understand.

The FLUKA voxel binary format is described in the FLUKA manual

You can even give a look the the files fluka/voxel.py and Dicom.py of flair that contains the code to read/write voxel files from python.