Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file format #17

Open
crcrewso opened this issue Oct 31, 2022 · 2 comments
Open

Config file format #17

crcrewso opened this issue Oct 31, 2022 · 2 comments

Comments

@crcrewso
Copy link
Contributor

The INI file doesn't match any convention I recognise and is quite hard to read. There are better config handlers that do the parsing and loading for free. Here is an example TOML config file that I would be happy to do the work converting to, but I wanted to run the ideology by you first.

title = "VMAT TBI configuration file"
EAS = 2021-06-11 #date only 
Site = "Saskatoon Cancer Center" 
Organization = "Saskatchewan Cancer Agency" 
#Paths are single quote'
Document_Path = '\\enterprise.stanfordmed.org\depts\RadiationTherapy\Public\Users\ESimiele\Research\VMAT_TBI\documentation\'
Linacs = ["LA16", "LA17"]
Energies = ["06X", "10X"]

[Plug-in]
    flash.default_flash_type = "Global"
    flash.default_flash_margin = 0.5
    flash.default_target_margin = 0.3
    calc.calculation_model = "AAA_15605"
    calc.optimization_model = "PO_15605"
    default_isos = 5
    #Default beams per iso from sup to inf, must have same or more entries then default isos
    default_beams_per_iso = [4, 3, 2, 2, 2, 0, 0]
    contour.field_overlap = true
    contour.field_overlap_margin = 1.0

Default_Sparing_Structures = [ 
    ["Lungs", "Mean Dose < Rx Dose", 0.3] ,
    ["Kidneys", "Mean Dose < Rx Dose", 0.0],
    ["Bowel", "Dmax ~ RX Dose", 0]
    #format ["name", "type", margin]
]

[Cases]
[Cases.Scleroderma]
    dose_per_fraction = 200
    number_of_fractions = 4
    constraints = [ #format ["Name", "type", dose, volume, priority]
        ["TS_PTV_VMAT", "Lower", 800.0, 100.0, 100]
        #continued in same format
    ]

[Cases.Myeloablative]
    dose_per_fraction = 200
    number_of_fractions = 6
    constraints = [[]]

[Cases.Non_Myeloablative]
    dose_per_fraction = 200
    number_of_fractions = 6
    constraints = [[]]
    sparing_structures = [
        [ "Ovaries","Mean Dose < Rx Dose",1.5 ]
    ]
@esimiele
Copy link
Owner

Haha I made up the convention since I didn't know about TOML or the like. The only one I know of is XML, which I didn't want to spend the time implementing a XML parser in my last week of residency (I know now that it would be pretty simple to do, but I've been too lazy to change it haha).
I'm definitely on board with updating it as the config formatting gets messy and it's tough to keep adjusting the config parser every time I want to change something. If you could update it to TOML (since you are much more familiar with it) and open a PR, I would be totally open to implementing it. Let me know if you need me to do anything on my end.

@crcrewso
Copy link
Contributor Author

One more feature to add to more human settings files.
Add user override to plan and field names for local consistancy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants