I’m trying to import more than 100 DICOM images into FLUKA.
I know how to import .dcm files through Flair (using .mat file to generate .vxl file).
But it is difficult to do this for more than 100 times by hand.
I’d like to generate .vxl file and to run with .inp file by using only terminal.
How could I do this?
Hi @kwlibuaa
its your lucky day!
Some years ago I wrote a python program to test the flair functionality, which was doing exactly what you want. I’ve updated it to work with the latest version of flair
Of course you need flair installed
You need to set the PYTHONPATH as export PYTHONPATH=/usr/local/flair:/usr/local/flair/lib
The program expects 4 arguments
syntax: python make_voxel.py <output.vxl> <CT_path> <RT_struct> <matfile>
output.vxl - filename of output FLUKA voxel file
CT_path - directory with the CT dicom slices
RT_struct - filename with the RTSTRUCT information. '.' to ignore
matfile - file with the Hounsfield to material conversion information e.g. head.mat, body.mat