Import dicom as .vxl in FLUKA

Dear experts,
It is mentioned in the link below and in the FLUKA manual that you can use the writegolem.f file to generate voxel files for dicom files. About this I have a little question:

  1. How can I write the elemental composition and density of the material in writegolem.f? For example some of the material compositions in the picture below, I can’t see from the template given in the FULKA manual how to define these compositions and densities? Can you give an example of how to define the composition and density of a material in a .f file?
    https://fluka-forum.web.cern.ch/t/how-to-import-density-and-elemental-information-of-a-dicom-file-into-fluka-simulation/5832
    Example .f files from the FLUKA manual have been uploaded!
    writegolem.f.txt (1.3 KB)

image

2.I want to use CORRFACT card to correct the stopping power by HU value, can I also write it in the writegolem.f file? If so, how do I write it?

3.I have previously generated voxel files through body.mat and got a voxel file (method in the link) organised by many sliced voxels, I would like to know if each voxel here corresponds to an HU value, and if so, how do they correspond, and how do I have to get the corresponding HU value for each voxel? Because in step 2, the stopping power needs to be corrected for each HU value, so this information is also critical!
For example, the HU value corresponding to VOXE1108 in the diagram is ?
https://indico.cern.ch/event/540415/contributions/2194791/attachments/1285764/2086130/17_Medical_Applications_2016.pdf

image

  1. I want to correct the stopping power with the treatment planning system after I have already generated the voxel file using body.mat, is this also done with the CORRFACT card? What should I do if I fall out of the range [2/3,3/2] after correction due to large differences?

Hi @zcao23

  1. The voxel file can include FLUKA cards. However this complicated format will bring no benefit in your case. The best way for you is to define the materials in your normal FLUKA input file that will load the voxel. You would need the MATERIAL and COMPOUND cards.
    I would also recommend to FLUKA the flair material database since all the above compounds already exists there. Their name is like HU<1200 under the group Biological
  2. Same for the CORRFACT please include it in the FLUKA input
  3. The .vxl file doesn’t keep the information of the HU number. The HU from the DICOM is only used to assign materials and CORRFACT
  4. If you fall out of the [2/3,3/2] range you should split the MATERIAL into multiple with slightly different density

Thank you very much for your reply!

  • 1 and 4, I have segmented the HU values, I need to assign materials with different densities to different segments of HU values, and when I add new materials in FLUKA, I can only manually key in the densities and elemental constituents one by one. I wondered if it is possible to define many materials at a time through writegolem.f file?
  • I want to use CORRFACT for density correction for several voxels, will adding so many CORRFACT cards to the FLUKA input file affect the calculation speed? If the CORRFACT card value can be integrated into the .vxl file, will it increase the calculation speed?
  • I want to calibrate the material density for each HU value so that the density for each HU value in FLUKA is consistent with the other devices, how do I change the crho_min/crho_max in FLUKA to calibrate the HU-density in FLUKA to be consistent with the other devices?
    Thanks.
  1. the writegolem.f do not write any materials. You can modify it to write an external .inp file that you #include in your input
  2. CORRFACT will not affect the CPU speed, on the contrary it requires less memory than defining multiple materials and faster intialization
  3. I cannot understand your last remark.

Thank you very much for your reply.
3. I would like to adjust the density values of individual voxels in FLUKA to coincide with an established HU-density curve.
Are the density values of each voxel in an HU interval in FLUKA obtained by interpolating the density of the material in this interval, crho_min and crho_max, by a linear function?
For example, if the HU is between (-100,100), the material A has a density of d, crho_min=0.9,crho_max=1.1, then the each voxel density in that interval is determined by fitting a linear function to the three points (-100, 0.9*d), (0, d), (100,1.1d)?

Correct, flair assumes a linear function to interpolate the density with the CORRFACT

Thank you very much for your reply.
And, is it possible to display the HU-density curves in FLUKA before and after the use of a CORRFACT card?

Unfortunately no. You need to do it manually