How to import a calculated dose distribution (binary file) in an RT plan?

Dear FLUKA experts,

I tried to compare the FLUKA-simulated dose with the dose from my own calculation (a binary file).
How could I import the binary file into FLUKA’s DICOM RTviwer (i.e. Calculated image)?

Hi @kwlibuaa
the flair DICOM RTViewer accepts, RTDOSE dicom data or USRBIN binary files.

The easiest would be to convert it to USRBIN format. Please look the usbsuw.f program (from fluka), that is making the merging of usrbin files, how the file is read and written.
Since the USRBIN are written from fortran they have a special record formatting, so writing with fortran would be easier.

If you are more confortable with Python you can look the from flair. Flair has a module is used to read/write binary fortran files

And in C++ from flair geoviewer the module is able to read/write the same file.