FRED Optimizer tips & helps
Installing and running
The Optimizer lives under git.
Download using
git clone http://XXXuser@arpg-serv.ing2.uniroma1.it:8181/git/Optimizer.git
where you need to replace XXXuser with the account under the git server (if you don't know if you have an account, ask a.sarti) and compile it as it is explained inside README.txt
To run the optimizer one has to launch it using the syntax
./optiRoot #inputfile
A template for the input file that uses 7 different fields can be found in the folder inpFiles.
The input file
The input files contains several fields and lines to setup the optimizer:
- The dij for each field can be specified using dij:
- ptv: defines what is the PTV and the goal dose, the weight
- oar: for the organs at risk one can set the max dose, the weight and the DMF.
- NoT: for the normal tissues (CT - PTV - OARs) one can set the max dose, the weight, the DMF and the threshold applied to consider the voxels as NoT
- outFlag: flags the output files
As an example:
dij: SingleFieldMatrix/70MeV/Dij_merge1.bin
dij: SingleFieldMatrix/70MeV/Dij_merge2.bin
dij: SingleFieldMatrix/70MeV/Dij_merge3.bin
dij: SingleFieldMatrix/70MeV/Dij_merge4.bin
dij: SingleFieldMatrix/70MeV/Dij_merge5.bin
dij: SingleFieldMatrix/70MeV/Dij_merge6.bin
dij: SingleFieldMatrix/70MeV/Dij_merge7.bin
ptv: PTVTrue_NEW_itk.mhd Dgoal 2
oar: vescica_NEW_itk.mhd maxDose 2.2 DMF 1. weight 20
oar: retto_NEW_itk.mhd maxDose 2.2 DMF 1. weight 20
oar: bulbopenieno_NEW_itk.mhd maxDose 2.2 DMF 1. weight 20
oar: femoredx_NEW_itk.mhd maxDose 1. DMF 1. weight 20
oar: femoresin_NEW_itk.mhd maxDose 1. DMF 1. weight 20
oar: ano_NEW_itk.mhd maxDose 2.2 DMF 1. weight 20
NoT: maxDose 1.2 DMF 1. weight 10 thre 5.
outFlag: 70MeV_VeReBp22Gy_NT12_DMF1_OAR20
The is also the possibility to choose the initial particle numbers (the initial 'guess') using the directive fluences.
Typical input=
...
fluences: choice
...
With the following options for choice
1) "ones" [default] : set all PBs to unitary fluence
2) "random" : fill PBs fluences with random values in [1:10] range
3) path : load initial fluences from given file (format same as writePBs() function)
The use of the weights herebefore sets
NoT @ 10%, OARs @ 20% and PTV @ 100%.
The new workflow
- PTVs are loaded, setting plannedDose, DMF (default = 1) and weight (default 100%)
- OARS are loaded, setting maxDose, DMF, weights. If a voxel is flagged as PTV, it is not overwritten.
- loads the NT as ALL - PTV - OARS applying a threshold that can be tuned in the NoT field.
- DMF is populated and applied when computing the dose/loading the Dij
After the configuration:
- As a first thing the optimizer writes the voxel maps in the different ROIs: rois_outflag.mhd.
- Then the dens map of the DMF is written as well: alldmf_outflag.mhd
- The optimizer is launched
- Reconstruct and writes the optimized dose map: optiDose_outflag.mhd
To investigate the output, please look at the following section.
Checking the output
Creating the DVHs and analysing the output
Inside the Optimizer repo there's a fantastic tool from A. Schiavi for monitoring and showing the information.
The tool is named: script/planViewerFred.py..
It can be used to:
- load the CT: -CT ctname.mhd
It is a fusion of the capabilities of itksnap and mhd_DVH that are shown below.
Useful commands:
Other / older tools
Older tools that were used before (and now superseded): mhd_DVH.py.
To run it:
./testDVH/mhd_DVH.py -p -v -roi PTVTrue_NEW_itk.mhd vescica_NEW_itk.mhd retto_NEW_itk.mhd bulbopenieno_NEW_itk.mhd
ano_NEW_itk.mhd femoredx_NEW_itk.mhd femoresin_NEW_itk.mhd -dose optiDose_70MeV_0.8Op_PTV_2GyVesRet_1Gyall.mhd
--norm-volume -Dgoal 200
The available options can be prompted using
./testDVH/mhd_DVH.py -h
Browsing the results using itksnap
To check the dose using itksnap, you can on lisa use the installed binaries.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/nvidia/nsight-systems/2019.3.7/Host-x86_64/
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/nvidia/nsight-systems/2019.3.7/Host-x86_64/
To run the software:
/home_arpg/software/itksnap-3.8.0-20190612-Linux-gcc64-qt4/bin/itksnap
First of all you can add the dicom, then the optiDose mhd to make a superposition.
Prostate studies
The first case with seven fields
The relevant files can be found in lisa.
The intial CT, the mhd files and plan infos are under:
/NAS_arpg/FlashElectrons/MinINFO_mhd
- CT: contains the initial CT info
- DicomImportFromMarta: contains the structures that Marta identified with the help of Elisa script
--
Alessio Sarti - 2020-10-06
Comments