How to build an anthropomorphic phantom

Hello everybody!
I am a quite experienced FLUKA user, but I just now came to the need of build an anthropomorphic phantom for dosimetry studies in my simulation.

I found some ~old topics regarding the possibility to import ICRP phantoms, but before digging deep into them I wanted to ask if in the meanwhile somebody had developed a “standard and clean” way to do it, since I think this would be a very useful feature for lots of users.
Thank you very much!

Hi Francesco,

I have not worked with phantoms so I don’t know if there is a standard and clean way.
I think you have three options

  1. Either use a CSG phantom like the one for MCNP and import it in flair that will convert it to FLUKA.
  2. If you have a voxelized CT phantom then you can use the Dicom tools of flair to convert to a FLUKA voxel geometry.
  3. Build it your self

Dear Vasilis, thank you for your (quick) reply!
I get your point, and Indeed I was thinking to pass via some dicom file using the (stunning!) Dicom feature in flair.
However, I think this could not respond to my final goal in this study, that I indeed forgot to point out:
Imagine that I want to calculate the dose to a certain organ, let’s say the kidney. Obviously any real patient CT has this information, but am I right to suppose that to obtain this information would require some sort of “organ segmentation”, to point the USRBIN to the desired region/area?

In this context a “simplified phantom”, in which each organ has its own REGION could simplify very much this study…
Or am I missing something?

Flair Dicom can digest also the RTSTRUCT!

When you create the voxel you can embed the ROI (Regions of Interest) which depending on the CT they describe the boundaries of the organs (as well the PTV, OARs…)
In flair-geoviewer there is an auxiliary program called usrbin2dvh that uses the enhanced voxel together with a USRBIN and then it gives you the DVH (Dose Volume Histogram) for a specific organ.

It can be easily modified to filter and return an equivalent USRBIN, or give you the totals for each organ.

For a simplified phantom, I’ve got once for testing the androgynous MCNP phantom generated by BodyBuilder. I used it to enhance flair 3 to digest and convert to it fluka. If you can get access to that one it will work.

Dear Vasilis,
Where I can modify to filter and return an equivalent USRBIN, or give the totals for each organ? Can it realize when I score with USRBIN and the Type select region? Meanwhile, When I score with USRBIN and the Type select region, but the plot can not be finished using Gnuplot.

Best Regards,


Dear Vasilis, thank you very much! I had totally missed the possibility to import RTSTRCUT in flair!
I Think I have now clear what I should do starting from a CT+RTSTRUCT data sample, but I find a problem in using usrbin2dvh.
Here are my steps:

  • Use flair-dicom to create from data set 2 .vxl file: one w/ and one w/o the embedded RTSTRUCT info (since I read that fluka does not support simulating directly with the latter)
  • Run the sim using the w/ RTSTRCUT vxl file and creating a cartesian USRBIN scoring DOSE in an area including organs of interest
  • Then I tried to use usrbin2dvh to process the .bnn file coming from this usrbin but this time with the voxel file that includes the RTSTRUCT

For this last step I used flair in this way:

When I click “Process” however I get the following error

It seems strange since that should be the output file, so why having problems in opening it? (the folder is mine, so it should not have to do with write capabilities)

If I try to “touch” that output file before running “Process” I get the following error instead:

Am I doing something wrong?

Flair and geoviewer version: 3.09
Tests on macOS (but also on Ubuntu19 virtual machine)

Thanks again!

Dear Xiaoman,

you should start from the program found in the source code of flair-geoviewer.
You need to download the package flair-geoviewer…tgz
Writing USRBIN equivalent from C one can look in the data/, there is there the functionality

It seems that your ${HOME}/.flair/flair.ini file has some old settings. Could you do the following:

  1. exit all flair that are currently open
  2. open in a text editor the ${HOME}/.flair/flair.ini
  3. delete the whole section [Data]
    In case you have some customization there, then just delete all entries that are like
arg.### =
inp.### =

If you delete them then they will be overwritten by the default of flair

Another point is when you add a usrbin2dvh don’t override the Parameter for the default file but change the Name/Unit (last column on the detectors listbox) to the unit of the usrbin you are using

OK, I did the “cleaning” of my flair.ini and changed only the unit, however I get anyway the second error:

Now that I look more closely I see that even if the red alert is about time, the previous line suggest an execution problem of the program! Is it possible that this particular problem cannot run on a Mac?
I try on my Ubuntu19 Virtual Machine (with updated flair too) and there now (after cleaning flair.ini and changing the unit) it seems to work!


The error is writen (but not in red), the line above the red one in the output
/bin/sh /Users/…/usrbin2dvh: cannot execute binary file
Can you check if the usrbin2dvh exists and has the +x executable flag

Yes I just edited the previous message as soon as I noticed the “non-red” real error!
The program exists and seems executable

In the meanwhile I got everything working on Ubuntu… May it be som Mac related program?

Hi @fcollama,
if you could send me the input files to usrbin2dvh, I can give a look.
Cheers luigi

Hi Luigi
I uploaded here the package containing the .vxl (the one with RSTRUCT) and the .bnn file


Hi @fcollama,
in the geoviewer/, please comment this line
LDFLAGS = -dynamiclib and recompile the usrbin2dvh.
This fixes the problem on the Mac.
Let us know in case you encounter any other problems.

Hi Luigi
Your solution seems to work! I commented that line, than compiled again the flair-geoviewer, and now everything seems to work fine!

Hi @vasilis, I am proceeding with this work and I came across a doubt:
is the RTSTRUCT importation compatible with the possibility to crop the dicom image directly in flair?

I mean, imagine I import the CT, then I decide to select a part of it to create the voxel file (e.g. “VoxelWithoutStruct”). Then if want to create another voxel file (e.g. “VoxelWithStruct”) like the first but this time including the RTSTRUCT. Can I just select this second time the RTSTRUCT and this will be applied to the cut dicom?

I do not get any explicit error, but since when I added this cut in my workflow I started to see some strange behaviour in the following simulation, and since I do not think I have a simple way to visualise this “VoxelWithStruct” I was wondering if this can introduce some problem (mabe due to alignment after cut)


Thanks for pointing out this error @fcollama
I was looking the code, and is not using in the RTSTRUCT image the cropped information.
I will implement it and let you know.

Hi vasilis, glad to help!
Let us know when this feature will be fixed! (for now I will proceed without cropping)

Since we are here, maybe another typo:
I think that the call to voxel.calcLimits() (now at line #300); in “” should be performed after the actual loading of the voxel (line #324) and not before. Right?


Thanks again Francesco.
you can find the beta testing version 3.0-11a with both corrections

  • Cropping of the voxel with rtstructs
  • usrbin2dvh correction

in flair cernbox folder accessible from the Download
section of flair, or from this DIrect link