├── .DS_Store ├── AAPM-TG119 ├── .DS_Store ├── TG119_CT_Structures │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.1.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.10.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.100.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.101.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.102.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.103.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.104.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.105.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.106.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.107.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.108.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.109.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.11.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.110.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.111.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.112.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.113.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.114.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.115.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.116.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.117.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.118.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.119.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.12.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.120.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.121.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.122.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.123.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.124.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.125.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.126.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.127.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.128.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.129.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.13.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.14.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.15.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.16.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.17.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.18.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.19.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.2.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.20.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.21.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.22.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.23.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.24.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.25.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.26.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.27.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.28.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.29.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.3.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.30.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.31.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.32.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.33.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.34.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.35.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.36.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.37.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.38.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.39.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.4.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.40.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.41.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.42.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.43.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.44.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.45.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.46.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.47.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.48.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.49.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.5.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.50.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.51.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.52.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.53.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.54.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.55.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.56.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.57.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.58.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.59.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.6.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.60.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.61.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.62.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.63.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.64.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.65.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.66.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.67.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.68.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.69.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.7.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.70.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.71.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.72.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.73.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.74.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.75.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.76.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.77.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.78.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.79.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.8.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.80.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.81.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.82.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.83.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.84.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.85.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.86.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.87.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.88.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.89.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.9.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.90.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.91.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.92.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.93.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.94.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.95.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.96.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.97.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.98.dcm │ ├── CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.99.dcm │ ├── RS.TG119_CShape.dcm │ ├── RS.TG119_HN.dcm │ ├── RS.TG119_Multi.dcm │ └── RS.TG119_Prostate.dcm └── TG119_Instructions_102109.pdf ├── ABAS_Studies ├── .DS_Store ├── .Rhistory ├── ABAS-Heart-in_Raystation-1.png ├── ABAS-Heart-in_Raystation-2.png ├── ABAS-Heart-in_Raystation-3.png ├── ABAS-Heart-in_Raystation-4.png ├── ABAS-Lung-in_Raystation-1.png ├── ABAS-Lung-in_Raystation-2.png ├── ABAS-Lung-in_Raystation-3.png ├── ABAS-Lung-in_Raystation-4.png ├── ABAS-SpinalCord-in_Raystation-1.png ├── ABAS-SpinalCord-in_Raystation-2.png ├── ABAS-SpinalCord-in_Raystation-3.png ├── Thumbs.db ├── abas-ck-sd-genanalyser3.csv ├── abas-test.py ├── abas2.py ├── abas_rs_user_meeting.zip ├── ck-sd-genanalyser1.csv ├── ck-sd-genanalyser2.csv ├── ck-sd-genanalyser3.csv ├── lw-notes-old.pptx ├── rs_abas_test.R ├── spine-1 ├── spine-2.png ├── spine-3.png └── spine-4.png ├── NEW-pareto-example-1.png ├── NEW-pareto-example-2.png ├── Old_Prostate_Scripting ├── C_Prostata_Integning.py ├── PROS_AlleTyper_Forplan.py ├── PROS_C_IMRT_Autoplan.py ├── ProstC_78_39_1arc.py └── ProstC_78_39_7imrt.py ├── README.md ├── Thumbs.db ├── couchModel.png ├── excel.py ├── interface.py ├── mdixonSplit.py ├── rectiTest1.py └── run_console_and_statetree.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/.DS_Store -------------------------------------------------------------------------------- /AAPM-TG119/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/.DS_Store -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.1.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.1.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.10.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.10.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.100.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.100.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.101.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.101.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.102.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.102.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.103.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.103.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.104.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.104.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.105.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.105.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.106.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.106.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.107.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.107.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.108.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.108.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.109.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.109.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.11.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.11.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.110.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.110.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.111.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.111.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.112.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.112.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.113.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.113.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.114.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.114.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.115.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.115.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.116.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.116.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.117.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.117.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.118.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.118.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.119.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.119.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.12.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.12.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.120.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.120.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.121.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.121.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.122.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.122.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.123.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.123.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.124.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.124.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.125.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.125.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.126.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.126.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.127.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.127.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.128.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.128.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.129.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.129.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.13.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.13.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.14.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.14.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.15.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.15.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.16.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.16.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.17.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.17.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.18.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.18.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.19.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.19.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.2.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.2.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.20.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.20.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.21.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.21.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.22.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.22.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.23.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.23.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.24.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.24.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.25.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.25.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.26.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.26.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.27.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.27.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.28.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.28.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.29.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.29.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.3.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.3.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.30.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.30.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.31.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.31.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.32.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.32.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.33.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.33.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.34.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.34.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.35.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.35.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.36.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.36.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.37.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.37.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.38.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.38.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.39.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.39.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.4.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.4.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.40.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.40.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.41.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.41.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.42.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.42.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.43.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.43.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.44.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.44.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.45.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.45.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.46.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.46.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.47.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.47.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.48.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.48.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.49.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.49.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.5.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.5.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.50.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.50.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.51.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.51.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.52.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.52.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.53.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.53.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.54.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.54.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.55.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.55.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.56.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.56.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.57.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.57.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.58.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.58.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.59.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.59.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.6.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.6.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.60.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.60.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.61.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.61.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.62.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.62.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.63.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.63.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.64.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.64.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.65.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.65.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.66.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.66.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.67.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.67.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.68.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.68.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.69.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.69.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.7.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.7.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.70.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.70.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.71.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.71.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.72.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.72.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.73.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.73.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.74.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.74.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.75.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.75.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.76.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.76.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.77.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.77.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.78.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.78.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.79.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.79.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.8.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.8.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.80.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.80.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.81.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.81.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.82.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.82.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.83.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.83.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.84.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.84.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.85.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.85.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.86.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.86.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.87.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.87.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.88.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.88.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.89.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.89.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.9.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.9.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.90.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.90.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.91.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.91.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.92.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.92.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.93.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.93.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.94.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.94.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.95.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.95.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.96.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.96.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.97.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.97.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.98.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.98.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.99.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/CT.1.2.840.113619.2.55.3.279721844.297.1204122294.826.99.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/RS.TG119_CShape.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/RS.TG119_CShape.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/RS.TG119_HN.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/RS.TG119_HN.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/RS.TG119_Multi.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/RS.TG119_Multi.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_CT_Structures/RS.TG119_Prostate.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_CT_Structures/RS.TG119_Prostate.dcm -------------------------------------------------------------------------------- /AAPM-TG119/TG119_Instructions_102109.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/AAPM-TG119/TG119_Instructions_102109.pdf -------------------------------------------------------------------------------- /ABAS_Studies/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/.DS_Store -------------------------------------------------------------------------------- /ABAS_Studies/.Rhistory: -------------------------------------------------------------------------------- 1 | library(lubridate) 2 | library(gtools) 3 | library(caret) 4 | View(predictionSet) 5 | predictionOutcome <- painRxOes 6 | attach(tempData) 7 | View(tempData) 8 | data.frame(predict(gbm3,newdata=test[-1]),test[,1]) 9 | predictionOutcome <- painRxOes 10 | predictionVariable <- data.frame( 11 | numAge, 12 | recodeChemo, 13 | recodeTumour, 14 | recodePreRxPain, 15 | preRxMedAnalg, 16 | rxTotTime, 17 | statusNode, 18 | oesVol, 19 | V5,V10,V15,median, 20 | D5cc,D2cc,D1cc,Dmax 21 | ) 22 | predictionSet <- data.frame(outcome = predictionOutcome,predictionVariable) 23 | # ------ non-zero variances - there aren't any more! 24 | #nzv <- nearZeroVar(predictionSet) 25 | filtered <- predictionSet 26 | #rm(nzv) 27 | # ------ dummify any factors 28 | filterDummy <- dummyVars("~.",data=filtered, fullRank=F) 29 | filterDF <- as.data.frame(predict(filterDummy,filtered)) 30 | #incomplete rows 31 | filterDF <- filterDF[complete.cases(filterDF),] 32 | rm(filterDummy) 33 | rm(filtered) 34 | #force binary outcome 35 | filterDF$outcome <- ifelse(filterDF$outcome == 1,'yes','no') 36 | filterDF$outcome <- as.factor(filterDF$outcome) 37 | #data splitting 38 | set.seed(123456) 39 | trainIndex <- createDataPartition(filterDF$outcome, p = 0.8, 40 | list = FALSE, 41 | times = 1) 42 | train <- filterDF[ trainIndex,] 43 | test <- filterDF[-trainIndex,] 44 | rm(trainIndex) 45 | print(gbm3) 46 | plot(gbm3) 47 | data.frame(predict(gbm3,newdata=test[-1]),test[,1]) 48 | validateGBM3 <- data.frame(predict(gbm3,newdata=test[-1]),test[,1]) 49 | names(validateGBM3) <- c("IndexTest","Truth") 50 | validateGBM3 51 | filter(validateGBM3, Truth=="yes") 52 | View(validateGBM3) 53 | ?filter 54 | library(dplyr) 55 | library(reshape2) 56 | library(ggplot2) 57 | filter(validateGBM3, Truth=="yes") 58 | filter(validateGBM3, Truth=="yes") %>% group_by(IndexTest) %>% summarise(sum(IndexTest)) 59 | filter(validateGBM3, Truth=="yes") %>% group_by(IndexTest) %>% summarise(count(IndexTest)) 60 | filter(validateGBM3, Truth=="yes") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) 61 | filter(validateGBM3, Truth=="yes") %>% group_by(IndexTest) %>% summarise(length(IndexTest))[1] 62 | temp <- filter(validateGBM3, Truth=="yes") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) 63 | temp 64 | temp[1] 65 | temp[2] 66 | temp[2,1] 67 | temp[2,2] 68 | temp[2,1] 69 | temp[1,1] 70 | temp[1,2] 71 | temp[,2] 72 | temp[2,2]/temp[2,1] 73 | temp[2,2] 74 | temp 75 | filter(validateGBM3, Truth=="yes") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) 76 | View(validateGBM3) 77 | View(test) 78 | 16/17 79 | filter(validateGBM3, Truth=="no") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) #so sensitivity = 16/17 = 94% 80 | 5/8 81 | 0.941*0.625 82 | 0.941*(1-0.625) 83 | 0.941/(1-0.625) 84 | (1-0.941)/(0.625) 85 | filter(validateGBM3, Truth=IndexTest) 86 | validateGBM3$IndexTest & validateGBM3$Truth 87 | validateGBM3$IndexTest = validateGBM3$Truth 88 | validateGBM3 <- data.frame(predict(gbm3,newdata=test[-1]),test[,1]) 89 | names(validateGBM3) <- c("IndexTest","Truth") 90 | View(validateGBM3) 91 | View(validateGBM3) 92 | filter(validateGBM3, Truth=="yes" & IndexTest=="yes") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) #so sensitivity = 16/17 = 94% 93 | filter(validateGBM3, Truth=="yes" & IndexTest=="yes") 94 | filter(validateGBM3, Truth=="no" & IndexTest=="no") 95 | length( filter(validateGBM3, Truth=="yes" & IndexTest=="yes") ) / length( filter(validateGBM3, Truth=="no" & IndexTest=="no") ) 96 | length( filter(validateGBM3, Truth=="yes" & IndexTest=="yes") ) 97 | View(validateGBM3) 98 | 21/25 99 | validateGLM3 <- data.frame(predict(glmnet3,newdata=test[-1]),test[,1]) 100 | plot(varImp(glmnet3,scale=F)) 101 | plot(glmnet2) 102 | plot(varImp(glmnet2,scale=F)) 103 | validateGLM2 <- data.frame(predict(glmnet2,newdata=test[-1]),test[,1]) 104 | predictionOutcome2 <- painRxOes 105 | predictionVariable2 <- data.frame( 106 | numAge, 107 | recodeGender, 108 | recodeChemo, 109 | recodeTumour, 110 | recodeDs, 111 | recodePreRxPain, 112 | preRxMedAnalg, 113 | preRxMedSynOpi, 114 | preRxMedOpiods, 115 | statusNode 116 | ) 117 | predictionSet <- data.frame(outcome = predictionOutcome2,predictionVariable2) 118 | #incomplete rows 119 | predictionSet <- predictionSet[complete.cases(predictionSet),] 120 | # ------ non-zero variances 121 | #nzv <- nearZeroVar(predictionSet) 122 | filtered <- predictionSet 123 | #rm(nzv) 124 | # ------ dummify any factors 125 | filterDummy <- dummyVars("~.",data=filtered, fullRank=F) 126 | filterDF <- as.data.frame(predict(filterDummy,filtered)) 127 | names(filterDF) 128 | rm(filterDummy) 129 | rm(filtered) 130 | #force binary outcome 131 | filterDF$outcome <- ifelse(filterDF$outcome == 1,'yes','no') 132 | filterDF$outcome <- as.factor(filterDF$outcome) 133 | #data splitting 134 | set.seed(123456) 135 | trainIndex <- createDataPartition(filterDF$outcome, p = 0.8, 136 | list = FALSE, 137 | times = 1) 138 | train <- filterDF[ trainIndex,] 139 | test <- filterDF[-trainIndex,] 140 | rm(trainIndex) 141 | validateGLM2 <- data.frame(predict(glmnet2,newdata=test[-1]),test[,1]) 142 | names(validateGLM2) <- c("IndexTest","Truth") 143 | View(validateGLM2) 144 | filter(validateGLM2, Truth=="yes") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) #so sensitivity = 16/17 = 94% 145 | View(validateGLM2) 146 | filter(validateGLM2, Truth=="no") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) #so specificity = 5/8 = 62% 147 | View(validateGLM2) 148 | validateGLM3 <- data.frame(predict(glmnet3,newdata=test[-1]),test[,1]) 149 | names(validateGLM3) <- c("IndexTest","Truth") 150 | filter(validateGLM3, Truth=="yes") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) #so sensitivity = 17/17 = 100% 151 | filter(validateGLM3, Truth=="no") %>% group_by(IndexTest) %>% summarise(length(IndexTest)) #so specificity = 5/8 = 62% 152 | 3/8 153 | filter(validateGLM3, Truth=="yes" & IndexTest=="yes") 154 | filter(validateGLM3, Truth=="no" & IndexTest=="no") #accuracy = 21/25 = 84% 155 | 0.941/(1-0.625) 156 | manual2 <- glm(as.factor(painRxOes) ~ D1cc,family=binomial, data=tempData) 157 | summary(manual2) 158 | manual2 <- glm(as.factor(painRxOes) ~ D1cc,family=quasibinomial, data=tempData) 159 | summary(manual2) 160 | subdata <- data.frame(painRxOes,D1cc) 161 | subdata <- data.frame(painRxOes,D1cc) 162 | subdata <- data.frame(painRxOes,D1cc,recodeTumour,statusNode) 163 | manual3 <- glm(as.factor(painRxOes) ~ .,family=quasibinomial, data=subdata) 164 | summary(manual3) 165 | subdata <- data.frame(painRxOes,D1cc) 166 | View(subdata) 167 | set.seed(123456) 168 | trainIndex <- createDataPartition(subdata$painRxOes, p = 0.8, 169 | list = FALSE, 170 | times = 1) 171 | test <- subdata[-trainIndex,] 172 | View(test) 173 | View(test) 174 | pred <- predict.glm(manual2,test$D1cc,type="response") 175 | summary(manual2) 176 | pred <- predict.glm(manual2,test[,2],type="response") 177 | test[,2] 178 | test 179 | pred <- predict.glm(manual2,test,type="response") 180 | pred 181 | ans <- test$painRxOes 182 | perf = function(cut) { 183 | yhat <- pred > cut 184 | w <- which(ans == 1) 185 | sens <- mean( yhat[w] == 1 ) 186 | spec <- mean( yhat[-w] == 0 ) 187 | crate <- mean( ans==yhat ) 188 | out = t(as.matrix(c(sens, spec, crate))) 189 | colnames(out) = c("sensitivity", "specificity", "class.rate") 190 | return(out) 191 | } 192 | ans <- test$painRxOes 193 | s <- seq(.01,.99,length=100) 194 | manualROC <- sapply(s,perf) 195 | manualROC 196 | plot(x = 1-manualROC[2,], y=manualROC[1,]) 197 | plot(Risk_Cutoff <- c(0,1), Parameter <- c(0,1),type="n") 198 | lines(s,manualROC[1,],col="red") 199 | lines(s,manualROC[2,],col="blue") 200 | lines(s,manualROC[3,],col="black") 201 | max(manualROC) 202 | View(manualROC) 203 | max(manualROC[3,]) 204 | subdata <- data.frame(painRxOes,D1cc) 205 | test <- subdata 206 | pred <- predict.glm(manual2,test,type="response") 207 | ans <- test$painRxOes 208 | s <- seq(.01,.99,length=100) 209 | manualROC <- sapply(s,perf) 210 | plot(x = 1-manualROC[2,], y=manualROC[1,]) 211 | plot(Risk_Cutoff <- c(0,1), Parameter <- c(0,1),type="n") 212 | lines(s,manualROC[1,],col="red") 213 | lines(s,manualROC[2,],col="blue") 214 | lines(s,manualROC[3,],col="black") 215 | max(manualROC[3,]) 216 | manualROC 217 | s <- seq(.01,.99,length=1000) 218 | manualROC <- sapply(s,perf) 219 | plot(Risk_Cutoff <- c(0,1), Parameter <- c(0,1),type="n") 220 | lines(s,manualROC[1,],col="red") 221 | lines(s,manualROC[2,],col="blue") 222 | lines(s,manualROC[3,],col="black") 223 | max(manualROC[3,]) 224 | manualROC 225 | set.seed(123456) 226 | trainIndex <- createDataPartition(subdata$painRxOes, p = 0.8, 227 | list = FALSE, 228 | times = 1) 229 | test <- subdata[-trainIndex,] 230 | pred <- predict.glm(manual2,test,type="response") 231 | ans <- test$painRxOes 232 | s <- 0.50 233 | manualROC <- sapply(s,perf) 234 | pred 235 | pred >= 0.5 236 | perf(0.5) 237 | subdata <- data.frame(painRxOes,D1cc,recodeTumour,statusNode) 238 | test <- subdata 239 | pred <- predict.glm(manual3,test,type="response") 240 | ans <- test$painRxOes 241 | s <- seq(.01,.99,length=1000) 242 | manualROC <- sapply(s,perf) 243 | plot(Risk_Cutoff <- c(0,1), Parameter <- c(0,1),type="n") 244 | lines(s,manualROC[1,],col="red") 245 | lines(s,manualROC[2,],col="blue") 246 | lines(s,manualROC[3,],col="black") 247 | max(ManualROC[3,]) 248 | max(manualROC[3,]) 249 | set.seed(123456) 250 | trainIndex <- createDataPartition(subdata$painRxOes, p = 0.8, 251 | list = FALSE, 252 | times = 1) 253 | test <- subdata[-trainIndex,] 254 | pred <- predict.glm(manual3,test,type="response") 255 | ans <- test$painRxOes 256 | perf(0.65) 257 | 0.8125/0.2 258 | install.packages(c("caret", "class", "evaluate", "foreach", "foreign", "formatR", "highr", "iterators", "lme4", "manipulate", "MASS", "mgcv", "nlme", "nnet", "randomForest", "Rcpp", "RcppEigen", "spatial", "stringi")) 259 | install.packages("lme4") 260 | install.packages("lme4") 261 | ?runif 262 | ?rnorm 263 | rnorm(sd=1,mean=100) 264 | rnorm(sd=1,mean=100,n=17) 265 | test <- rnorm(sd=1,mean=100,n=17) 266 | plot(test) 267 | test <- rnorm(sd=2,mean=94,n=3) 268 | rnorm(sd=2,mean=94,n=3) 269 | c(rnorm(sd=2,mean=94,n=3),rnorm(sd=0.3,mean=100,n=17)) 270 | c(rnorm(sd=2,mean=96,n=3),rnorm(sd=0.3,mean=100,n=17)) 271 | c(rnorm(sd=2,mean=97,n=3),rnorm(sd=0.3,mean=100,n=17)) 272 | c(rnorm(sd=2,mean=97,n=3),rnorm(sd=0.3,mean=100,n=17)) 273 | install.packages(c("ggplot2", "manipulate", "mgcv")) 274 | ?ggplot 275 | ?ggplot2 276 | library(ggplot2) 277 | ?ggplot2 278 | ?ggplot 279 | version() 280 | ?version 281 | R.version() 282 | ?version 283 | R.Version() 284 | install.packages(c("digest", "manipulate", "nlme", "Rcpp")) 285 | library(ggplot2) 286 | install.packages(c("knitr", "lme4", "manipulate", "memoise", "mgcv", "munsell", "nlme", "nnet", "pbkrtest", "quantreg", "R6", "RcppEigen")) 287 | install.packages(c("boot", "glmnet", "gtable", "manipulate", "nlme", "RcppEigen", "scales")) 288 | install.packages(c("evaluate", "formatR", "ggplot2", "manipulate", "Matrix", "mgcv", "nlme", "RcppEigen")) 289 | tcp <- function(g,xr) 1/(1+exp(4*g*(1- (x/xr)))) 290 | tcp <- function(g,xr,x) 1/(1+exp(4*g*(1- (x/xr)))) 291 | curve(tcp(1,50,x),0,100) 292 | curve(tcp(0.2,50,x),0,100) 293 | curve(tcp(5,50,x),0,100) 294 | curve( 295 | tcp(5,50,x) / (1-tcp(2,38,x)), 0,100 296 | ) 297 | curve(tcp(5,50,x),0,100) 298 | curve(tcp(2,38,x),0,100) 299 | curve( 300 | tcp(5,50,x) / (1-tcp(2,38,x)), 0,100 301 | ) 302 | curve( 303 | tcp(5,50,x) / (1-tcp(2,38,x)), 25,75 304 | ) 305 | tcp(5,50,x) * (1-tcp(2,38,x)), 25,75 306 | curve( 307 | tcp(5,50,x) * (1-tcp(2,38,x)), 25,75 308 | ) 309 | rm(list=ls()) 310 | cp <- function(g,xr,x) 1/(1+exp(4*g*(1- (x/xr)))) 311 | library(ggplot2) 312 | cp <- function(g,xr,x) 1/(1+exp(4*g*(1- (x/xr)))) 313 | ggplot(data.frame(x=c(0,100)), aes(x)) + 314 | stat_function(fun=cp(5,50,x), geom="line", aes(colour="square")) + 315 | stat_function(fun=cp(2,38,x), geom="line", aes(colour="exp")) + 316 | scale_colour_manual("Function", value=c("blue","red"), breaks=c("square","exp")) 317 | ggplot(data.frame(x=c(0,100)), aes(x)) + 318 | stat_function(fun=cp(5,50), geom="line", aes(colour="square")) + 319 | stat_function(fun=cp(2,38), geom="line", aes(colour="exp")) + 320 | scale_colour_manual("Function", value=c("blue","red"), breaks=c("square","exp")) 321 | cp <- function(g,xr) 1/(1+exp(4*g*(1- (x/xr)))) 322 | ggplot(data.frame(x=c(0,100)), aes(x)) + 323 | stat_function(fun=cp(5,50), geom="line", aes(colour="square")) + 324 | stat_function(fun=cp(2,38), geom="line", aes(colour="exp")) + 325 | scale_colour_manual("Function", value=c("blue","red"), breaks=c("square","exp")) 326 | rm(list=ls()) 327 | cp <- function(g,xr) 1/(1+exp(4*g*(1- (x/xr)))) 328 | ggplot(data.frame(x=c(0,100)), aes(x)) + 329 | stat_function(fun=cp(5,50), geom="line", aes(colour="square")) + 330 | stat_function(fun=cp(2,38), geom="line", aes(colour="exp")) + 331 | scale_colour_manual("Function", value=c("blue","red"), breaks=c("square","exp")) 332 | tcp <- function(x) 1/(1+exp(4*5*(1- (x/50)))) 333 | ntcp1 <- function(x) 1/(1+exp(2*5*(1- (x/38)))) 334 | ggplot(data.frame(x=c(0,100)), aes(x)) + 335 | stat_function(fun=tcp, geom="line", aes(colour="square")) + 336 | stat_function(fun=ntcp1, geom="line", aes(colour="exp")) + 337 | scale_colour_manual("Function", value=c("blue","red"), breaks=c("square","exp")) 338 | tcp <- function(x) 1/(1+exp(4*5*(1- (x/50)))) 339 | ntcp1 <- function(x) 1/(1+exp(2*5*(1- (x/38)))) 340 | ggplot(data.frame(x=c(0,100)), aes(x)) + 341 | stat_function(fun=tcp, geom="line", aes(colour="square")) + 342 | stat_function(fun=ntcp1, geom="line", aes(colour="exp")) + 343 | scale_colour_manual("Function", value=c("blue","red"), breaks=c("square","exp")) 344 | ggplot(data.frame(x=c(0,100)), aes(x)) + 345 | stat_function(fun=tcp, geom="line", aes(colour="square")) + 346 | stat_function(fun=ntcp1, geom="line", aes(colour="exp")) + 347 | scale_colour_manual("Function", value=c("blue","red")) 348 | ggplot(data.frame(x=c(0,100)), aes(x)) + 349 | stat_function(fun=tcp, geom="line", aes(colour="square")) + 350 | stat_function(fun=ntcp1, geom="line", aes(colour="exp")) + 351 | scale_colour_manual(value=c("blue","red")) 352 | ggplot(data.frame(x=c(0,100)), aes(x)) + 353 | stat_function(fun=tcp, geom="line", aes(colour="square")) + 354 | stat_function(fun=ntcp1, geom="line", aes(colour="exp")) + 355 | scale_colour_manual(values=c("blue","red")) 356 | ggplot(data.frame(x=c(0,100)), aes(x)) + 357 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 358 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 359 | scale_colour_manual(values=c("blue","red")) 360 | utcp1 <- function(x) tcp*(1-ntcp1) 361 | ggplot(data.frame(x=c(0,100)), aes(x)) + 362 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 363 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 364 | stat_function(fun=utcp1, geom="line", aes(colour="UTCP1")) + 365 | scale_colour_manual(values=c("blue","red","black")) 366 | ggplot(data.frame(x=c(0,100)), aes(x)) + 367 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 368 | stat_function(fun=utcp1, geom="line", aes(colour="NTCP1")) + 369 | scale_colour_manual(values=c("blue","red","black")) 370 | tcp <- function(x) 1/(1+exp(4*5*(1- (x/50)))) 371 | ntcp1 <- function(x) 1/(1+exp(2*5*(1- (x/38)))) 372 | utcp1 <- function(x) tcp*(1-ntcp1) 373 | ggplot(data.frame(x=c(0,100)), aes(x)) + 374 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 375 | stat_function(fun=utcp1, geom="line", aes(colour="NTCP1")) + 376 | scale_colour_manual(values=c("blue","red","black")) 377 | ggplot(data.frame(x=c(0,100)), aes(x)) + 378 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 379 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 380 | scale_colour_manual(values=c("blue","red","black")) 381 | utcp(0) 382 | utcp1(0) 383 | utcp1 384 | utcp1 <- function(x) ( 1/(1+exp(4*5*(1- (x/50)))) )*(1-(1/(1+exp(2*5*(1- (x/38)))))) 385 | ggplot(data.frame(x=c(0,100)), aes(x)) + 386 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 387 | stat_function(fun=utcp1, geom="line", aes(colour="NTCP1")) + 388 | scale_colour_manual(values=c("blue","red","black")) 389 | utcp1 <- function(x) 10*( 1/(1+exp(4*5*(1- (x/50)))) )*(1-(1/(1+exp(2*5*(1- (x/38)))))) 390 | ggplot(data.frame(x=c(0,100)), aes(x)) + 391 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 392 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 393 | stat_function(fun=utcp1, geom="line", aes(colour="NTCP1")) + 394 | scale_colour_manual(values=c("blue","red","black")) 395 | ggplot(data.frame(x=c(0,100)), aes(x)) + 396 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 397 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 398 | stat_function(fun=utcp1, geom="line", aes(colour="UTCP1")) + 399 | scale_colour_manual(values=c("blue","red","black")) 400 | tcp <- function(x) 1/(1+exp(4*5*(1- (x/50)))) 401 | ntcp1 <- function(x) 1/(1+exp(1*5*(1- (x/58)))) 402 | utcp1 <- function(x) 10*( 1/(1+exp(4*5*(1- (x/50)))) )*(1-(1/(1+exp(1*5*(1- (x/58)))))) 403 | ggplot(data.frame(x=c(0,100)), aes(x)) + 404 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 405 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 406 | stat_function(fun=utcp1, geom="line", aes(colour="UTCP1")) + 407 | scale_colour_manual(values=c("blue","red","black")) 408 | ggplot(data.frame(x=c(0,100)), aes(x)) + 409 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 410 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 411 | scale_colour_manual(values=c("blue","red","black")) 412 | tcp <- function(x) 1/(1+exp(2.7*5*(1- (x/50)))) 413 | ntcp1 <- function(x) 1/(1+exp(1*5*(1- (x/58)))) 414 | ggplot(data.frame(x=c(0,100)), aes(x)) + 415 | stat_function(fun=tcp, geom="line", aes(colour="TCP")) + 416 | stat_function(fun=ntcp1, geom="line", aes(colour="NTCP1")) + 417 | scale_colour_manual(values=c("blue","red","black")) 418 | install.packages(c("car", "caret", "lubridate", "manipulate", "nlme", "Rcpp")) 419 | install.packages("ggplot2") 420 | install.packages("ggplot2movies") 421 | load("~/Dropbox/RaySearch/ct-density-1.RData") 422 | View(prediction1) 423 | View(prediction2) 424 | View(prediction3) 425 | View(prediction1) 426 | View(prediction1) 427 | View(prediction3) 428 | install.packages(c("BH", "cluster", "corrplot", "DBI", "evaluate", "formatR", "highr", "knitr", "lme4", "manipulate", "Matrix", "nlme", "quantreg", "Rcpp", "survival")) 429 | library(reshape2) 430 | library(ggplot2) 431 | library(dplyr) 432 | #this needs to be edited to set the folder that contains the files 433 | setwd("/Users/lenw/Documents/Python_Programming/repo_Raystation_Scripting/ABAS_Studies") 434 | list.files(pattern = "\\.csv$") 435 | #read csv file of raw values 436 | rawdata <- read.csv("ck-sd-genanalyser2.csv", header=T) 437 | rawdataNew <- read.csv("ck-sd-genanalyser3.csv", header=T) 438 | #parse the volume subset 439 | volumes <- filter(rawdata, type=="vol") 440 | volumesNew <- filter(rawdataNew,type == "vol") 441 | volumesDistribution <- data.frame( 442 | patid = volumes$patid, 443 | organ = volumes$organ, 444 | ref = volumes$OR, 445 | ck = volumes$CK, 446 | sd = volumes$SD, 447 | rs = volumes$RS, 448 | mf = volumes$MF, 449 | mf2 = volumesNew$Mfnew, 450 | CKvsOR = volumes$CK - volumes$OR, 451 | SDvsOR = volumes$SD - volumes$OR, 452 | RSvsOR = volumes$RS - volumes$OR, 453 | MFvsOR = volumes$MF - volumes$OR, 454 | MF2vsOR = volumesNew$Mfnew - volumes$OR, 455 | Rel.CK = volumes$dCK / volumes$CK, 456 | Dice.CK = (2*volumes$dCK)/(volumes$OR + volumes$CK), 457 | Rel.SD = volumes$dSD / volumes$SD, 458 | Dice.SD = (2*volumes$dSD)/(volumes$OR + volumes$SD), 459 | Rel.RS = volumes$dRS / volumes$RS, 460 | Dice.RS = (2*volumes$dRS)/(volumes$OR + volumes$RS), 461 | Rel.MF = volumes$dMF / volumes$MF, 462 | Dice.MF = (2*volumes$dMF)/(volumes$OR + volumes$MF), 463 | Rel.MF2 = volumesNew$dMFnew / volumesNew$Mfnew, 464 | Dice.MF2 = (2*volumesNew$dMFnew)/(volumes$OR + volumesNew$Mfnew) 465 | ) 466 | mVolumesDistribution <- melt(volumesDistribution,id=c("patid","organ")) 467 | names(mVolumesDistribution) <- c("patid","organ","Category","VolDiff") 468 | mVolumesDistribution <- mVolumesDistribution[complete.cases(mVolumesDistribution),] 469 | #parse the dosimetry subset 470 | dose <- filter(rawdata, type!="vol") 471 | doseNew <- filter(rawdataNew, type!="vol") 472 | doseDistribution <- data.frame( 473 | patid = dose$patid, 474 | organ = dose$organ, 475 | type = dose$type, 476 | ref = dose$OR, 477 | ck = dose$CK, 478 | sd = dose$SD, 479 | rs = dose$RS, 480 | mf = dose$MF, 481 | mf2 = doseNew$Mfnew, 482 | CKvsOR = as.numeric(as.character(dose$CK))-as.numeric(as.character(dose$OR)), 483 | SDvsOR = as.numeric(as.character(dose$SD))-as.numeric(as.character(dose$OR)), 484 | RSvsOR = as.numeric(as.character(dose$RS))-as.numeric(as.character(dose$OR)), 485 | MFvsOR = as.numeric(as.character(dose$MF))-as.numeric(as.character(dose$OR)), 486 | MF2vsOR = as.numeric(as.character(doseNew$Mfnew))-as.numeric(as.character(doseNew$OR)) 487 | ) 488 | mDoseDistribution <- melt(doseDistribution,id=c("patid","organ","type")) 489 | names(mDoseDistribution) <- c("patid","organ","type","Category","DoseDiff") 490 | mDoseDistribution <- mDoseDistribution[complete.cases(mDoseDistribution),] 491 | #clean up 492 | rm(dose,volumes,rawdata,doseNew,volumesNew,rawdataNew) 493 | rm(doseDistribution,volumesDistribution) 494 | paldef0 <- c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3") 495 | paldef <- c("#E41A1C", "#377EB8", "black", "#4DAF4A", "#984EA3") 496 | paldef2 <- c("#E41A1C", "#377EB8", "grey80", "#4DAF4A", "#984EA3") 497 | paldef3 <- c("black", "#4DAF4A", "#984EA3") 498 | ppi <- 600 499 | y <- filter(mVolumesDistribution, organ=="pulm" & Category %in% c("ck","sd","rs","mf","mf2")) 500 | x <- filter(mVolumesDistribution, organ=="pulm" & Category %in% c("ref")) 501 | all <- cbind(y,Baseline=x$VolDiff) 502 | ggplot(all,aes( 503 | x=Baseline, 504 | y=VolDiff, 505 | shape=Category, colour=Category)) + 506 | geom_point(size=3) + 507 | scale_shape_manual(values=c(15,16,0,17,18)) + 508 | xlim(1900,5500) + ylim(1900,5500) + 509 | geom_abline(intercept = 0, slope = 1, linetype="dashed") + 510 | labs(x = "Reference Lung Volume (in cc)", y = "Drawn Lung Volume (in cc)") + 511 | theme_bw() + 512 | scale_colour_manual(values = paldef) 513 | -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Heart-in_Raystation-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Heart-in_Raystation-1.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Heart-in_Raystation-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Heart-in_Raystation-2.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Heart-in_Raystation-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Heart-in_Raystation-3.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Heart-in_Raystation-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Heart-in_Raystation-4.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Lung-in_Raystation-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Lung-in_Raystation-1.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Lung-in_Raystation-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Lung-in_Raystation-2.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Lung-in_Raystation-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Lung-in_Raystation-3.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-Lung-in_Raystation-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-Lung-in_Raystation-4.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-SpinalCord-in_Raystation-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-SpinalCord-in_Raystation-1.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-SpinalCord-in_Raystation-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-SpinalCord-in_Raystation-2.png -------------------------------------------------------------------------------- /ABAS_Studies/ABAS-SpinalCord-in_Raystation-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/ABAS-SpinalCord-in_Raystation-3.png -------------------------------------------------------------------------------- /ABAS_Studies/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/Thumbs.db -------------------------------------------------------------------------------- /ABAS_Studies/abas-ck-sd-genanalyser3.csv: -------------------------------------------------------------------------------- 1 | num,patid,frak,organ,type,lastOR,OR,Mfnew,dMFnew 1,1,60/30,pulm,vol,2687.01,2683.4,2551.3,2529.7 2,2,45/30,pulm,vol,2446.15,2446.6,2295.2,2279.8 3,6,66/33,pulm,vol,3800,3794.0,3643.2,3602.1 4,7,66/33,pulm,vol,3774.6,3770.2,3729.6,3657.1 5,8,60/30,pulm,vol,4597.85,4594.0,4634.1,4313.2 6,9,66/33,pulm,vol,1942.39,1938.7,1978.9,1884.9 7,10,66/33,pulm,vol,2516.76,2513.1,2625.2,2477.3 8,11,66/33,pulm,vol,3947.9,3943.0,3962.6,3859.0 9,12,66/33,pulm,vol,4054.19,4053.6,4245.2,3964.6 10,13,66/33,pulm,vol,5026.52,5023.2,4846.7,4771.5 11,14,66/33,pulm,vol,2041.55,2041.5,2021.1,1932.3 12,15,66/33,pulm,vol,3836.72,3829.0,3993.5,3774.3 13,17,45/25,pulm,vol,2211.08,2210.3,2224.4,2147.5 14,18,66/33,pulm,vol,3426.28,3421.9,3336.0,3284.2 15,19,66/33,pulm,vol,3541.83,3534.8,3599.7,3464.5 16,20,66/33,pulm,vol,2548.13,2546.9,2420.9,2385.2 1,1,60/30,cor,vol,521.21,521.5,481.3,452.5 2,2,45/30,cor,vol,531.87,530.9,628.2,518.1 3,6,66/33,cor,vol,683.09,684.4,646.4,618.8 4,7,66/33,cor,vol,596.87,597.8,593.7,544.1 5,8,60/30,cor,vol,846.19,846.6,743.8,531.6 6,9,66/33,cor,vol,691.6,693.1,628.0,508.6 7,10,66/33,cor,vol,700.7,701.4,685.0,613.8 8,11,66/33,cor,vol,649.11,649.8,636.3,582.8 9,12,66/33,cor,vol,1501.49,1502.4,1224.1,1071.8 10,13,66/33,cor,vol,597.04,598.0,674.9,564.3 11,14,66/33,cor,vol,551.19,552.6,646.7,535.9 12,15,66/33,cor,vol,1418.63,1420.3,1213.7,1121.1 13,17,45/25,cor,vol,609.81,610.5,778.6,594.6 14,18,66/33,cor,vol,408.51,409.1,429.7,379.3 15,19,66/33,cor,vol,635.46,636.1,652.5,608.3 16,20,66/33,cor,vol,656.01,656.5,729.7,644.5 1,1,60/30,canalis,vol,59.3,59.9,38.4,37.0 2,2,45/30,canalis,vol,76.01,76.5,49.8,48.7 3,6,66/33,canalis,vol,76.22,76.4,51.8,50.5 4,7,66/33,canalis,vol,77,77.2,81.6,69.6 5,8,60/30,canalis,vol,94.33,95.2,45.2,42.9 6,9,66/33,canalis,vol,59.35,60.0,33.7,32.2 7,10,66/33,canalis,vol,69.77,70.2,53.4,48.3 8,11,66/33,canalis,vol,76.63,77.8,58.2,54.3 9,12,66/33,canalis,vol,71.78,69.7,68.9,55.5 10,13,66/33,canalis,vol,68.57,68.9,57.8,52.8 11,14,66/33,canalis,vol,47.41,47.4,43.1,37.8 12,15,66/33,canalis,vol,74.24,75.0,62.3,58.6 13,17,45/25,canalis,vol,54.85,55.1,38.1,36.2 14,18,66/33,canalis,vol,45.31,45.5,43.6,38.2 15,19,66/33,canalis,vol,45.27,45.3,41.3,37.4 16,20,66/33,canalis,vol,57.26,58.2,50.1,45.6 1,1,60/30,pulm,v20,0.3619,0.3627,0.3657,NA 2,2,45/30,pulm,v20,0.2938,0.2938,0.2970,NA 3,6,66/33,pulm,v20,0.252,0.2521,0.2550,NA 4,7,66/33,pulm,v20,0.2395,0.2397,0.2414,NA 5,8,60/30,pulm,v20,0.3023,0.3017,0.2958,NA 6,9,66/33,pulm,v20,0.1574,0.1573,0.1550,NA 7,10,66/33,pulm,v20,0.3678,0.3670,0.3656,NA 8,11,66/33,pulm,v20,0.1633,0.1636,0.1636,NA 9,12,66/33,pulm,v20,0.3362,0.3364,0.3481,NA 10,13,66/33,pulm,v20,0.379,0.3790,0.3707,NA 11,14,66/33,pulm,v20,0.2072,0.2069,0.2058,NA 12,15,66/33,pulm,v20,0.2442,0.2440,0.2405,NA 13,17,45/25,pulm,v20,0.3657,0.3660,0.3693,NA 14,18,66/33,pulm,v20,0.3756,0.3758,0.3745,NA 15,19,66/33,pulm,v20,0.3019,0.3018,0.2995,NA 16,20,66/33,pulm,v20,0.2985,0.2983,0.2967,NA 1,1,60/30,pulm,avdose,18.62,18.65,18.81,NA 2,2,45/30,pulm,avdose,15.19,15.18,15.33,NA 3,6,66/33,pulm,avdose,14.51,14.49,14.59,NA 4,7,66/33,pulm,avdose,13.06,13.07,13.17,NA 5,8,60/30,pulm,avdose,13.56,13.55,13.22,NA 6,9,66/33,pulm,avdose,9.73,9.74,9.60,NA 7,10,66/33,pulm,avdose,18.51,18.50,18.51,NA 8,11,66/33,pulm,avdose,8.81,8.81,8.85,NA 9,12,66/33,pulm,avdose,19.93,19.93,20.47,NA 10,13,66/33,pulm,avdose,20.55,20.54,20.07,NA 11,14,66/33,pulm,avdose,10.54,10.54,10.46,NA 12,15,66/33,pulm,avdose,14.79,14.77,14.60,NA 13,17,45/25,pulm,avdose,18.76,18.75,18.86,NA 14,18,66/33,pulm,avdose,21.36,21.35,21.34,NA 15,19,66/33,pulm,avdose,16.59,16.58,16.50,NA 16,20,66/33,pulm,avdose,17.09,17.08,16.89,NA 1,1,60/30,cor,v50,0.02,0.0198,0.0244,NA 2,2,45/30,cor,v50,0,0.0000,0.0000,NA 3,6,66/33,cor,v50,0.0477,0.0471,0.0270,NA 4,7,66/33,cor,v50,0.0041,0.0041,0.0000,NA 5,8,60/30,cor,v50,0.0016,0.0017,0.1466,NA 6,9,66/33,cor,v50,0,0.0000,0.0000,NA 7,10,66/33,cor,v50,0.1069,0.1073,0.1706,NA 8,11,66/33,cor,v50,0.0344,0.0343,0.0120,NA 9,12,66/33,cor,v50,0.0621,0.0621,0.1189,NA 10,13,66/33,cor,v50,0.1177,0.1176,0.0977,NA 11,14,66/33,cor,v50,0.0076,0.0081,0.0234,NA 12,15,66/33,cor,v50,0,0.0000,0.0000,NA 13,17,45/25,cor,v50,0,0.0000,0.0000,NA 14,18,66/33,cor,v50,0.1537,0.1535,0.1883,NA 15,19,66/33,cor,v50,0.0028,0.0031,0.0042,NA 16,20,66/33,cor,v50,0.0508,0.0508,0.0622,NA 1,1,60/30,cor,avdose,9.6,9.60,11.25,NA 2,2,45/30,cor,avdose,18.29,18.26,18.85,NA 3,6,66/33,cor,avdose,11.3,11.28,9.99,NA 4,7,66/33,cor,avdose,2.82,2.82,2.20,NA 5,8,60/30,cor,avdose,3.98,3.97,15.29,NA 6,9,66/33,cor,avdose,0.91,0.91,2.40,NA 7,10,66/33,cor,avdose,20.55,20.54,24.78,NA 8,11,66/33,cor,avdose,7.78,7.78,4.87,NA 9,12,66/33,cor,avdose,19.49,19.49,24.94,NA 10,13,66/33,cor,avdose,29.6,29.60,27.26,NA 11,14,66/33,cor,avdose,4.32,4.32,5.73,NA 12,15,66/33,cor,avdose,2.82,2.82,3.21,NA 13,17,45/25,cor,avdose,20.55,20.55,20.82,NA 14,18,66/33,cor,avdose,28.24,28.22,30.73,NA 15,19,66/33,cor,avdose,6.99,6.99,6.87,NA 16,20,66/33,cor,avdose,8.26,8.25,8.71,NA 1,1,60/30,canalis,d1cc,34.35,34.11,33.63,NA 2,2,45/30,canalis,d1cc,35.93,34.95,32.01,NA 3,6,66/33,canalis,d1cc,19.81,19.64,19.17,NA 4,7,66/33,canalis,d1cc,39.86,39.46,38.51,NA 5,8,60/30,canalis,d1cc,24.21,24.12,23.19,NA 6,9,66/33,canalis,d1cc,32.71,32.58,32.46,NA 7,10,66/33,canalis,d1cc,35.8,34.78,34.55,NA 8,11,66/33,canalis,d1cc,26.83,26.46,25.77,NA 9,12,66/33,canalis,d1cc,35.72,34.80,35.11,NA 10,13,66/33,canalis,d1cc,43.12,42.84,41.34,NA 11,14,66/33,canalis,d1cc,34.57,33.93,33.74,NA 12,15,66/33,canalis,d1cc,11.37,11.31,11.32,NA 13,17,45/25,canalis,d1cc,34.04,33.92,33.86,NA 14,18,66/33,canalis,d1cc,39.79,39.09,39.04,NA 15,19,66/33,canalis,d1cc,40.77,39.73,38.81,NA 16,20,66/33,canalis,d1cc,34.07,33.42,32.75,NA -------------------------------------------------------------------------------- /ABAS_Studies/abas-test.py: -------------------------------------------------------------------------------- 1 | import math 2 | from connect import * 3 | import time 4 | import sys 5 | clr.AddReference("PresentationFramework") 6 | from System.Windows import * 7 | 8 | 9 | # DEFINE THE CT DENSITY TABLE NAME 10 | densityConversionTable = 'HR_OEB HUsetting' 11 | 12 | 13 | # Define null filter 14 | filter = {} 15 | 16 | # Get handle to patient db 17 | db = get_current('PatientDB') 18 | 19 | # Define patient and examination handles 20 | patient = get_current('Patient') 21 | examination = get_current('Examination') 22 | 23 | # RESET current simulation modality to the REQUIRED HU-DENSITY MAPPING 24 | examination.EquipmentInfo.SetImagingSystemReference(ImagingSystemName = densityConversionTable) 25 | patient.Save() 26 | 27 | #ROI algebra to join left and right lung structures together 28 | # -- first CK set 29 | with CompositeAction('ROI Algebra (SD; Pulmones)'): 30 | try: 31 | r1 = patient.PatientModel.CreateRoi(Name='CK; Pulmones', Color="0,51,25", Type="Organ", TissueName=None, RoiMaterial=None) 32 | r1.SetAlgebraExpression( 33 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['CK; Pulmo sin'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 34 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['CK; Pulmo dxt'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 35 | ResultOperation="Union", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 36 | r1.UpdateDerivedGeometry(Examination=examination) 37 | except Exception: 38 | print 'Failed to create structure union. Continues ...' 39 | #end composite action 40 | 41 | # -- next SD set 42 | with CompositeAction('ROI Algebra (SD; Pulmones)'): 43 | try: 44 | r2 = patient.PatientModel.CreateRoi(Name='SD; Pulmones', Color="255,128,0", Type="Organ", TissueName=None, RoiMaterial=None) 45 | r2.SetAlgebraExpression( 46 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['SD; Pulmo sin'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 47 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['SD; Pulmo dxt'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 48 | ResultOperation="Union", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 49 | r2.UpdateDerivedGeometry(Examination=examination) 50 | except Exception: 51 | print 'Failed to create structure union. Continues ...' 52 | #end composite action 53 | 54 | # EXTERNAL body contour will be created using threshold-based segmentation 55 | #with CompositeAction('Create External'): 56 | # patient.PatientModel.CreateRoi(Name='ABAS Ext', Color="Orange", Type="External", TissueName=None, RoiMaterial=None) 57 | # patient.PatientModel.RegionsOfInterest['ABAS Ext'].CreateExternalGeometry(Examination=examination, ThresholdLevel=-150) 58 | # # CompositeAction ends 59 | 60 | get_current("ActionVisibility:Internal") # needed due to that MBS actions not visible in evaluation version. 61 | patient.PatientModel.MBSAutoInitializer(MbsRois=[ 62 | { 'CaseType': "Thorax", 'ModelName': "SpinalCord (Thorax)", 'RoiName': "Spinal Cord", 'RoiColor': "0,0,255" }], 63 | CreateNewRois=True, Examination=examination, UseAtlasBasedInitialization=True) 64 | patient.PatientModel.AdaptMbsMeshes(Examination=examination, RoiNames=['Spinal Cord'], CustomStatistics=None, CustomSettings=None) 65 | 66 | #first pass autosegmentation using the default atlas for heart and lung 67 | patient.PatientModel.CreateStructuresFromAtlas(SourceTemplateName="AbpDefaultData - HeartAndLung", 68 | SourceExaminationsNames=["P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8", "P9", "P10", "P11", "P12", "P13", "P14", "P15", "P16"], 69 | SourceRoiNames=["Heart", "Lung (Right)", "Lung (Left)"], SourcePoiNames=[], AssociateStructuresByName=True, TargetExamination=examination) 70 | patient.Save() 71 | 72 | #second pass autosegmentation using the MedFys atlas for heart, lung and spinal cord 73 | patient.PatientModel.CreateStructuresFromAtlas(SourceTemplateName="VsAtlas-CorPulmSpinalis", 74 | SourceExaminationsNames=["ThFemG1_5", "ThFemG1_6", "ThFemG1_8", "ThFemG2_0", "ThFemG2_4", "ThFemG2_6", "ThFemIG1_0", "ThFemIG1_2", "ThFemIG1_6", "ThFemIG2_0"], 75 | SourceRoiNames=["ABAS; Cor", "ABAS; Pulmo dxt", "ABAS; Pulmo sin","ABAS; Canalis spinalis"], SourcePoiNames=[], AssociateStructuresByName=True, TargetExamination=examination) 76 | 77 | 78 | # -- process autosegmentation volumes "Lung (Right)", "Lung (Left)" 79 | with CompositeAction('ROI Algebra (Pulmones)'): 80 | try: 81 | r3 = patient.PatientModel.CreateRoi(Name='Pulmones (union)', Color="102,0,102", Type="Organ", TissueName=None, RoiMaterial=None) 82 | r3.SetAlgebraExpression( 83 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['Lung (Right)'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 84 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['Lung (Left)'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 85 | ResultOperation="Union", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 86 | r3.UpdateDerivedGeometry(Examination=examination) 87 | except Exception: 88 | print 'Failed to create structure union. Continues ...' 89 | #end composite action 90 | 91 | 92 | # -- process autosegmentation volumes "ABAS; Pulmo dxt", "ABAS; Pulmo sin" 93 | with CompositeAction('ROI Algebra (ABAS; Pulmones)'): 94 | try: 95 | r4 = patient.PatientModel.CreateRoi(Name='ABAS; Pulmones', Color="204,255,153", Type="Organ", TissueName=None, RoiMaterial=None) 96 | r4.SetAlgebraExpression( 97 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['ABAS; Pulmo dxt'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 98 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['ABAS; Pulmo sin'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 99 | ResultOperation="Union", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 100 | r4.UpdateDerivedGeometry(Examination=examination) 101 | except Exception: 102 | print 'Failed to create structure union. Continues ...' 103 | #end composite action 104 | 105 | #save before forcing computation 106 | patient.Save() 107 | 108 | plan = patient.TreatmentPlans['abas'] #work on abas plan 109 | # import clinical goals from a predefined template 110 | plan.TreatmentCourse.EvaluationSetup.ApplyClinicalGoalTemplate(Template=db.TemplateTreatmentOptimizations['ck-sd-abas']) 111 | 112 | beamset = patient.TreatmentPlans['abas'].BeamSets['abas'] #work on abas beamset 113 | 114 | #force small dose grid 115 | plan.SetDefaultDoseGrid(VoxelSize={'x':0.20, 'y':0.20, 'z':0.20}) 116 | 117 | #recompute 118 | beamset.ComputeDose(ComputeBeamDoses=True, DoseAlgorithm="CCDose", ForceRecompute=False) 119 | 120 | 121 | #save final result 122 | patient.Save() 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /ABAS_Studies/abas2.py: -------------------------------------------------------------------------------- 1 | import math 2 | from connect import * 3 | import time 4 | import sys 5 | clr.AddReference("PresentationFramework") 6 | from System.Windows import * 7 | 8 | 9 | # DEFINE THE CT DENSITY TABLE NAME 10 | densityConversionTable = 'HR_OEB HUsetting' 11 | 12 | 13 | # Define null filter 14 | filter = {} 15 | 16 | # Get handle to patient db 17 | db = get_current('PatientDB') 18 | 19 | # Define patient and examination handles 20 | patient = get_current('Patient') 21 | examination = get_current('Examination') 22 | 23 | # RESET current simulation modality to the REQUIRED HU-DENSITY MAPPING 24 | #examination.EquipmentInfo.SetImagingSystemReference(ImagingSystemName = densityConversionTable) 25 | #patient.Save() 26 | 27 | 28 | 29 | #new autosegmentation using the updtaed MedFys atlas for heart, lung and spinal cord 30 | patient.PatientModel.CreateStructuresFromAtlas(SourceTemplateName="MF-Atlas-CorPulmSpinalis", 31 | SourceExaminationsNames=["ThFemG1_5", "ThFemG1_6", "ThFemG1_8", "ThFemG2_4", "ThFemG2_6", "ThFemIG1_0", "ThFemIG1_2", "ThFemIG1_6", "ThFemIG2_0"], 32 | SourceRoiNames=["MF; Cor", "MF; Pulmo dxt", "MF; Pulmo sin","MF; Canalis spinalis"], SourcePoiNames=[], AssociateStructuresByName=True, TargetExamination=examination) 33 | 34 | 35 | # -- process autosegmentation volumes to union the ABAS MF lung 36 | with CompositeAction('ROI Algebra (MF; Pulmones)'): 37 | try: 38 | r4 = patient.PatientModel.CreateRoi(Name='MF; Pulmones', Color="102,0,102", Type="Organ", TissueName=None, RoiMaterial=None) 39 | r4.SetAlgebraExpression( 40 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['MF; Pulmo dxt'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 41 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['MF; Pulmo sin'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 42 | ResultOperation="Union", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 43 | r4.UpdateDerivedGeometry(Examination=examination) 44 | except Exception: 45 | print 'Failed to create structure union. Continues ...' 46 | #end composite action 47 | 48 | with CompositeAction('ROI Algebra (MF; PulmExGTV-T)'): 49 | try: 50 | r5 = patient.PatientModel.CreateRoi(Name='MF; PulmExGTV-T', Color="102,0,102", Type="Organ", TissueName=None, RoiMaterial=None) 51 | r5.SetAlgebraExpression( 52 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['MF; Pulmones'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 53 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['GTV-T'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 54 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 55 | r5.UpdateDerivedGeometry(Examination=examination) 56 | except Exception: 57 | print 'Failed to create structure subtraction. Continues ...' 58 | #end composite action 59 | 60 | 61 | 62 | 63 | #intersection of new MF volumes with OR 64 | with CompositeAction('ROI Algebra'): 65 | try: 66 | r7 = patient.PatientModel.CreateRoi(Name='dMFpulm', Color="102,0,102", Type="Organ", TissueName=None, RoiMaterial=None) 67 | r7.SetAlgebraExpression( 68 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['MF; Pulmones'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 69 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['OR; Pulmones'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 70 | ResultOperation="Intersection", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 71 | r7.UpdateDerivedGeometry(Examination=examination) 72 | except Exception: 73 | print 'Failed to create structure intersection. Continues ...' 74 | #end composite action 75 | with CompositeAction('ROI Algebra'): 76 | try: 77 | r8 = patient.PatientModel.CreateRoi(Name='dMFcor', Color="102,0,102", Type="Organ", TissueName=None, RoiMaterial=None) 78 | r8.SetAlgebraExpression( 79 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['MF; Cor'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 80 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['OR; Cor'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 81 | ResultOperation="Intersection", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 82 | r8.UpdateDerivedGeometry(Examination=examination) 83 | except Exception: 84 | print 'Failed to create structure intersection. Continues ...' 85 | #end composite action 86 | with CompositeAction('ROI Algebra'): 87 | try: 88 | r9 = patient.PatientModel.CreateRoi(Name='dMFcanalis', Color="102,0,102", Type="Organ", TissueName=None, RoiMaterial=None) 89 | r9.SetAlgebraExpression( 90 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': ['MF; Canalis spinalis'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 91 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': ['OR; Canalis spinalis'], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 92 | ResultOperation="Intersection", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 93 | r9.UpdateDerivedGeometry(Examination=examination) 94 | except Exception: 95 | print 'Failed to create structure intersection. Continues ...' 96 | #end composite action 97 | #save final result 98 | patient.Save() 99 | 100 | 101 | 102 | #save before forcing computation 103 | patient.Save() 104 | 105 | plan = patient.TreatmentPlans['abas'] #work on abas plan 106 | # import clinical goals from a predefined template 107 | plan.TreatmentCourse.EvaluationSetup.ApplyClinicalGoalTemplate(Template=db.TemplateTreatmentOptimizations['mf-new-abas']) 108 | 109 | beamset = patient.TreatmentPlans['abas'].BeamSets['abas'] #work on abas beamset 110 | 111 | #force small dose grid 112 | plan.SetDefaultDoseGrid(VoxelSize={'x':0.30, 'y':0.30, 'z':0.30}) 113 | beamset.ComputeDose(ComputeBeamDoses=True, DoseAlgorithm="CCDose", ForceRecompute=False) 114 | 115 | plan.SetDefaultDoseGrid(VoxelSize={'x':0.25, 'y':0.25, 'z':0.25}) 116 | #recompute 117 | beamset.ComputeDose(ComputeBeamDoses=True, DoseAlgorithm="CCDose", ForceRecompute=False) 118 | 119 | #save before forcing computation 120 | patient.Save() 121 | 122 | 123 | -------------------------------------------------------------------------------- /ABAS_Studies/abas_rs_user_meeting.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/abas_rs_user_meeting.zip -------------------------------------------------------------------------------- /ABAS_Studies/ck-sd-genanalyser1.csv: -------------------------------------------------------------------------------- 1 | num,patid,frak,OR,CK,SD,RS,MF,organ,type,dCK,dSD,dRS,dMF 1,1,60/30,2687.01,2696.11,2642.11,2726.58,2557.18,pulm,vol,2661.08,2591.61,2635.05,2538.78 2,2,45/30,2446.15,2340.22,2334.5,2586.37,2292.94,pulm,vol,2333.78,2328.39,2402.24,2278.16 3,6,66/33,3800,3863.86,3725.09,4169.17,3653.02,pulm,vol,,,, 4,7,66/33,3774.6,3759.69,3916.47,3995.77,3743.8,pulm,vol,,,, 5,8,60/30,4597.85,4494.75,4695.71,5011.56,4641.69,pulm,vol,,,, 6,9,66/33,1942.39,1957.41,1994.3,2012.47,1980.51,pulm,vol,,,, 7,10,66/33,2516.76,2525.9,2540.92,2841.3,2618.1,pulm,vol,,,, 8,11,66/33,3947.9,3931.87,3942.5,4339.29,3960.34,pulm,vol,,,, 9,12,66/33,4054.19,4233.79,4221.76,4825.93,4120.96,pulm,vol,,,, 10,13,66/33,5026.52,4905.52,4938.14,5466.03,4851.04,pulm,vol,,,, 11,14,66/33,2041.55,1964.62,1925.59,2236.9,2048.46,pulm,vol,,,, 12,15,66/33,3836.72,3903.18,4009.41,4477.73,4009.56,pulm,vol,,,, 13,17,45/25,2211.08,2216.33,2244.9,2482.78,2202.01,pulm,vol,,,, 14,18,66/33,3426.28,3371.64,3509.44,3801.1,3346.45,pulm,vol,,,, 15,19,66/33,3541.83,3622.38,3647.21,3956.94,3619.42,pulm,vol,,,, 16,20,66/33,2548.13,2461.66,2525.49,2753.04,2422.75,pulm,vol,,,, 1,1,60/30,521.21,516.13,511.27,503.75,501,cor,vol,502.81,498.41,463.35,468.22 2,2,45/30,531.87,531.23,546.15,700.57,633.21,cor,vol,501.62,506.25,499.83,521.92 3,6,66/33,683.09,636.85,684.99,824.47,647.12,cor,vol,,,, 4,7,66/33,596.87,589.68,599.3,623.27,592.87,cor,vol,,,, 5,8,60/30,846.19,665.17,815.73,755.77,740.69,cor,vol,,,, 6,9,66/33,691.6,662.8,659.61,703.53,617.12,cor,vol,,,, 7,10,66/33,700.7,709.33,710.39,820.64,693.71,cor,vol,,,, 8,11,66/33,649.11,640.57,634.05,761.35,638.16,cor,vol,,,, 9,12,66/33,1501.49,1472.06,1367.52,1579.16,1406.04,cor,vol,,,, 10,13,66/33,597.04,654.59,590.08,686.68,674.26,cor,vol,,,, 11,14,66/33,551.19,580.41,581.83,643.13,628.76,cor,vol,,,, 12,15,66/33,1418.63,1433.81,1329.01,1275.3,1293.45,cor,vol,,,, 13,17,45/25,609.81,612.7,597.27,703.35,759.42,cor,vol,,,, 14,18,66/33,408.51,441.77,436.21,471.14,429.52,cor,vol,,,, 15,19,66/33,635.46,646.67,632.68,675.26,651.11,cor,vol,,,, 16,20,66/33,656.01,633.04,619.2,663.44,736.11,cor,vol,,,, 1,1,60/30,59.3,NA,NA,46.12,46.66,canalis,vol,NA,NA,43.13,38.73 2,2,45/30,76.01,NA,NA,41.2,60.58,canalis,vol,NA,NA,40.67,58.9 3,6,66/33,76.22,NA,NA,50.48,61.1,canalis,vol,,,, 4,7,66/33,77,NA,NA,58.56,74.18,canalis,vol,,,, 5,8,60/30,94.33,NA,NA,60.27,93.23,canalis,vol,,,, 6,9,66/33,59.35,NA,NA,34.42,37.85,canalis,vol,,,, 7,10,66/33,69.77,NA,NA,50.87,52.93,canalis,vol,,,, 8,11,66/33,76.63,NA,NA,49.64,77.43,canalis,vol,,,, 9,12,66/33,71.78,NA,NA,44.12,74.09,canalis,vol,,,, 10,13,66/33,68.57,NA,NA,51.35,73.6,canalis,vol,,,, 11,14,66/33,47.41,NA,NA,42.27,50.38,canalis,vol,,,, 12,15,66/33,74.24,NA,NA,56.42,72.84,canalis,vol,,,, 13,17,45/25,54.85,NA,NA,26.66,38.59,canalis,vol,,,, 14,18,66/33,45.31,NA,NA,31.7,49.31,canalis,vol,,,, 15,19,66/33,45.27,NA,NA,39.48,69.64,canalis,vol,,,, 16,20,66/33,57.26,NA,NA,34.36,56.75,canalis,vol,,,, 1,1,60/30,0.3619,0.3635,0.3526,0.3695,0.3652,pulm,v20,,,, 2,2,45/30,0.2938,0.2992,0.2953,0.29,0.2974,pulm,v20,,,, 3,6,66/33,0.252,0.2531,0.2551,0.2578,0.2564,pulm,v20,,,, 4,7,66/33,0.2395,0.2374,0.2358,0.2368,0.2438,pulm,v20,,,, 5,8,60/30,0.3023,0.3057,0.3062,0.3087,0.2961,pulm,v20,,,, 6,9,66/33,0.1574,0.158,0.1635,0.1585,0.1571,pulm,v20,,,, 7,10,66/33,0.3678,0.367,0.3669,0.3736,0.3649,pulm,v20,,,, 8,11,66/33,0.1633,0.1637,0.1626,0.167,0.1633,pulm,v20,,,, 9,12,66/33,0.3362,0.3468,0.3647,0.3792,0.3657,pulm,v20,,,, 10,13,66/33,0.379,0.3752,0.38,0.3806,0.3708,pulm,v20,,,, 11,14,66/33,0.2072,0.2114,0.2119,0.1989,0.2032,pulm,v20,,,, 12,15,66/33,0.2442,0.2441,0.2496,0.2404,0.2439,pulm,v20,,,, 13,17,45/25,0.3657,0.3766,0.3769,0.3805,0.3707,pulm,v20,,,, 14,18,66/33,0.3756,0.3735,0.3803,0.3777,0.376,pulm,v20,,,, 15,19,66/33,0.3019,0.3046,0.3085,0.3039,0.3044,pulm,v20,,,, 16,20,66/33,0.2985,0.295,0.2975,0.2965,0.2988,pulm,v20,,,, 1,1,60/30,18.62,18.72,18.18,19.01,18.78,pulm,avdose,,,, 2,2,45/30,15.19,15.38,15.23,15.08,15.35,pulm,avdose,,,, 3,6,66/33,14.51,14.6,14.63,14.9,14.7,pulm,avdose,,,, 4,7,66/33,13.06,12.96,12.92,13,13.34,pulm,avdose,,,, 5,8,60/30,13.56,13.65,13.67,13.73,13.22,pulm,avdose,,,, 6,9,66/33,9.73,9.76,10.03,9.77,9.72,pulm,avdose,,,, 7,10,66/33,18.51,18.5,18.55,19.02,18.46,pulm,avdose,,,, 8,11,66/33,8.81,8.81,8.82,8.99,8.84,pulm,avdose,,,, 9,12,66/33,19.93,20.63,21.68,22.49,21.65,pulm,avdose,,,, 10,13,66/33,20.55,20.4,20.71,20.71,20.1,pulm,avdose,,,, 11,14,66/33,10.54,10.71,10.72,10.11,10.34,pulm,avdose,,,, 12,15,66/33,14.79,14.8,15.06,14.6,14.85,pulm,avdose,,,, 13,17,45/25,18.76,19.14,19.16,19.36,18.86,pulm,avdose,,,, 14,18,66/33,21.36,21.34,21.65,21.41,21.46,pulm,avdose,,,, 15,19,66/33,16.59,16.82,17.02,16.72,16.85,pulm,avdose,,,, 16,20,66/33,17.09,16.93,17.09,17.04,17.02,pulm,avdose,,,, 1,1,60/30,0.02,0.0233,0.0243,0.0317,0.0218,cor,v50,,,, 2,2,45/30,0,0,0,0,0,cor,v50,,,, 3,6,66/33,0.0477,0.0618,0.0619,0.1188,0.0282,cor,v50,,,, 4,7,66/33,0.0041,0.0073,0.0112,0.0074,0,cor,v50,,,, 5,8,60/30,0.0016,0.0075,0.0061,0.0489,0.1467,cor,v50,,,, 6,9,66/33,0,0,0,0,0.0002,cor,v50,,,, 7,10,66/33,0.1069,0.1159,0.1057,0.245,0.1797,cor,v50,,,, 8,11,66/33,0.0344,0.03,0.0119,0.1008,0.0139,cor,v50,,,, 9,12,66/33,0.0621,0.0507,0.0311,0.1265,0.2073,cor,v50,,,, 10,13,66/33,0.1177,0.1737,0.1282,0.2105,0.0971,cor,v50,,,, 11,14,66/33,0.0076,0.0087,0.0031,0.0335,0.0237,cor,v50,,,, 12,15,66/33,0,0,0,0,0,cor,v50,,,, 13,17,45/25,0,0,0,0,0,cor,v50,,,, 14,18,66/33,0.1537,0.1622,0.1657,0.2816,0.1885,cor,v50,,,, 15,19,66/33,0.0028,0.01,0.0018,0.0128,0.0041,cor,v50,,,, 16,20,66/33,0.0508,0.0439,0.0384,0.0261,0.0663,cor,v50,,,, 1,1,60/30,9.6,9.98,10.1,11.42,10.5,cor,avdose,,,, 2,2,45/30,18.29,19.42,18.56,20.51,18.73,cor,avdose,,,, 3,6,66/33,11.3,12.65,12.48,16.59,10.08,cor,avdose,,,, 4,7,66/33,2.82,3.31,3.82,2.76,2.08,cor,avdose,,,, 5,8,60/30,3.98,4.63,4.55,8.68,15.32,cor,avdose,,,, 6,9,66/33,0.91,0.94,0.92,1.09,2.59,cor,avdose,,,, 7,10,66/33,20.55,21.12,20.68,28.72,25.21,cor,avdose,,,, 8,11,66/33,7.78,7.61,6.25,13.84,5.17,cor,avdose,,,, 9,12,66/33,19.49,18.6,17.67,24.01,29.81,cor,avdose,,,, 10,13,66/33,29.6,31.64,30.04,33.18,27.25,cor,avdose,,,, 11,14,66/33,4.32,4.21,3.48,6.8,5.89,cor,avdose,,,, 12,15,66/33,2.82,2.77,2.45,4.34,2.9,cor,avdose,,,, 13,17,45/25,20.55,20.17,20.23,21.7,21.93,cor,avdose,,,, 14,18,66/33,28.24,28.83,29.46,35.92,30.74,cor,avdose,,,, 15,19,66/33,6.99,8.25,7.2,8.55,6.88,cor,avdose,,,, 16,20,66/33,8.26,7.81,7.07,5.63,9.26,cor,avdose,,,, 1,1,60/30,34.35,NA,NA,34.17,34.19,canalis,d1cc,,,, 2,2,45/30,35.93,NA,NA,35.38,35.95,canalis,d1cc,,,, 3,6,66/33,19.81,NA,NA,19.95,19.79,canalis,d1cc,,,, 4,7,66/33,39.86,NA,NA,39.77,39.83,canalis,d1cc,,,, 5,8,60/30,24.21,NA,NA,24.67,26.12,canalis,d1cc,,,, 6,9,66/33,32.71,NA,NA,32.76,32.74,canalis,d1cc,,,, 7,10,66/33,35.8,NA,NA,36.68,37.28,canalis,d1cc,,,, 8,11,66/33,26.83,NA,NA,27.16,31.95,canalis,d1cc,,,, 9,12,66/33,35.72,NA,NA,35.27,39.12,canalis,d1cc,,,, 10,13,66/33,43.12,NA,NA,42.31,41.84,canalis,d1cc,,,, 11,14,66/33,34.57,NA,NA,34.34,34.41,canalis,d1cc,,,, 12,15,66/33,11.37,NA,NA,11.39,11.39,canalis,d1cc,,,, 13,17,45/25,34.04,NA,NA,34.09,34.01,canalis,d1cc,,,, 14,18,66/33,39.79,NA,NA,39.72,39.5,canalis,d1cc,,,, 15,19,66/33,40.77,NA,NA,40.91,51.89,canalis,d1cc,,,, 16,20,66/33,34.07,NA,NA,34.13,33.97,canalis,d1cc,,,, -------------------------------------------------------------------------------- /ABAS_Studies/ck-sd-genanalyser2.csv: -------------------------------------------------------------------------------- 1 | num,patid,frak,OR,CK,SD,RS,MF,organ,type,dCK,dSD,dRS,dMF 1,1,60/30,2687.01,2696.11,2642.11,2726.58,2557.18,pulm,vol,2661.08,2591.61,2635.05,2538.78 2,2,45/30,2446.15,2340.22,2334.5,2586.37,2292.94,pulm,vol,2333.78,2328.39,2402.24,2278.16 3,6,66/33,3800,3863.86,3725.09,4169.17,3653.02,pulm,vol,3789.22,3692.98,3794.83,3607.66 4,7,66/33,3774.6,3759.69,3916.47,3995.77,3743.8,pulm,vol,3712.83,3763.93,3717.57,3629.72 5,8,60/30,4597.85,4494.75,4695.71,5011.56,4641.69,pulm,vol,4444.25,4572.06,4490.11,4321.77 6,9,66/33,1942.39,1957.41,1994.3,2012.47,1980.51,pulm,vol,1896.80,1905.76,1850.61,1888.22 7,10,66/33,2516.76,2525.9,2540.92,2841.3,2618.1,pulm,vol,2485.46,2477.34,2497.89,2481.42 8,11,66/33,3947.9,3931.87,3942.5,4339.29,3960.34,pulm,vol,3895.29,3893.32,3933.67,3840.94 9,12,66/33,4054.19,4233.79,4221.76,4825.93,4120.96,pulm,vol,4018.18,3973.62,4006.38,3795.71 10,13,66/33,5026.52,4905.52,4938.14,5466.03,4851.04,pulm,vol,4804.42,4829.71,5001.69,4737.80 11,14,66/33,2041.55,1964.62,1925.59,2236.9,2048.46,pulm,vol,1950.48,1915.60,2009.29,1943.26 12,15,66/33,3836.72,3903.18,4009.41,4477.73,4009.56,pulm,vol,3809.99,3825.95,3832.20,3778.40 13,17,45/25,2211.08,2216.33,2244.9,2482.78,2202.01,pulm,vol,2144.31,2169.26,2197.08,2114.59 14,18,66/33,3426.28,3371.64,3509.44,3801.1,3346.45,pulm,vol,3329.84,3375.53,3417.52,3272.26 15,19,66/33,3541.83,3622.38,3647.21,3956.94,3619.42,pulm,vol,3533.42,3520.70,3534.61,3468.66 16,20,66/33,2548.13,2461.66,2525.49,2753.04,2422.75,pulm,vol,2451.20,2503.86,2533.22,2383.02 1,1,60/30,521.21,516.13,511.27,503.75,501,cor,vol,502.81,498.41,463.35,468.22 2,2,45/30,531.87,531.23,546.15,700.57,633.21,cor,vol,501.62,506.25,499.83,521.92 3,6,66/33,683.09,636.85,684.99,824.47,647.12,cor,vol,617.10,651.25,659.87,618.64 4,7,66/33,596.87,589.68,599.3,623.27,592.87,cor,vol,553.55,555.09,558.81,542.63 5,8,60/30,846.19,665.17,815.73,755.77,740.69,cor,vol,645.17,781.44,623.98,529.60 6,9,66/33,691.6,662.8,659.61,703.53,617.12,cor,vol,643.88,641.82,529.19,493.62 7,10,66/33,700.7,709.33,710.39,820.64,693.71,cor,vol,675.20,672.79,604.78,612.89 8,11,66/33,649.11,640.57,634.05,761.35,638.16,cor,vol,625.07,613.91,613.11,586.30 9,12,66/33,1501.49,1472.06,1367.52,1579.16,1406.04,cor,vol,1425.92,1347.31,1323.65,1007.47 10,13,66/33,597.04,654.59,590.08,686.68,674.26,cor,vol,578.61,544.77,561.50,562.69 11,14,66/33,551.19,580.41,581.83,643.13,628.76,cor,vol,526.33,516.38,446.57,523.94 12,15,66/33,1418.63,1433.81,1329.01,1275.3,1293.45,cor,vol,1356.36,1259.61,1016.00,1230.83 13,17,45/25,609.81,612.7,597.27,703.35,759.42,cor,vol,582.15,574.58,575.42,588.11 14,18,66/33,408.51,441.77,436.21,471.14,429.52,cor,vol,397.33,384.38,341.02,378.02 15,19,66/33,635.46,646.67,632.68,675.26,651.11,cor,vol,611.82,607.44,583.42,609.20 16,20,66/33,656.01,633.04,619.2,663.44,736.11,cor,vol,608.26,601.95,582.66,642.74 1,1,60/30,59.3,NA,NA,46.12,46.66,canalis,vol,NA,NA,43.13,38.73 2,2,45/30,76.01,NA,NA,41.2,60.58,canalis,vol,NA,NA,40.67,58.90 3,6,66/33,76.22,NA,NA,50.48,61.1,canalis,vol,NA,NA,48.57,58.61 4,7,66/33,77,NA,NA,58.56,74.18,canalis,vol,NA,NA,48.96,64.89 5,8,60/30,94.33,NA,NA,60.27,93.23,canalis,vol,NA,NA,54.44,49.61 6,9,66/33,59.35,NA,NA,34.42,37.85,canalis,vol,NA,NA,33.36,34.72 7,10,66/33,69.77,NA,NA,50.87,52.93,canalis,vol,NA,NA,45.88,46.60 8,11,66/33,76.63,NA,NA,49.64,77.43,canalis,vol,NA,NA,46.25,62.34 9,12,66/33,71.78,NA,NA,44.12,74.09,canalis,vol,NA,NA,42.13,60.61 10,13,66/33,68.57,NA,NA,51.35,73.6,canalis,vol,NA,NA,44.41,57.72 11,14,66/33,47.41,NA,NA,42.27,50.38,canalis,vol,NA,NA,36.72,40.62 12,15,66/33,74.24,NA,NA,56.42,72.84,canalis,vol,NA,NA,50.10,60.00 13,17,45/25,54.85,NA,NA,26.66,38.59,canalis,vol,NA,NA,26.00,35.74 14,18,66/33,45.31,NA,NA,31.7,49.31,canalis,vol,NA,NA,25.36,41.22 15,19,66/33,45.27,NA,NA,39.48,69.64,canalis,vol,NA,NA,31.17,37.50 16,20,66/33,57.26,NA,NA,34.36,56.75,canalis,vol,NA,NA,31.59,50.99 1,1,60/30,0.3619,0.3635,0.3526,0.3695,0.3652,pulm,v20,NA,NA,NA,NA 2,2,45/30,0.2938,0.2992,0.2953,0.29,0.2974,pulm,v20,NA,NA,NA,NA 3,6,66/33,0.252,0.2531,0.2551,0.2578,0.2564,pulm,v20,NA,NA,NA,NA 4,7,66/33,0.2395,0.2374,0.2358,0.2368,0.2438,pulm,v20,NA,NA,NA,NA 5,8,60/30,0.3023,0.3057,0.3062,0.3087,0.2961,pulm,v20,NA,NA,NA,NA 6,9,66/33,0.1574,0.158,0.1635,0.1585,0.1571,pulm,v20,NA,NA,NA,NA 7,10,66/33,0.3678,0.367,0.3669,0.3736,0.3649,pulm,v20,NA,NA,NA,NA 8,11,66/33,0.1633,0.1637,0.1626,0.167,0.1633,pulm,v20,NA,NA,NA,NA 9,12,66/33,0.3362,0.3468,0.3647,0.3792,0.3657,pulm,v20,NA,NA,NA,NA 10,13,66/33,0.379,0.3752,0.38,0.3806,0.3708,pulm,v20,NA,NA,NA,NA 11,14,66/33,0.2072,0.2114,0.2119,0.1989,0.2032,pulm,v20,NA,NA,NA,NA 12,15,66/33,0.2442,0.2441,0.2496,0.2404,0.2439,pulm,v20,NA,NA,NA,NA 13,17,45/25,0.3657,0.3766,0.3769,0.3805,0.3707,pulm,v20,NA,NA,NA,NA 14,18,66/33,0.3756,0.3735,0.3803,0.3777,0.376,pulm,v20,NA,NA,NA,NA 15,19,66/33,0.3019,0.3046,0.3085,0.3039,0.3044,pulm,v20,NA,NA,NA,NA 16,20,66/33,0.2985,0.295,0.2975,0.2965,0.2988,pulm,v20,NA,NA,NA,NA 1,1,60/30,18.62,18.72,18.18,19.01,18.78,pulm,avdose,NA,NA,NA,NA 2,2,45/30,15.19,15.38,15.23,15.08,15.35,pulm,avdose,NA,NA,NA,NA 3,6,66/33,14.51,14.6,14.63,14.9,14.7,pulm,avdose,NA,NA,NA,NA 4,7,66/33,13.06,12.96,12.92,13,13.34,pulm,avdose,NA,NA,NA,NA 5,8,60/30,13.56,13.65,13.67,13.73,13.22,pulm,avdose,NA,NA,NA,NA 6,9,66/33,9.73,9.76,10.03,9.77,9.72,pulm,avdose,NA,NA,NA,NA 7,10,66/33,18.51,18.5,18.55,19.02,18.46,pulm,avdose,NA,NA,NA,NA 8,11,66/33,8.81,8.81,8.82,8.99,8.84,pulm,avdose,NA,NA,NA,NA 9,12,66/33,19.93,20.63,21.68,22.49,21.65,pulm,avdose,NA,NA,NA,NA 10,13,66/33,20.55,20.4,20.71,20.71,20.1,pulm,avdose,NA,NA,NA,NA 11,14,66/33,10.54,10.71,10.72,10.11,10.34,pulm,avdose,NA,NA,NA,NA 12,15,66/33,14.79,14.8,15.06,14.6,14.85,pulm,avdose,NA,NA,NA,NA 13,17,45/25,18.76,19.14,19.16,19.36,18.86,pulm,avdose,NA,NA,NA,NA 14,18,66/33,21.36,21.34,21.65,21.41,21.46,pulm,avdose,NA,NA,NA,NA 15,19,66/33,16.59,16.82,17.02,16.72,16.85,pulm,avdose,NA,NA,NA,NA 16,20,66/33,17.09,16.93,17.09,17.04,17.02,pulm,avdose,NA,NA,NA,NA 1,1,60/30,0.02,0.0233,0.0243,0.0317,0.0218,cor,v50,NA,NA,NA,NA 2,2,45/30,0,0,0,0,0,cor,v50,NA,NA,NA,NA 3,6,66/33,0.0477,0.0618,0.0619,0.1188,0.0282,cor,v50,NA,NA,NA,NA 4,7,66/33,0.0041,0.0073,0.0112,0.0074,0,cor,v50,NA,NA,NA,NA 5,8,60/30,0.0016,0.0075,0.0061,0.0489,0.1467,cor,v50,NA,NA,NA,NA 6,9,66/33,0,0,0,0,0.0002,cor,v50,NA,NA,NA,NA 7,10,66/33,0.1069,0.1159,0.1057,0.245,0.1797,cor,v50,NA,NA,NA,NA 8,11,66/33,0.0344,0.03,0.0119,0.1008,0.0139,cor,v50,NA,NA,NA,NA 9,12,66/33,0.0621,0.0507,0.0311,0.1265,0.2073,cor,v50,NA,NA,NA,NA 10,13,66/33,0.1177,0.1737,0.1282,0.2105,0.0971,cor,v50,NA,NA,NA,NA 11,14,66/33,0.0076,0.0087,0.0031,0.0335,0.0237,cor,v50,NA,NA,NA,NA 12,15,66/33,0,0,0,0,0,cor,v50,NA,NA,NA,NA 13,17,45/25,0,0,0,0,0,cor,v50,NA,NA,NA,NA 14,18,66/33,0.1537,0.1622,0.1657,0.2816,0.1885,cor,v50,NA,NA,NA,NA 15,19,66/33,0.0028,0.01,0.0018,0.0128,0.0041,cor,v50,NA,NA,NA,NA 16,20,66/33,0.0508,0.0439,0.0384,0.0261,0.0663,cor,v50,NA,NA,NA,NA 1,1,60/30,9.6,9.98,10.1,11.42,10.5,cor,avdose,NA,NA,NA,NA 2,2,45/30,18.29,19.42,18.56,20.51,18.73,cor,avdose,NA,NA,NA,NA 3,6,66/33,11.3,12.65,12.48,16.59,10.08,cor,avdose,NA,NA,NA,NA 4,7,66/33,2.82,3.31,3.82,2.76,2.08,cor,avdose,NA,NA,NA,NA 5,8,60/30,3.98,4.63,4.55,8.68,15.32,cor,avdose,NA,NA,NA,NA 6,9,66/33,0.91,0.94,0.92,1.09,2.59,cor,avdose,NA,NA,NA,NA 7,10,66/33,20.55,21.12,20.68,28.72,25.21,cor,avdose,NA,NA,NA,NA 8,11,66/33,7.78,7.61,6.25,13.84,5.17,cor,avdose,NA,NA,NA,NA 9,12,66/33,19.49,18.6,17.67,24.01,29.81,cor,avdose,NA,NA,NA,NA 10,13,66/33,29.6,31.64,30.04,33.18,27.25,cor,avdose,NA,NA,NA,NA 11,14,66/33,4.32,4.21,3.48,6.8,5.89,cor,avdose,NA,NA,NA,NA 12,15,66/33,2.82,2.77,2.45,4.34,2.9,cor,avdose,NA,NA,NA,NA 13,17,45/25,20.55,20.17,20.23,21.7,21.93,cor,avdose,NA,NA,NA,NA 14,18,66/33,28.24,28.83,29.46,35.92,30.74,cor,avdose,NA,NA,NA,NA 15,19,66/33,6.99,8.25,7.2,8.55,6.88,cor,avdose,NA,NA,NA,NA 16,20,66/33,8.26,7.81,7.07,5.63,9.26,cor,avdose,NA,NA,NA,NA 1,1,60/30,34.35,NA,NA,34.17,34.19,canalis,d1cc,NA,NA,NA,NA 2,2,45/30,35.93,NA,NA,35.38,35.95,canalis,d1cc,NA,NA,NA,NA 3,6,66/33,19.81,NA,NA,19.95,19.79,canalis,d1cc,NA,NA,NA,NA 4,7,66/33,39.86,NA,NA,39.77,39.83,canalis,d1cc,NA,NA,NA,NA 5,8,60/30,24.21,NA,NA,24.67,26.12,canalis,d1cc,NA,NA,NA,NA 6,9,66/33,32.71,NA,NA,32.76,32.74,canalis,d1cc,NA,NA,NA,NA 7,10,66/33,35.8,NA,NA,36.68,37.28,canalis,d1cc,NA,NA,NA,NA 8,11,66/33,26.83,NA,NA,27.16,31.95,canalis,d1cc,NA,NA,NA,NA 9,12,66/33,35.72,NA,NA,35.27,39.12,canalis,d1cc,NA,NA,NA,NA 10,13,66/33,43.12,NA,NA,42.31,41.84,canalis,d1cc,NA,NA,NA,NA 11,14,66/33,34.57,NA,NA,34.34,34.41,canalis,d1cc,NA,NA,NA,NA 12,15,66/33,11.37,NA,NA,11.39,11.39,canalis,d1cc,NA,NA,NA,NA 13,17,45/25,34.04,NA,NA,34.09,34.01,canalis,d1cc,NA,NA,NA,NA 14,18,66/33,39.79,NA,NA,39.72,39.5,canalis,d1cc,NA,NA,NA,NA 15,19,66/33,40.77,NA,NA,40.91,51.89,canalis,d1cc,NA,NA,NA,NA 16,20,66/33,34.07,NA,NA,34.13,33.97,canalis,d1cc,NA,NA,NA,NA -------------------------------------------------------------------------------- /ABAS_Studies/ck-sd-genanalyser3.csv: -------------------------------------------------------------------------------- 1 | num,patid,frak,organ,type,lastOR,OR,Mfnew,dMFnew 1,1,60/30,pulm,vol,2687.01,2683.4,2551.3,2529.7 2,2,45/30,pulm,vol,2446.15,2446.6,2295.2,2279.8 3,6,66/33,pulm,vol,3800,3794.0,3643.2,3602.1 4,7,66/33,pulm,vol,3774.6,3770.2,3729.6,3657.1 5,8,60/30,pulm,vol,4597.85,4594.0,4634.1,4313.2 6,9,66/33,pulm,vol,1942.39,1938.7,1978.9,1884.9 7,10,66/33,pulm,vol,2516.76,2513.1,2625.2,2477.3 8,11,66/33,pulm,vol,3947.9,3943.0,3962.6,3859.0 9,12,66/33,pulm,vol,4054.19,4053.6,4245.2,3964.6 10,13,66/33,pulm,vol,5026.52,5023.2,4846.7,4771.5 11,14,66/33,pulm,vol,2041.55,2041.5,2021.1,1932.3 12,15,66/33,pulm,vol,3836.72,3829.0,3993.5,3774.3 13,17,45/25,pulm,vol,2211.08,2210.3,2224.4,2147.5 14,18,66/33,pulm,vol,3426.28,3421.9,3336.0,3284.2 15,19,66/33,pulm,vol,3541.83,3534.8,3599.7,3464.5 16,20,66/33,pulm,vol,2548.13,2546.9,2420.9,2385.2 1,1,60/30,cor,vol,521.21,521.5,481.3,452.5 2,2,45/30,cor,vol,531.87,530.9,628.2,518.1 3,6,66/33,cor,vol,683.09,684.4,646.4,618.8 4,7,66/33,cor,vol,596.87,597.8,593.7,544.1 5,8,60/30,cor,vol,846.19,846.6,743.8,531.6 6,9,66/33,cor,vol,691.6,693.1,628.0,508.6 7,10,66/33,cor,vol,700.7,701.4,685.0,613.8 8,11,66/33,cor,vol,649.11,649.8,636.3,582.8 9,12,66/33,cor,vol,1501.49,1502.4,1224.1,1071.8 10,13,66/33,cor,vol,597.04,598.0,674.9,564.3 11,14,66/33,cor,vol,551.19,552.6,646.7,535.9 12,15,66/33,cor,vol,1418.63,1420.3,1213.7,1121.1 13,17,45/25,cor,vol,609.81,610.5,778.6,594.6 14,18,66/33,cor,vol,408.51,409.1,429.7,379.3 15,19,66/33,cor,vol,635.46,636.1,652.5,608.3 16,20,66/33,cor,vol,656.01,656.5,729.7,644.5 1,1,60/30,canalis,vol,59.3,59.9,38.4,37.0 2,2,45/30,canalis,vol,76.01,76.5,49.8,48.7 3,6,66/33,canalis,vol,76.22,76.4,51.8,50.5 4,7,66/33,canalis,vol,77,77.2,81.6,69.6 5,8,60/30,canalis,vol,94.33,95.2,45.2,42.9 6,9,66/33,canalis,vol,59.35,60.0,33.7,32.2 7,10,66/33,canalis,vol,69.77,70.2,53.4,48.3 8,11,66/33,canalis,vol,76.63,77.8,58.2,54.3 9,12,66/33,canalis,vol,71.78,69.7,68.9,55.5 10,13,66/33,canalis,vol,68.57,68.9,57.8,52.8 11,14,66/33,canalis,vol,47.41,47.4,43.1,37.8 12,15,66/33,canalis,vol,74.24,75.0,62.3,58.6 13,17,45/25,canalis,vol,54.85,55.1,38.1,36.2 14,18,66/33,canalis,vol,45.31,45.5,43.6,38.2 15,19,66/33,canalis,vol,45.27,45.3,41.3,37.4 16,20,66/33,canalis,vol,57.26,58.2,50.1,45.6 1,1,60/30,pulm,v20,0.3619,0.3627,0.3657,NA 2,2,45/30,pulm,v20,0.2938,0.2938,0.2970,NA 3,6,66/33,pulm,v20,0.252,0.2521,0.2550,NA 4,7,66/33,pulm,v20,0.2395,0.2397,0.2414,NA 5,8,60/30,pulm,v20,0.3023,0.3017,0.2958,NA 6,9,66/33,pulm,v20,0.1574,0.1573,0.1550,NA 7,10,66/33,pulm,v20,0.3678,0.3670,0.3656,NA 8,11,66/33,pulm,v20,0.1633,0.1636,0.1636,NA 9,12,66/33,pulm,v20,0.3362,0.3364,0.3481,NA 10,13,66/33,pulm,v20,0.379,0.3790,0.3707,NA 11,14,66/33,pulm,v20,0.2072,0.2069,0.2058,NA 12,15,66/33,pulm,v20,0.2442,0.2440,0.2405,NA 13,17,45/25,pulm,v20,0.3657,0.3660,0.3693,NA 14,18,66/33,pulm,v20,0.3756,0.3758,0.3745,NA 15,19,66/33,pulm,v20,0.3019,0.3018,0.2995,NA 16,20,66/33,pulm,v20,0.2985,0.2983,0.2967,NA 1,1,60/30,pulm,avdose,18.62,18.65,18.81,NA 2,2,45/30,pulm,avdose,15.19,15.18,15.33,NA 3,6,66/33,pulm,avdose,14.51,14.49,14.59,NA 4,7,66/33,pulm,avdose,13.06,13.07,13.17,NA 5,8,60/30,pulm,avdose,13.56,13.55,13.22,NA 6,9,66/33,pulm,avdose,9.73,9.74,9.60,NA 7,10,66/33,pulm,avdose,18.51,18.50,18.51,NA 8,11,66/33,pulm,avdose,8.81,8.81,8.85,NA 9,12,66/33,pulm,avdose,19.93,19.93,20.47,NA 10,13,66/33,pulm,avdose,20.55,20.54,20.07,NA 11,14,66/33,pulm,avdose,10.54,10.54,10.46,NA 12,15,66/33,pulm,avdose,14.79,14.77,14.60,NA 13,17,45/25,pulm,avdose,18.76,18.75,18.86,NA 14,18,66/33,pulm,avdose,21.36,21.35,21.34,NA 15,19,66/33,pulm,avdose,16.59,16.58,16.50,NA 16,20,66/33,pulm,avdose,17.09,17.08,16.89,NA 1,1,60/30,cor,v50,0.02,0.0198,0.0244,NA 2,2,45/30,cor,v50,0,0.0000,0.0000,NA 3,6,66/33,cor,v50,0.0477,0.0471,0.0270,NA 4,7,66/33,cor,v50,0.0041,0.0041,0.0000,NA 5,8,60/30,cor,v50,0.0016,0.0017,0.1466,NA 6,9,66/33,cor,v50,0,0.0000,0.0000,NA 7,10,66/33,cor,v50,0.1069,0.1073,0.1706,NA 8,11,66/33,cor,v50,0.0344,0.0343,0.0120,NA 9,12,66/33,cor,v50,0.0621,0.0621,0.1189,NA 10,13,66/33,cor,v50,0.1177,0.1176,0.0977,NA 11,14,66/33,cor,v50,0.0076,0.0081,0.0234,NA 12,15,66/33,cor,v50,0,0.0000,0.0000,NA 13,17,45/25,cor,v50,0,0.0000,0.0000,NA 14,18,66/33,cor,v50,0.1537,0.1535,0.1883,NA 15,19,66/33,cor,v50,0.0028,0.0031,0.0042,NA 16,20,66/33,cor,v50,0.0508,0.0508,0.0622,NA 1,1,60/30,cor,avdose,9.6,9.60,11.25,NA 2,2,45/30,cor,avdose,18.29,18.26,18.85,NA 3,6,66/33,cor,avdose,11.3,11.28,9.99,NA 4,7,66/33,cor,avdose,2.82,2.82,2.20,NA 5,8,60/30,cor,avdose,3.98,3.97,15.29,NA 6,9,66/33,cor,avdose,0.91,0.91,2.40,NA 7,10,66/33,cor,avdose,20.55,20.54,24.78,NA 8,11,66/33,cor,avdose,7.78,7.78,4.87,NA 9,12,66/33,cor,avdose,19.49,19.49,24.94,NA 10,13,66/33,cor,avdose,29.6,29.60,27.26,NA 11,14,66/33,cor,avdose,4.32,4.32,5.73,NA 12,15,66/33,cor,avdose,2.82,2.82,3.21,NA 13,17,45/25,cor,avdose,20.55,20.55,20.82,NA 14,18,66/33,cor,avdose,28.24,28.22,30.73,NA 15,19,66/33,cor,avdose,6.99,6.99,6.87,NA 16,20,66/33,cor,avdose,8.26,8.25,8.71,NA 1,1,60/30,canalis,d1cc,34.35,34.11,33.63,NA 2,2,45/30,canalis,d1cc,35.93,34.95,32.01,NA 3,6,66/33,canalis,d1cc,19.81,19.64,19.17,NA 4,7,66/33,canalis,d1cc,39.86,39.46,38.51,NA 5,8,60/30,canalis,d1cc,24.21,24.12,23.19,NA 6,9,66/33,canalis,d1cc,32.71,32.58,32.46,NA 7,10,66/33,canalis,d1cc,35.8,34.78,34.55,NA 8,11,66/33,canalis,d1cc,26.83,26.46,25.77,NA 9,12,66/33,canalis,d1cc,35.72,34.80,35.11,NA 10,13,66/33,canalis,d1cc,43.12,42.84,41.34,NA 11,14,66/33,canalis,d1cc,34.57,33.93,33.74,NA 12,15,66/33,canalis,d1cc,11.37,11.31,11.32,NA 13,17,45/25,canalis,d1cc,34.04,33.92,33.86,NA 14,18,66/33,canalis,d1cc,39.79,39.09,39.04,NA 15,19,66/33,canalis,d1cc,40.77,39.73,38.81,NA 16,20,66/33,canalis,d1cc,34.07,33.42,32.75,NA -------------------------------------------------------------------------------- /ABAS_Studies/lw-notes-old.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/lw-notes-old.pptx -------------------------------------------------------------------------------- /ABAS_Studies/rs_abas_test.R: -------------------------------------------------------------------------------- 1 | library(reshape2) 2 | library(ggplot2) 3 | library(dplyr) 4 | #this needs to be edited to set the folder that contains the files 5 | setwd("/Users/lenw/Documents/Python_Programming/repo_Raystation_Scripting/ABAS_Studies") 6 | list.files(pattern = "\\.csv$") 7 | 8 | #read csv file of raw values 9 | rawdata <- read.csv("ck-sd-genanalyser2.csv", header=T) 10 | rawdataNew <- read.csv("ck-sd-genanalyser3.csv", header=T) 11 | 12 | #parse the volume subset 13 | volumes <- filter(rawdata, type=="vol") 14 | volumesNew <- filter(rawdataNew,type == "vol") 15 | 16 | volumesDistribution <- data.frame( 17 | patid = volumes$patid, 18 | organ = volumes$organ, 19 | ref = volumes$OR, 20 | ck = volumes$CK, 21 | sd = volumes$SD, 22 | rs = volumes$RS, 23 | mf = volumes$MF, 24 | mf2 = volumesNew$Mfnew, 25 | CKvsOR = volumes$CK - volumes$OR, 26 | SDvsOR = volumes$SD - volumes$OR, 27 | RSvsOR = volumes$RS - volumes$OR, 28 | MFvsOR = volumes$MF - volumes$OR, 29 | MF2vsOR = volumesNew$Mfnew - volumes$OR, 30 | Rel.CK = volumes$dCK / volumes$CK, 31 | Dice.CK = (2*volumes$dCK)/(volumes$OR + volumes$CK), 32 | Rel.SD = volumes$dSD / volumes$SD, 33 | Dice.SD = (2*volumes$dSD)/(volumes$OR + volumes$SD), 34 | Rel.RS = volumes$dRS / volumes$RS, 35 | Dice.RS = (2*volumes$dRS)/(volumes$OR + volumes$RS), 36 | Rel.MF = volumes$dMF / volumes$MF, 37 | Dice.MF = (2*volumes$dMF)/(volumes$OR + volumes$MF), 38 | Rel.MF2 = volumesNew$dMFnew / volumesNew$Mfnew, 39 | Dice.MF2 = (2*volumesNew$dMFnew)/(volumes$OR + volumesNew$Mfnew) 40 | ) 41 | mVolumesDistribution <- melt(volumesDistribution,id=c("patid","organ")) 42 | names(mVolumesDistribution) <- c("patid","organ","Category","VolDiff") 43 | mVolumesDistribution <- mVolumesDistribution[complete.cases(mVolumesDistribution),] 44 | 45 | #parse the dosimetry subset 46 | dose <- filter(rawdata, type!="vol") 47 | doseNew <- filter(rawdataNew, type!="vol") 48 | doseDistribution <- data.frame( 49 | patid = dose$patid, 50 | organ = dose$organ, 51 | type = dose$type, 52 | ref = dose$OR, 53 | ck = dose$CK, 54 | sd = dose$SD, 55 | rs = dose$RS, 56 | mf = dose$MF, 57 | mf2 = doseNew$Mfnew, 58 | CKvsOR = as.numeric(as.character(dose$CK))-as.numeric(as.character(dose$OR)), 59 | SDvsOR = as.numeric(as.character(dose$SD))-as.numeric(as.character(dose$OR)), 60 | RSvsOR = as.numeric(as.character(dose$RS))-as.numeric(as.character(dose$OR)), 61 | MFvsOR = as.numeric(as.character(dose$MF))-as.numeric(as.character(dose$OR)), 62 | MF2vsOR = as.numeric(as.character(doseNew$Mfnew))-as.numeric(as.character(doseNew$OR)) 63 | ) 64 | mDoseDistribution <- melt(doseDistribution,id=c("patid","organ","type")) 65 | names(mDoseDistribution) <- c("patid","organ","type","Category","DoseDiff") 66 | mDoseDistribution <- mDoseDistribution[complete.cases(mDoseDistribution),] 67 | 68 | #clean up 69 | rm(dose,volumes,rawdata,doseNew,volumesNew,rawdataNew) 70 | rm(doseDistribution,volumesDistribution) 71 | 72 | #colour palette definition 73 | paldef0 <- c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3") 74 | paldef <- c("#E41A1C", "#377EB8", "black", "#4DAF4A", "#984EA3") 75 | paldef2 <- c("#E41A1C", "#377EB8", "grey80", "#4DAF4A", "#984EA3") 76 | paldef3 <- c("black", "#4DAF4A", "#984EA3") 77 | 78 | ppi <- 600 79 | # Calculate the height and width (in pixels) for a 4x4-inch image at 600 ppi 80 | png("ABAS-Lung-in_Raystation-%d.png", width=6*ppi, height=4*ppi, res=ppi) 81 | 82 | #absolute lung volume correlation plot 83 | y <- filter(mVolumesDistribution, organ=="pulm" & Category %in% c("ck","sd","rs","mf","mf2")) 84 | x <- filter(mVolumesDistribution, organ=="pulm" & Category %in% c("ref")) 85 | all <- cbind(y,Baseline=x$VolDiff) 86 | 87 | ggplot(all,aes( 88 | x=Baseline, 89 | y=VolDiff, 90 | shape=Category, colour=Category)) + 91 | geom_point(size=3) + 92 | scale_shape_manual(values=c(15,16,0,17,18)) + 93 | xlim(1900,5500) + ylim(1900,5500) + 94 | geom_abline(intercept = 0, slope = 1, linetype="dashed") + 95 | labs(x = "Reference Lung Volume (in cc)", y = "Drawn Lung Volume (in cc)") + 96 | theme_bw() + 97 | scale_colour_manual(values = paldef) 98 | 99 | #summarise the median and distribution of the absolute volume differences 100 | y <- filter(mVolumesDistribution, organ=="pulm" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 101 | aggregate(y$VolDiff, by=list(y$Category), FUN=summary) 102 | 103 | #summary information graphically 104 | ggplot(filter(mVolumesDistribution, organ=="pulm" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR") ), 105 | aes(x=Category, y=VolDiff)) + 106 | ylim(-200,800) + 107 | geom_boxplot(aes(fill=Category)) + 108 | theme_bw() + 109 | labs(x = "Contouring comparison", y = "Lung volume difference (in ccm)") + 110 | scale_fill_manual(values = paldef2, guide=FALSE) 111 | 112 | #correlations in lung doses differences 113 | y <- filter(mDoseDistribution, type=="v20" & organ=="pulm" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 114 | x <- filter(mDoseDistribution, type=="avdose" & organ=="pulm" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 115 | all <- cbind(y,MLD=x$DoseDiff) 116 | 117 | ggplot(all,aes( 118 | y=MLD, 119 | x=100*DoseDiff, 120 | shape=Category, colour=Category)) + 121 | geom_point(size=3) + 122 | scale_shape_manual(values=c(15,16,0,17,18)) + 123 | geom_abline(intercept = 0, slope = 0.5, linetype="dashed") + 124 | labs(y = "Change in MLD (Gy)", x = "Change in Lung V20Gy (pct difference)") + 125 | theme_bw() + 126 | scale_colour_manual(values = paldef) 127 | 128 | #summarise the median and distribution of the V20 volume differences 129 | y <- filter(mDoseDistribution, organ=="pulm" & type=="v20" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 130 | aggregate(100*y$DoseDiff, by=list(y$Category), FUN=summary) 131 | 132 | #summarise the median and distribution of the mean lung dose differences 133 | y <- filter(mDoseDistribution, organ=="pulm" & type=="avdose" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 134 | aggregate(y$DoseDiff, by=list(y$Category), FUN=summary) 135 | 136 | #dice similarity comparison 137 | ggplot(filter(mVolumesDistribution, organ=="pulm" & Category %in% c("Dice.CK","Dice.SD","Dice.RS","Dice.MF","Dice.MF2") ), 138 | aes(x=Category, y=VolDiff)) + 139 | geom_boxplot(aes(fill=Category)) + 140 | theme_bw() + 141 | labs(x = "Contouring comparison", y = "Dice Similarity in Lung (a.u.)") + 142 | scale_fill_manual(values = paldef2, guide=FALSE) 143 | y <- filter(mVolumesDistribution, organ=="pulm" & Category %in% c("Dice.CK","Dice.SD","Dice.RS","Dice.MF","Dice.MF2")) 144 | aggregate(y$VolDiff, by=list(y$Category), FUN=summary) 145 | 146 | dev.off() 147 | 148 | 149 | ppi <- 600 150 | # Calculate the height and width (in pixels) for a 4x4-inch image at 600 ppi 151 | png("ABAS-Heart-in_Raystation-%d.png", width=6*ppi, height=4*ppi, res=ppi) 152 | 153 | #absolute heart volume correlation plot 154 | y <- filter(mVolumesDistribution, organ=="cor" & Category %in% c("ck","sd","rs","mf","mf2")) 155 | x <- filter(mVolumesDistribution, organ=="cor" & Category %in% c("ref")) 156 | all <- cbind(y,Baseline=x$VolDiff) 157 | 158 | ggplot(all,aes( 159 | x=Baseline, 160 | y=VolDiff, 161 | shape=Category, colour=Category)) + 162 | geom_point(size=3) + 163 | xlim(400,1600) + ylim(400,1600) + 164 | scale_shape_manual(values=c(15,16,0,17,18)) + 165 | geom_abline(intercept = 0, slope = 1, linetype="dashed") + 166 | labs(x = "Reference Heart Volume (in cc)", y = "Drawn Heart Volume (in cc)") + 167 | theme_bw() + 168 | scale_colour_manual(values = paldef) 169 | 170 | #summarise the median and distribution of the absolute volume differences 171 | y <- filter(mVolumesDistribution, organ=="cor" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 172 | aggregate(y$VolDiff, by=list(y$Category), FUN=summary) 173 | 174 | #summary information graphically 175 | ggplot(filter(mVolumesDistribution, organ=="cor" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR") ), 176 | aes(x=Category, y=VolDiff)) + 177 | ylim(-300,200) + 178 | geom_boxplot(aes(fill=Category)) + 179 | theme_bw() + 180 | labs(x = "Contouring comparison", y = "Heart volume difference (in ccm)") + 181 | scale_fill_manual(values = paldef2, guide=FALSE) 182 | 183 | #correlations in heart doses differences 184 | y <- filter(mDoseDistribution, type=="v50" & organ=="cor" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 185 | x <- filter(mDoseDistribution, type=="avdose" & organ=="cor" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 186 | all <- cbind(y,MHD=x$DoseDiff) 187 | 188 | ggplot(all,aes( 189 | y=MHD, 190 | x=100*DoseDiff, 191 | shape=Category, colour=Category)) + 192 | geom_point(size=3) + 193 | scale_shape_manual(values=c(15,16,0,17,18)) + 194 | geom_abline(intercept = 0, slope = 0.8, linetype="dashed") + 195 | labs(y = "Change in MHD (Gy)", x = "Change in Heart V50Gy (pct difference)") + 196 | theme_bw() + 197 | scale_colour_manual(values = paldef) 198 | 199 | #summarise the median and distribution of the V50 volume differences 200 | y <- filter(mDoseDistribution, organ=="cor" & type=="v50" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 201 | aggregate(100*y$DoseDiff, by=list(y$Category), FUN=summary) 202 | 203 | #summarise the median and distribution of the mean heart dose differences 204 | y <- filter(mDoseDistribution, organ=="cor" & type=="avdose" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 205 | aggregate(y$DoseDiff, by=list(y$Category), FUN=summary) 206 | 207 | #dice similarity comparison 208 | ggplot(filter(mVolumesDistribution, organ=="cor" & Category %in% c("Dice.CK","Dice.SD","Dice.RS","Dice.MF","Dice.MF2") ), 209 | aes(x=Category, y=VolDiff)) + 210 | geom_boxplot(aes(fill=Category)) + 211 | theme_bw() + 212 | labs(x = "Contouring comparison", y = "Dice Similarity in Heart (a.u.)") + 213 | scale_fill_manual(values = paldef2, guide=FALSE) 214 | y <- filter(mVolumesDistribution, organ=="cor" & Category %in% c("Dice.CK","Dice.SD","Dice.RS","Dice.MF","Dice.MF2")) 215 | aggregate(y$VolDiff, by=list(y$Category), FUN=summary) 216 | 217 | dev.off() 218 | 219 | 220 | ppi <- 600 221 | # Calculate the height and width (in pixels) for a 4x4-inch image at 600 ppi 222 | png("ABAS-SpinalCord-in_Raystation-%d.png", width=6*ppi, height=4*ppi, res=ppi) 223 | 224 | #absolute spinal cord volume correlation plot 225 | # 226 | #note that here - it is not the volume agreement that matters but 227 | #rather the dice similarity and overlap volume 228 | # 229 | #summarise the median and distribution of the absolute volume differences 230 | y <- filter(mVolumesDistribution, organ=="canalis" & Category %in% c("RSvsOR","MFvsOR","MF2vsOR")) 231 | aggregate(y$VolDiff, by=list(y$Category), FUN=summary) 232 | 233 | #summary information graphically 234 | ggplot(filter(mVolumesDistribution, organ=="canalis" & Category %in% c("RSvsOR","MFvsOR","MF2vsOR") ), 235 | aes(x=Category, y=VolDiff)) + 236 | ylim(-50,50) + 237 | geom_boxplot(aes(fill=Category)) + 238 | theme_bw() + 239 | labs(x = "Contouring comparison", y = "Spinal cord volume difference (in ccm)") + 240 | scale_fill_manual(values = c("grey80", "#4DAF4A", "#984EA3"), guide=FALSE) 241 | 242 | 243 | #similarity and overlap 244 | y <- filter(mVolumesDistribution, organ=="canalis" & Category %in% c("Rel.CK","Rel.SD","Rel.RS","Rel.MF","Rel.MF2")) 245 | x <- filter(mVolumesDistribution, organ=="canalis" & Category %in% c("Dice.CK","Dice.SD","Dice.RS","Dice.MF","Dice.MF2")) 246 | all <- cbind(y,Dice=x$VolDiff) 247 | 248 | ggplot(all,aes( 249 | y=VolDiff, 250 | x=Dice, 251 | shape=Category, colour=Category)) + 252 | geom_point(size=3) + 253 | scale_shape_manual(values=c(0,17,18)) + 254 | xlim(0.5,1) + ylim(0.5,1) + 255 | geom_abline(intercept = 0, slope = 1, linetype="dashed") + 256 | labs(y = "Volume overlap fraction", x = "Dice Similarity in spinal cord") + 257 | theme_bw() + 258 | scale_colour_manual(values = c("black", "#4DAF4A", "#984EA3")) 259 | 260 | #summarise the median and distribution of the high dose differences (d1cc) 261 | y <- filter(mDoseDistribution, organ=="canalis" & type=="d1cc" & Category %in% c("CKvsOR","SDvsOR","RSvsOR","MFvsOR","MF2vsOR")) 262 | aggregate(y$DoseDiff, by=list(y$Category), FUN=summary) 263 | 264 | #summary information graphically 265 | ggplot(filter(mDoseDistribution, organ=="canalis" & Category %in% c("RSvsOR","MFvsOR","MF2vsOR") ), 266 | aes(x=Category, y=DoseDiff)) + 267 | ylim(-5,12) + 268 | geom_boxplot(aes(fill=Category)) + 269 | theme_bw() + 270 | labs(x = "Contouring comparison", y = "Change in D1cc High Dose (Gy)") + 271 | scale_fill_manual(values = c("grey80", "#4DAF4A", "#984EA3"), guide=FALSE) 272 | 273 | 274 | dev.off() 275 | 276 | 277 | 278 | 279 | 280 | 281 | #paired non-parametric test (Wilcoxon) 282 | 283 | #are volumes of lung different? 284 | temp <- filter(rawdata, type=="vol" & organ=="pulm")[4:8] 285 | OR <- as.numeric(as.character(temp$OR)) 286 | CK <- as.numeric(as.character(temp$CK)) 287 | SD <- as.numeric(as.character(temp$SD)) 288 | RS <- as.numeric(as.character(temp$RS)) 289 | MF <- as.numeric(as.character(temp$MF)) 290 | 291 | wilcox.test(CK, OR, paired=TRUE, conf.int=TRUE) 292 | #pseudomedian = -12 ccm, CI = -54.6 to 36.5, p = 0.53 293 | 294 | wilcox.test(SD, OR, paired=TRUE, conf.int=TRUE) 295 | #pseudomedian = 27 ccm, CI = -32 to 83, p = 0.35 296 | 297 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 298 | # *** pseudomedian = 318 ccm, CI = 221 to 418, p < 0.01 299 | 300 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 301 | #pseudomedian = -23 ccm, CI = -78 to 41, p = 0.53 302 | 303 | #are V20 levels in lung different? 304 | temp <- filter(rawdata, type=="v20" & organ=="pulm")[4:8] 305 | OR <- as.numeric(as.character(temp$OR)) 306 | CK <- as.numeric(as.character(temp$CK)) 307 | SD <- as.numeric(as.character(temp$SD)) 308 | RS <- as.numeric(as.character(temp$RS)) 309 | MF <- as.numeric(as.character(temp$MF)) 310 | 311 | wilcox.test(CK, OR, paired=TRUE, conf.int=TRUE) 312 | #pseudomedian = 0.12%, CI = 0 to 0.42, p = 0.2 313 | 314 | wilcox.test(SD, OR, paired=TRUE, conf.int=TRUE) 315 | # ** pseudomedian = 0.29%, CI = 0 to 0.60, p < 0.05 316 | 317 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 318 | #pseudomedian = 0.24%, CI = 0 to 0.67, p = 0.16 319 | 320 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 321 | #pseudomedian = 0.11%, CI = -0.19 to 0.39%, p = 0.42 322 | 323 | #are MLD levels in lung different? 324 | temp <- filter(rawdata, type=="avdose" & organ=="pulm")[4:8] 325 | OR <- as.numeric(as.character(temp$OR)) 326 | CK <- as.numeric(as.character(temp$CK)) 327 | SD <- as.numeric(as.character(temp$SD)) 328 | RS <- as.numeric(as.character(temp$RS)) 329 | MF <- as.numeric(as.character(temp$MF)) 330 | 331 | wilcox.test(CK, OR, paired=TRUE, conf.int=TRUE) 332 | #pseudomedian = 8.4 cGy, CI = -2 to 20, p = 0.11 333 | 334 | wilcox.test(SD, OR, paired=TRUE, conf.int=TRUE) 335 | # ** pseudomedian = 17 cGy, CI = 2.5 to 30, p < 0.05 336 | 337 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 338 | #pseudomedian = 16 cGy, CI = -1 to 36, p = 0.09 339 | 340 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 341 | #pseudomedian = 6.3 cGy, CI = -8.5 to 18, p = 0.34 342 | 343 | 344 | #are volumes of heart different? 345 | temp <- filter(rawdata, type=="vol" & organ=="cor")[4:8] 346 | OR <- as.numeric(as.character(temp$OR)) 347 | CK <- as.numeric(as.character(temp$CK)) 348 | SD <- as.numeric(as.character(temp$SD)) 349 | RS <- as.numeric(as.character(temp$RS)) 350 | MF <- as.numeric(as.character(temp$MF)) 351 | 352 | wilcox.test(CK, OR, paired=TRUE, conf.int=TRUE) 353 | #pseudomedian = -3.4 ccm, CI = -23 to 13, p = 0.78 354 | 355 | wilcox.test(SD, OR, paired=TRUE, conf.int=TRUE) 356 | #pseudomedian = -10 ccm, CI = -37 to 4, p = 0.13 357 | 358 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 359 | # ** pseudomedian = 60 ccm, CI = 4.5 to 95, p < 0.05 360 | 361 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 362 | #pseudomedian = 0.9 ccm, CI = -45 to 47, p = 0.98 363 | 364 | #are V50 levels in heart different? 365 | temp <- filter(rawdata, type=="v50" & organ=="cor")[4:8] 366 | OR <- as.numeric(as.character(temp$OR)) 367 | CK <- as.numeric(as.character(temp$CK)) 368 | SD <- as.numeric(as.character(temp$SD)) 369 | RS <- as.numeric(as.character(temp$RS)) 370 | MF <- as.numeric(as.character(temp$MF)) 371 | 372 | wilcox.test(CK, OR, paired=TRUE, conf.int=TRUE) 373 | 374 | wilcox.test(SD, OR, paired=TRUE, conf.int=TRUE) 375 | 376 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 377 | 378 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 379 | 380 | #are MHD levels in heart different? 381 | temp <- filter(rawdata, type=="avdose" & organ=="cor")[4:8] 382 | OR <- as.numeric(as.character(temp$OR)) 383 | CK <- as.numeric(as.character(temp$CK)) 384 | SD <- as.numeric(as.character(temp$SD)) 385 | RS <- as.numeric(as.character(temp$RS)) 386 | MF <- as.numeric(as.character(temp$MF)) 387 | 388 | wilcox.test(CK, OR, paired=TRUE, conf.int=TRUE) 389 | 390 | wilcox.test(SD, OR, paired=TRUE, conf.int=TRUE) 391 | 392 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 393 | 394 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 395 | 396 | 397 | #are volumes of spinal cord different? 398 | temp <- filter(rawdata, type=="vol" & organ=="canalis")[4:8] 399 | OR <- as.numeric(as.character(temp$OR)) 400 | RS <- as.numeric(as.character(temp$RS)) 401 | MF <- as.numeric(as.character(temp$MF)) 402 | 403 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 404 | 405 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 406 | 407 | #are hot spots on spinal cord different? 408 | temp <- filter(rawdata, type=="d1cc" & organ=="canalis")[4:8] 409 | OR <- as.numeric(as.character(temp$OR)) 410 | RS <- as.numeric(as.character(temp$RS)) 411 | MF <- as.numeric(as.character(temp$MF)) 412 | 413 | wilcox.test(RS, OR, paired=TRUE, conf.int=TRUE) 414 | 415 | wilcox.test(MF, OR, paired=TRUE, conf.int=TRUE) 416 | -------------------------------------------------------------------------------- /ABAS_Studies/spine-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/spine-1 -------------------------------------------------------------------------------- /ABAS_Studies/spine-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/spine-2.png -------------------------------------------------------------------------------- /ABAS_Studies/spine-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/spine-3.png -------------------------------------------------------------------------------- /ABAS_Studies/spine-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/ABAS_Studies/spine-4.png -------------------------------------------------------------------------------- /NEW-pareto-example-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/NEW-pareto-example-1.png -------------------------------------------------------------------------------- /NEW-pareto-example-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/NEW-pareto-example-2.png -------------------------------------------------------------------------------- /Old_Prostate_Scripting/PROS_AlleTyper_Forplan.py: -------------------------------------------------------------------------------- 1 | import math 2 | from connect import * 3 | import time 4 | import sys 5 | clr.AddReference("PresentationFramework") 6 | from System.Windows import * 7 | 8 | # DEFINE THE CT DENSITY TABLE NAME 9 | densityConversionTable = 'HR_OEB HUsetting' 10 | 11 | # DEFINE AN EXTERNAL CONTOUR THRESHOLD LEVEL FOR AUTOSEGMENTATION 12 | externalContourThreshold = -150 13 | 14 | # DEFINE A MANDATORY SET OF INITAL STRUCTURES 15 | # ------ PLAN NEEDS TO HAVE THESE STRUCTURES DEFINED BEFORE EXECUTING THE SCRIPT 16 | ctvT = 'CTV-T' 17 | ctvSV = 'CTV-SV' #required in Type B and C plans 18 | ctvE = 'CTV-E' #required in Type N plans 19 | analCanal = 'OR; Anal Canal' 20 | penileBulb = 'OR; Bulbus penis' 21 | rectum = 'OR; Rectum' 22 | bowel = 'OR; Tarm' #only exists for N+ disease 23 | testes = 'OR; Testes' 24 | fiducial1 = 'Stift1' #does not exist for salvage cases 25 | fiducial2 = 'Stift2' #does not exist for salvage cases 26 | fiducial3 = 'Stift3' #does not exist for salvage cases 27 | fiducial4 = 'Stift4' #may or may not exist for any prostate plan 28 | fiducial5 = 'Stift5' #may or may not exist for any prostate plan 29 | fiducial6 = 'Stift6' #may or may not exist for any prostate plan 30 | 31 | # DEFINE A STANDARD SET OF ANATOMICAL STRUCTURE NAMES 32 | external = 'External' 33 | femHeadLeft = 'OR; Cap fem dex' 34 | femHeadRight = 'OR; Cap fem sin' 35 | bladder = 'OR; Blaere' 36 | ptvT = 'PTV-T' 37 | ptvSV = 'PTV-SV' 38 | ptvTSV = 'PTV-TSV' 39 | ptvE = 'PTV-E' 40 | hvRect = 'HV-Rectum' 41 | marker1 = 'Mark_1' 42 | marker2 = 'Mark_2' 43 | marker3 = 'Mark_3' 44 | marker4 = 'Mark_4' 45 | marker5 = 'Mark_5' 46 | marker6 = 'Mark_6' 47 | 48 | # DEFINE A STANDARD SET OF STRUCTURE COLOURS 49 | #---- see for example colour charts at http://www.rapidtables.com/web/color/RGB_Color.htm 50 | colourBladder = "0,153,0" 51 | colourRectum = "0,102,0" 52 | colourBowel = "0,204,0" 53 | colourCaputFemori = "0,51,0" 54 | colourPtvT = "178,102,255" 55 | colourPtvSV = "204,153,255" 56 | colourPtvTSV = "153,51,255" 57 | colourPtvE = "229,204,255" 58 | colourMarker1 = "0,51,25" 59 | colourMarker2 = "255,128,0" 60 | colourMarker3 = "255,153,255" 61 | colourMarker4 = "204,255,153" 62 | colourMarker5 = "0,102,102" 63 | colourMarker6 = "102,0,102" 64 | 65 | 66 | def CreateWallHvRectum(): 67 | # 7) rectal help volume 68 | with CompositeAction('ROI Algebra (HV-Rectum)'): 69 | #HV-Rectum 70 | try: 71 | r7 = patient.PatientModel.CreateRoi(Name=hvRect, Color="Red", Type="Organ", TissueName=None, RoiMaterial=None) 72 | r7.SetAlgebraExpression( 73 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [rectum], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 1.0, 'Posterior': 1.0, 'Right': 1.0, 'Left': 1.0 } }, 74 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [rectum], 'MarginSettings': { 'Type': "Contract", 'Superior': 0, 'Inferior': 0, 'Anterior': 1.0, 'Posterior': 1.0, 'Right': 1.0, 'Left': 1.0 } }, 75 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 76 | r7.UpdateDerivedGeometry(Examination=examination) 77 | except Exception: 78 | print 'Failed to generate HV-Rectum. Continues...' 79 | #procedure CreateWallHvRectum ends 80 | 81 | def OverrideFiducialsDensity(): 82 | # 19) creation of density over-rides in concentric rings around a fiducial 83 | # --- IMPORTANT : CREATE NEW MATERIAL BASED ON ATOMIC COMPOSITIONS OF STANDARD MUSCLE -> copy as SoftTissue with density override 1.060 g/ccm 84 | #standard muscle is "db.TemplateMaterials[0].Materials[14]" 85 | patient.PatientModel.CreateMaterial(BaseOnMaterial=db.TemplateMaterials[0].Materials[14], Name = "SoftTissue", MassDensityOverride = 1.060) 86 | #fiducial number 1 87 | with CompositeAction('ROI Algebra (Stift1)'): 88 | try: 89 | r19 = patient.PatientModel.CreateRoi(Name=marker1, Color=colourMarker1, Type="Marker", TissueName=None, RoiMaterial=None) 90 | r19.SetAlgebraExpression( 91 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [fiducial1], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.8, 'Posterior': 0.8, 'Right': 0.8, 'Left': 0.8 } }, 92 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [fiducial1], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.1, 'Inferior': 0.1, 'Anterior': 0.1, 'Posterior': 0.1, 'Right': 0.1, 'Left': 0.1 } }, 93 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 94 | r19.SetRoiMaterial(Material = patient.PatientModel.Materials[0]) 95 | r19.UpdateDerivedGeometry(Examination=examination) 96 | except Exception: 97 | print 'Failed to generate Marker_1 override ROI. Continues...' 98 | #end of composite action 99 | try: 100 | patient.PatientModel.RegionsOfInterest[fiducial1].DeleteRoi() 101 | except Exception: 102 | print 'Could not delete fiducial1 ROI. Continues...' 103 | #fiducial number 2 104 | with CompositeAction('ROI Algebra (Stift2)'): 105 | try: 106 | r19 = patient.PatientModel.CreateRoi(Name=marker2, Color=colourMarker2, Type="Marker", TissueName=None, RoiMaterial=None) 107 | r19.SetAlgebraExpression( 108 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [fiducial2], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.8, 'Posterior': 0.8, 'Right': 0.8, 'Left': 0.8 } }, 109 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [fiducial2], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.1, 'Inferior': 0.1, 'Anterior': 0.1, 'Posterior': 0.1, 'Right': 0.1, 'Left': 0.1 } }, 110 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 111 | r19.SetRoiMaterial(Material = patient.PatientModel.Materials[0]) 112 | r19.UpdateDerivedGeometry(Examination=examination) 113 | except Exception: 114 | print 'Failed to generate Marker_2 override ROI. Continues...' 115 | #end of composite action 116 | try: 117 | patient.PatientModel.RegionsOfInterest[fiducial2].DeleteRoi() 118 | except Exception: 119 | print 'Could not delete fiducial2 ROI. Continues...' 120 | #fiducial number 3 121 | with CompositeAction('ROI Algebra (Stift3)'): 122 | try: 123 | r19 = patient.PatientModel.CreateRoi(Name=marker3, Color=colourMarker3, Type="Marker", TissueName=None, RoiMaterial=None) 124 | r19.SetAlgebraExpression( 125 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [fiducial3], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.8, 'Posterior': 0.8, 'Right': 0.8, 'Left': 0.8 } }, 126 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [fiducial3], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.1, 'Inferior': 0.1, 'Anterior': 0.1, 'Posterior': 0.1, 'Right': 0.1, 'Left': 0.1 } }, 127 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 128 | r19.SetRoiMaterial(Material = patient.PatientModel.Materials[0]) 129 | r19.UpdateDerivedGeometry(Examination=examination) 130 | except Exception: 131 | print 'Failed to generate Marker_3 override ROI. Continues...' 132 | #end of composite action 133 | try: 134 | patient.PatientModel.RegionsOfInterest[fiducial3].DeleteRoi() 135 | except Exception: 136 | print 'Could not delete fiducial3 ROI. Continues...' 137 | #fiducial number 4 138 | with CompositeAction('ROI Algebra (Stift4)'): 139 | try: 140 | r19 = patient.PatientModel.CreateRoi(Name=marker4, Color=colourMarker4, Type="Marker", TissueName=None, RoiMaterial=None) 141 | r19.SetAlgebraExpression( 142 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [fiducial4], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.8, 'Posterior': 0.8, 'Right': 0.8, 'Left': 0.8 } }, 143 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [fiducial4], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.1, 'Inferior': 0.1, 'Anterior': 0.1, 'Posterior': 0.1, 'Right': 0.1, 'Left': 0.1 } }, 144 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 145 | r19.SetRoiMaterial(Material = patient.PatientModel.Materials[0]) 146 | r19.UpdateDerivedGeometry(Examination=examination) 147 | except Exception: 148 | print 'Failed to generate Marker_4 override ROI. Continues...' 149 | #end of composite action 150 | try: 151 | patient.PatientModel.RegionsOfInterest[fiducial4].DeleteRoi() 152 | except Exception: 153 | print 'Could not delete fiducial4 ROI. Continues...' 154 | #fiducial number 5 155 | with CompositeAction('ROI Algebra (Stift5)'): 156 | try: 157 | r19 = patient.PatientModel.CreateRoi(Name=marker5, Color=colourMarker5, Type="Marker", TissueName=None, RoiMaterial=None) 158 | r19.SetAlgebraExpression( 159 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [fiducial5], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.8, 'Posterior': 0.8, 'Right': 0.8, 'Left': 0.8 } }, 160 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [fiducial5], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.1, 'Inferior': 0.1, 'Anterior': 0.1, 'Posterior': 0.1, 'Right': 0.1, 'Left': 0.1 } }, 161 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 162 | r19.SetRoiMaterial(Material = patient.PatientModel.Materials[0]) 163 | r19.UpdateDerivedGeometry(Examination=examination) 164 | except Exception: 165 | print 'Failed to generate Marker_5 override ROI. Continues...' 166 | #end of composite action 167 | try: 168 | patient.PatientModel.RegionsOfInterest[fiducial5].DeleteRoi() 169 | except Exception: 170 | print 'Could not delete fiducial5 ROI. Continues...' 171 | #fiducial number 6 172 | with CompositeAction('ROI Algebra (Stift6)'): 173 | try: 174 | r19 = patient.PatientModel.CreateRoi(Name=marker6, Color=colourMarker6, Type="Marker", TissueName=None, RoiMaterial=None) 175 | r19.SetAlgebraExpression( 176 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [fiducial6], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.8, 'Posterior': 0.8, 'Right': 0.8, 'Left': 0.8 } }, 177 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [fiducial6], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.1, 'Inferior': 0.1, 'Anterior': 0.1, 'Posterior': 0.1, 'Right': 0.1, 'Left': 0.1 } }, 178 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 179 | r19.SetRoiMaterial(Material = patient.PatientModel.Materials[0]) 180 | r19.UpdateDerivedGeometry(Examination=examination) 181 | except Exception: 182 | print 'Failed to generate Marker_6 override ROI. Continues...' 183 | #end of composite action 184 | try: 185 | patient.PatientModel.RegionsOfInterest[fiducial6].DeleteRoi() 186 | except Exception: 187 | print 'Could not delete fiducial6 ROI. Continues...' 188 | #procedure OverrideFiducialsDensity ends 189 | 190 | 191 | 192 | #### ALL-PROSTATES PLAN PREPARATION : CONTOURING COMPLETION SCRIPT BEGINS HERE 193 | 194 | # Define null filter 195 | filter = {} 196 | 197 | # Get handle to patient db 198 | db = get_current('PatientDB') 199 | 200 | # Define patient and examination handles 201 | patient = get_current('Patient') 202 | examination = get_current('Examination') 203 | 204 | # RESET current simulation modality to the REQUIRED HU-DENSITY MAPPING 205 | examination.EquipmentInfo.SetImagingSystemReference(ImagingSystemName = densityConversionTable) 206 | #patient.Save() 207 | 208 | # EXTERNAL body contour will be created using threshold-based segmentation 209 | with CompositeAction('Create External (External)'): 210 | patient.PatientModel.CreateRoi(Name=external, Color="Orange", Type="External", TissueName=None, RoiMaterial=None) 211 | patient.PatientModel.RegionsOfInterest[external].CreateExternalGeometry(Examination=examination, ThresholdLevel=externalContourThreshold) 212 | # CompositeAction ends 213 | 214 | # FEMORALS HEADS and BLADDER will be approximated using built-in MALE PELVIS Model Based Segmentation 215 | get_current("ActionVisibility:Internal") # needed due to that MBS actions not visible in evaluation version. 216 | patient.PatientModel.MBSAutoInitializer(MbsRois=[ 217 | { 'CaseType': "PelvicMale", 'ModelName': "Bladder", 'RoiName': bladder, 'RoiColor': colourBladder }, 218 | { 'CaseType': "PelvicMale", 'ModelName': "FemoralHead (Left)", 'RoiName': femHeadLeft, 'RoiColor': colourCaputFemori }, 219 | { 'CaseType': "PelvicMale", 'ModelName': "FemoralHead (Right)", 'RoiName': femHeadRight, 'RoiColor': colourCaputFemori }], 220 | CreateNewRois=True, Examination=examination, UseAtlasBasedInitialization=True) 221 | # adapt model based segmentation for bladder and femoral heads 222 | patient.PatientModel.AdaptMbsMeshes(Examination=examination, RoiNames=[bladder, femHeadLeft, femHeadRight], CustomStatistics=None, CustomSettings=None) 223 | #patient.Save() 224 | 225 | 226 | # GROW DENSITY OVERRIDE REGION AROUND IMPLANTED GOLD MARKERS 227 | OverrideFiducialsDensity() 228 | 229 | # GROW RECTAL HELP VOLUME FOR IGRT 230 | CreateWallHvRectum() 231 | 232 | # PLAN PREPARATION COMPLETE - save the active plan and manually check/edit plan before inverse planning 233 | patient.Save() 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | -------------------------------------------------------------------------------- /Old_Prostate_Scripting/PROS_C_IMRT_Autoplan.py: -------------------------------------------------------------------------------- 1 | import math 2 | from connect import * 3 | import time 4 | import sys 5 | clr.AddReference("PresentationFramework") 6 | from System.Windows import * 7 | 8 | 9 | # DEFINE A MANDATORY SET OF INITAL STRUCTURES 10 | # ------ PLAN NEEDS TO HAVE THESE STRUCTURES DEFINED BEFORE EXECUTING THE SCRIPT 11 | ctvT = 'CTV-T' 12 | ctvSV = 'CTV-SV' #required in Type B and C plans 13 | ctvE = 'CTV-E' #required in Type N plans 14 | analCanal = 'OR; Anal Canal' 15 | penileBulb = 'OR; Bulbus penis' 16 | rectum = 'OR; Rectum' 17 | bowel = 'OR; Tarm' #only exists for N+ disease 18 | testes = 'OR; Testes' 19 | fiducial1 = 'Stift1' #does not exist for salvage cases 20 | fiducial2 = 'Stift2' #does not exist for salvage cases 21 | fiducial3 = 'Stift3' #does not exist for salvage cases 22 | fiducial4 = 'Stift4' #may or may not exist for any prostate plan 23 | fiducial5 = 'Stift5' #may or may not exist for any prostate plan 24 | fiducial6 = 'Stift6' #may or may not exist for any prostate plan 25 | 26 | # DEFINE A STANDARD SET OF ANATOMICAL STRUCTURE NAMES 27 | external = 'External' 28 | femHeadLeft = 'OR; Cap fem dex' 29 | femHeadRight = 'OR; Cap fem sin' 30 | bladder = 'OR; Blaere' 31 | ptvT = 'PTV-T' 32 | ptvSV = 'PTV-SV' 33 | ptvTSV = 'PTV-TSV' 34 | ptvE = 'PTV-E' 35 | hvRect = 'HV-Rectum' 36 | marker1 = 'Mark_1' 37 | marker2 = 'Mark_2' 38 | marker3 = 'Mark_3' 39 | marker4 = 'Mark_4' 40 | marker5 = 'Mark_5' 41 | marker6 = 'Mark_6' 42 | 43 | # DEFINE A STANDARD SET OF STRUCTURE COLOURS 44 | #---- see for example colour charts at http://www.rapidtables.com/web/color/RGB_Color.htm 45 | colourBladder = "0,153,0" 46 | colourRectum = "0,102,0" 47 | colourBowel = "0,204,0" 48 | colourCaputFemori = "0,51,0" 49 | colourPtvT = "178,102,255" 50 | colourPtvSV = "204,153,255" 51 | colourPtvTSV = "153,51,255" 52 | colourPtvE = "229,204,255" 53 | colourMarker1 = "0,51,25" 54 | colourMarker2 = "255,128,0" 55 | colourMarker3 = "255,153,255" 56 | colourMarker4 = "204,255,153" 57 | colourMarker5 = "0,102,102" 58 | colourMarker6 = "102,0,102" 59 | 60 | # DEFINE A SET OF PLANNING HELP STRUCTURES 61 | complementPtvEofTSV = 'PTV-E-(PTV-TSV)' 62 | complementBladderPtvT = 'OR; Blaere-(PTV-T+5mm)' 63 | complementBladderPtvTSV = 'OR; Blaere-(PTV-TSV+5mm)' 64 | complementBladderPtvE = 'OR; Blaere-(PTV-E+5mm)' 65 | complementRectumPtvT = 'OR; Rectum-(PTV-T+5mm)' 66 | complementRectumPtvTSV = 'OR; Rectum-(PTV-TSV+5mm)' 67 | complementRectumPtvE = 'OR; Rectum-(PTV-E+5mm)' 68 | complementBowelPtvTSV = 'OR; Tarm-(PTV-TSV+5mm)' 69 | complementBowelPtvE = 'OR; Tarm-(PTV-E+5mm)' 70 | wallPtvT = 'Wall;(PTV-T)+5mm' 71 | wallPtvTSV = 'Wall;(PTV-TSV)+5mm' 72 | wallPtvE = 'Wall;(PTV-E)+5mm' 73 | transitionTSVtoE = 'PTV-E-(PTV-TSV+8mm)' 74 | complementExternalPtvT = 'External-(PTV-T)' 75 | complementExternalPtvTsv = 'External-(PTV-TSV)' 76 | complementExternalPtvE = 'External-(PTV-E)' 77 | 78 | # DEFINE A STANDARD SET OF STRUCTURE COLOURS 79 | #---- see for example colour charts at http://www.rapidtables.com/web/color/RGB_Color.htm 80 | colourBladder = "0,153,0" 81 | colourRectum = "0,102,0" 82 | colourBowel = "0,204,0" 83 | colourCaputFemori = "0,51,0" 84 | colourPtvT = "178,102,255" 85 | colourPtvSV = "204,153,255" 86 | colourPtvTSV = "153,51,255" 87 | colourPtvE = "229,204,255" 88 | colourMarker1 = "0,51,25" 89 | colourMarker2 = "255,128,0" 90 | colourMarker3 = "255,153,255" 91 | colourMarker4 = "204,255,153" 92 | colourMarker5 = "0,102,102" 93 | colourMarker6 = "102,0,102" 94 | colourComplementExternal = "192,192,192" 95 | 96 | 97 | def CreateMarginPtvT(): 98 | # 1) create PTV-T 99 | with CompositeAction('Create PTV-T'): 100 | #PTV-T 101 | try : 102 | r1 = patient.PatientModel.CreateRoi(Name=ptvT, Color=colourPtvT, Type="PTV", TissueName=None, RoiMaterial=None) 103 | r1.SetMarginExpression(SourceRoiName=ctvT, MarginSettings={ 'Type': "Expand", 'Superior': 1.0, 'Inferior': 1.0, 'Anterior': 0.7, 'Posterior': 0.7, 'Right': 0.7, 'Left': 0.7 }) 104 | r1.UpdateDerivedGeometry(Examination=examination) 105 | except Exception: 106 | print 'Failed to create PTV-T. Continues...' 107 | #procedure CreateMarginPtvT ends 108 | 109 | def CreateMarginPtvSV(): 110 | # 2) create PTV-SV 111 | with CompositeAction('Create PTV-SV'): 112 | #PTV-SV 113 | try : 114 | r2 = patient.PatientModel.CreateRoi(Name=ptvSV, Color=colourPtvSV, Type="PTV", TissueName=None, RoiMaterial=None) 115 | r2.SetMarginExpression(SourceRoiName=ctvSV, MarginSettings={ 'Type': "Expand", 'Superior': 1.0, 'Inferior': 1.0, 'Anterior': 0.7, 'Posterior': 0.7, 'Right': 0.7, 'Left': 0.7 }) 116 | r2.UpdateDerivedGeometry(Examination=examination) 117 | except Exception: 118 | print 'Failed to create PTV-SV. Continues...' 119 | #procedure CreateMarginPtvTSV ends 120 | 121 | def CreateMarginPtvE(): 122 | # 3) create PTV-E 123 | with CompositeAction('Create PTV-E'): 124 | #PTV-E 125 | try : 126 | r3 = patient.PatientModel.CreateRoi(Name=ptvE, Color=colourPtvE, Type="PTV", TissueName=None, RoiMaterial=None) 127 | r3.SetMarginExpression(SourceRoiName=ctvE, MarginSettings={ 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.7, 'Posterior': 0.7, 'Right': 0.5, 'Left': 0.5 }) 128 | r3.UpdateDerivedGeometry(Examination=examination) 129 | except Exception: 130 | print 'Failed to create PTV-E. Continues...' 131 | #procedure CreateMarginPtvE ends 132 | 133 | def CreateUnionPtvTSV(): 134 | # 4) union of PTV-T and PTV-SV 135 | with CompositeAction('ROI Algebra (PTV-TSV)'): 136 | #PTV-TSV 137 | try: 138 | r4 = patient.PatientModel.CreateRoi(Name=ptvTSV, Color=colourPtvTSV, Type="PTV", TissueName=None, RoiMaterial=None) 139 | r4.SetAlgebraExpression( 140 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [ptvT], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 141 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvSV], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 142 | ResultOperation="Union", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 143 | r4.UpdateDerivedGeometry(Examination=examination) 144 | except Exception: 145 | print 'Failed to create PTV-TSV. Continues ...' 146 | #procedure CreatedUnionPtvTSV 147 | 148 | def CreateTransitionPtvTsvPtvE(): 149 | # 5) transition zone between PTV-TSV and PTV-E 150 | with CompositeAction('ROI Algebra PTV-E-(PTV-TSV+8mm)'): 151 | #PTV-E-(PTV-TSV+8mm) 152 | try : 153 | r5 = patient.PatientModel.CreateRoi(Name=transitionTSVtoE, Color=colourPtvE, Type="PTV", TissueName=None, RoiMaterial=None) 154 | r5.SetAlgebraExpression( 155 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [ptvE], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 156 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvTSV], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.8, 'Inferior': 0.8, 'Anterior': 0.8, 'Posterior': 0.8, 'Right': 0.8, 'Left': 0.8 } }, 157 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 158 | r5.UpdateDerivedGeometry(Examination=examination) 159 | except Exception: 160 | print 'Failed to create PTV-E-(PTV-TSV+8mm). Continues...' 161 | #procedure CreateTransitionPtvTsvPtvE ends 162 | 163 | def CreateComplementPtvTsvPtvE(): 164 | # 6) complementary zone of PTV-E without PTV-TSV 165 | with CompositeAction('ROI Algebra PTV-E-(PTV-TSV)'): 166 | #PTV-E-(PTV-TSV) 167 | try : 168 | r6 = patient.PatientModel.CreateRoi(Name=complementPtvEofTSV, Color=colourPtvE, Type="PTV", TissueName=None, RoiMaterial=None) 169 | r6.SetAlgebraExpression( 170 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [ptvE], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 171 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvTSV], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 172 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 173 | r6.UpdateDerivedGeometry(Examination=examination) 174 | except Exception: 175 | print 'Failed to create PTV-E-(PTV-TSV). Continues...' 176 | #procedure CreateComplementPtvTsvPtvE 177 | 178 | def CreateComplementBladderPtvT(): 179 | # 8) bladder complementary volume without PTV-T 180 | with CompositeAction('ROI Algebra Blaere-(PTV-T+5mm)'): 181 | #OR; Blaere-(PTV-T+5mm) 182 | try : 183 | r8 = patient.PatientModel.CreateRoi(Name=complementBladderPtvT, Color=colourBladder, Type="Organ", TissueName=None, RoiMaterial=None) 184 | r8.SetAlgebraExpression( 185 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [bladder], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 186 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvT], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 187 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 188 | r8.UpdateDerivedGeometry(Examination=examination) 189 | except Exception: 190 | print 'Failed to create OR; Blaere-(PTV-T+5mm). Continues...' 191 | #procedure CreateComplementBladderPtvT ends 192 | 193 | def CreateComplementBladderPtvTSV(): 194 | # 9) bladder complementary volume without PTV-TSV 195 | with CompositeAction('ROI Algebra Blaere-(PTV-TSV+5mm)'): 196 | #OR; Blaere-(PTV-TSV+5mm) 197 | try : 198 | r9 = patient.PatientModel.CreateRoi(Name=complementBladderPtvTSV, Color=colourBladder, Type="Organ", TissueName=None, RoiMaterial=None) 199 | r9.SetAlgebraExpression( 200 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [bladder], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 201 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvTSV], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 202 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 203 | r9.UpdateDerivedGeometry(Examination=examination) 204 | except Exception: 205 | print 'Failed to create OR; Blaere-(PTV-TSV+5mm). Continues...' 206 | #procedure CreateComplementBladderPtvTSV ends 207 | 208 | def CreateComplementBladderPtvE(): 209 | # 10) bladder complementary volume without PTV-E 210 | with CompositeAction('ROI Algebra Blaere-(PTV-E+5mm)'): 211 | #OR; Blaere-(PTV-E+5mm) 212 | try : 213 | r10 = patient.PatientModel.CreateRoi(Name=complementBladderPtvE, Color=colourBladder, Type="Organ", TissueName=None, RoiMaterial=None) 214 | r10.SetAlgebraExpression( 215 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [bladder], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 216 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvE], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 217 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 218 | r10.UpdateDerivedGeometry(Examination=examination) 219 | except Exception: 220 | print 'Failed to create OR; Blaere-(PTV-E+5mm). Continues...' 221 | #procedure CreateComplementBladderPtvE 222 | 223 | def CreateComplementRectumPtvT(): 224 | # 11) rectal complementary volume without PTV-T 225 | with CompositeAction('ROI Algebra Rectum-(PTV-T+5mm)'): 226 | #OR; Rectum-(PTV-T+5mm) 227 | try : 228 | r11 = patient.PatientModel.CreateRoi(Name=complementRectumPtvT, Color=colourRectum, Type="Organ", TissueName=None, RoiMaterial=None) 229 | r11.SetAlgebraExpression( 230 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [rectum], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 231 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvT], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 232 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 233 | r11.UpdateDerivedGeometry(Examination=examination) 234 | except Exception: 235 | print 'Failed to create OR; Rectum-(PTV-T+5mm). Continues...' 236 | #procedure CreateComplementRectumPtvT 237 | 238 | def CreateComplementRectumPtvTSV(): 239 | # 12) rectal complementary volume without PTV-TSV 240 | with CompositeAction('ROI Algebra Rectum-(PTV-TSV+5mm)'): 241 | #OR; Rectum-(PTV-TSV+5mm) 242 | try : 243 | r12 = patient.PatientModel.CreateRoi(Name=complementRectumPtvTSV, Color=colourRectum, Type="Organ", TissueName=None, RoiMaterial=None) 244 | r12.SetAlgebraExpression( 245 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [rectum], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 246 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvTSV], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 247 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 248 | r12.UpdateDerivedGeometry(Examination=examination) 249 | except Exception: 250 | print 'Failed to create OR; Rectum-(PTV-TSV+5mm). Continues...' 251 | #procedure CreateComplementRectumPtvTSV ends 252 | 253 | def CreateComplementRectumPtvE(): 254 | # 13) rectal complementary volume without PTV-E 255 | with CompositeAction('ROI Algebra Rectum-(PTV-E+5mm)'): 256 | #OR; Rectum-(PTV-E+5mm) 257 | try : 258 | r13 = patient.PatientModel.CreateRoi(Name=complementRectumPtvE, Color="128,128,128", Type="Organ", TissueName=None, RoiMaterial=None) 259 | r13.SetAlgebraExpression( 260 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [rectum], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 261 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvE], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 262 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 263 | r13.UpdateDerivedGeometry(Examination=examination) 264 | except Exception: 265 | print 'Failed to create OR; Rectum-(PTV-E+5mm). Continues...' 266 | #procedure CreateComplementRectumPtvE ends 267 | 268 | def CreateComplementBowelPtvTSV(): 269 | # 14) bowel complementary volume without PTV-TSV 270 | with CompositeAction('ROI Algebra Tarm-(PTV-TSV+5mm)'): 271 | #OR; Tarm-(PTV-TSV+5mm) 272 | try : 273 | r14 = patient.PatientModel.CreateRoi(Name=complementBowelPtvTSV, Color=colourBowel, Type="Organ", TissueName=None, RoiMaterial=None) 274 | r14.SetAlgebraExpression( 275 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [bowel], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 276 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvTSV], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 277 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 278 | r14.UpdateDerivedGeometry(Examination=examination) 279 | except Exception: 280 | print 'Failed to create OR; Tarm-(PTV-TSV+5mm). Continues...' 281 | #procedure CreateComplementBowelPtvTSV ends 282 | 283 | def CreateComplementBowelPtvE(): 284 | # 15) bowel complementary volume without PTV-E 285 | with CompositeAction('ROI Algebra Tarm-(PTV-E+5mm)'): 286 | #OR; Tarm-(PTV-E+5mm) 287 | try : 288 | r15 = patient.PatientModel.CreateRoi(Name=complementBowelPtvE, Color=colourBowel, Type="Organ", TissueName=None, RoiMaterial=None) 289 | r15.SetAlgebraExpression( 290 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [bowel], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 291 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvE], 'MarginSettings': { 'Type': "Expand", 'Superior': 0.5, 'Inferior': 0.5, 'Anterior': 0.5, 'Posterior': 0.5, 'Right': 0.5, 'Left': 0.5 } }, 292 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 293 | r15.UpdateDerivedGeometry(Examination=examination) 294 | except Exception: 295 | print 'Failed to create OR; Tarm-(PTV-E+5mm). Continues...' 296 | #procedure CreateComplementBowelPtvE ends 297 | 298 | def CreateWallPtvT(): 299 | # 16) toroidal help volume around PTV-T 300 | with CompositeAction('Create Wall;(PTV-T)+5mm'): 301 | #Wall;(PTV-T)+5mm 302 | try: 303 | r16 = patient.PatientModel.CreateRoi(Name=wallPtvT, Color="Gray", Type="Organ", TissueName=None, RoiMaterial=None) 304 | r16.SetWallExpression(SourceRoiName=ptvT, OutwardDistance=0.5, InwardDistance=0) 305 | r16.UpdateDerivedGeometry(Examination=examination) 306 | except Exception: 307 | print 'Failed to create Wall;(PTV-T)+5mm. Continues ...' 308 | #procedure CreateWallPtvT ends 309 | 310 | def CreateWallPtvTSV(): 311 | # 17) toroidal help volume around PTV-TSV 312 | with CompositeAction('Create Wall;(PTV-TSV)+5mm'): 313 | #Wall;(PTV-TSV)+5mm 314 | try: 315 | r17 = patient.PatientModel.CreateRoi(Name=wallPtvTSV, Color="Gray", Type="Organ", TissueName=None, RoiMaterial=None) 316 | r17.SetWallExpression(SourceRoiName=ptvTSV, OutwardDistance=0.5, InwardDistance=0) 317 | r17.UpdateDerivedGeometry(Examination=examination) 318 | except Exception: 319 | print 'Failed to create Wall;(PTV-TSV)+5mm. Continues ...' 320 | #procedure CreateWallPtvTSV ends 321 | 322 | def CreateWallPtvE(): 323 | # 18) toroidal help volume around PTV-E 324 | with CompositeAction('Create Wall;(PTV-E)+5mm'): 325 | #Wall;(PTV-E)+5mm 326 | try: 327 | r18 = patient.PatientModel.CreateRoi(Name=wallPtvE, Color="Gray", Type="Organ", TissueName=None, RoiMaterial=None) 328 | r18.SetWallExpression(SourceRoiName=ptvE, OutwardDistance=0.5, InwardDistance=0) 329 | r18.UpdateDerivedGeometry(Examination=examination) 330 | except Exception: 331 | print 'Failed to create Wall;(PTV-E)+5mm. Continues ...' 332 | #procedure CreateWallPtvE ends 333 | 334 | def CreateComplementExternalPtvT(): 335 | # 20) external complementary volume without PTV-T 336 | with CompositeAction('ROI Algebra External-(PTV-T)'): 337 | #External-(PTV-T) 338 | try : 339 | r20 = patient.PatientModel.CreateRoi(Name=complementExternalPtvT, Color=colourComplementExternal, Type="Organ", TissueName=None, RoiMaterial=None) 340 | r20.SetAlgebraExpression( 341 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [external], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 342 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvT], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 343 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 344 | r20.UpdateDerivedGeometry(Examination=examination) 345 | except Exception: 346 | print 'Failed to create External-(PTV-T). Continues...' 347 | #procedure CreateComplementExternalPtvT ends 348 | 349 | def CreateComplementExternalPtvTSV(): 350 | # 21) external complementary volume without PTV-TSV 351 | with CompositeAction('ROI Algebra External-(PTV-TSV)'): 352 | #External-(PTV-TSV) 353 | try : 354 | r21 = patient.PatientModel.CreateRoi(Name=complementExternalPtvTsv, Color=colourComplementExternal, Type="Organ", TissueName=None, RoiMaterial=None) 355 | r21.SetAlgebraExpression( 356 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [external], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 357 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvTSV], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 358 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 359 | r21.UpdateDerivedGeometry(Examination=examination) 360 | except Exception: 361 | print 'Failed to create External-(PTV-TSV). Continues...' 362 | #procedure CreateComplementExternalPtvTSV ends 363 | 364 | def CreateComplementExternalPtvE(): 365 | # 22) external complementary volume without PTV-E 366 | with CompositeAction('ROI Algebra External-(PTV-E)'): 367 | #External-(PTV-E) 368 | try : 369 | r22 = patient.PatientModel.CreateRoi(Name=complementExternalPtvE, Color=colourComplementExternal, Type="Organ", TissueName=None, RoiMaterial=None) 370 | r22.SetAlgebraExpression( 371 | ExpressionA={ 'Operation': "Union", 'SourceRoiNames': [external], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 372 | ExpressionB={ 'Operation': "Union", 'SourceRoiNames': [ptvE], 'MarginSettings': { 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 } }, 373 | ResultOperation="Subtraction", ResultMarginSettings={ 'Type': "Expand", 'Superior': 0, 'Inferior': 0, 'Anterior': 0, 'Posterior': 0, 'Right': 0, 'Left': 0 }) 374 | r22.UpdateDerivedGeometry(Examination=examination) 375 | except Exception: 376 | print 'Failed to create External-(PTV-E). Continues...' 377 | #procedure CreateComplementExternalPtvE ends 378 | 379 | 380 | # Utility function to retrieve a unique plan name 381 | def UniquePlanName(name, pat): 382 | for p in pat.TreatmentPlans: 383 | if name == p.Name: 384 | name = name + '_1' 385 | name = UniquePlanName(name, pat) 386 | return name 387 | 388 | 389 | # Utility function that loads a plan and beam set into GUI 390 | def LoadPlanAndBeamSet(patient, plan, beamset): 391 | # load plan 392 | planFilter = {"Name":plan.Name} 393 | planInfos = patient.QueryPlanInfo(Filter = planFilter) 394 | if len(planInfos) != 1: 395 | raise Exception('Failed plan query (nr of plan infos = {0})'.format(len(planInfos))) 396 | patient.LoadPlan(PlanInfo = {"Name": "^" + plan.Name + "$"}) 397 | # load beam set 398 | beamsetInfos = plan.QueryBeamSetInfo(Filter = {"Name":beamset.DicomPlanLabel}) 399 | if len(beamsetInfos) != 1: 400 | raise Exception('Failed beam set query (nr of beam set infos = {0})'.format(len(beamsetInfos))) 401 | plan.LoadBeamSet(BeamSetInfo = beamsetInfos[0]) 402 | # end LoadPlanAndBeamSet 403 | 404 | 405 | 406 | 407 | 408 | #### PROSTATE TYPE C AUTO-PLAN 409 | #### 78Gy/39F Normo-fractionated prescribed to PTV-T and PTV-SV 410 | #### As a 7-field IMRT beam distribution 411 | 412 | # DEFINE THE STANDARD PLANNING AND PRESCRIPTION PARAMETERS 413 | defaultLinac = 'LW_Agility_VMAT' #standard linac beam model for dose planning 414 | defaultDoseGrid = 0.25 #isotropic dose grid dimension 415 | defaultPhotonEn = 6 #standard photon beam modality in units of MV 416 | defaultPrescDose = 7800 #the absolute prescribed dose in cGy 417 | defaultFractions = 39 #standard number of fractions 418 | 419 | # DEFINE THE NAMES OF THE STANDARD CLINICAL GOALS AND OPTIMIZATION FUNCTIONS 420 | templateClinicalGoals = 'Pros C - Clinical Goals' 421 | templateOptimizationFunctions = 'Pros C - Objective Functions' 422 | #templateOptimizationFunctions = 'Pros C - MCO Tradeoffs' #the other alternative is MCO 423 | # 424 | # names of the other clinical goals and optimisation templates 425 | #templateClinicalGoals = 'Pros B - Clinical Goals' 426 | #templateClinicalGoals = 'Pros N - Clinical Goals' 427 | #templateClinicalGoals = 'Pros S - Clinical Goals' 428 | 429 | # NOTE A TEMPLATE BEAMSET IS NOT DEFINED THROUGH A FUNCTION CALL TO APPLY A TEMPLATE 430 | # but rather each field in the beamset has been explicitly defined using 431 | # the 'CreatePhotonBeam' method acting on a BeamSet instance - see lines in script 432 | 433 | # Define null filter 434 | filter = {} 435 | 436 | # Get handle to patient db 437 | db = get_current('PatientDB') 438 | 439 | # Define patient and examination handles 440 | patient = get_current('Patient') 441 | examination = get_current('Examination') 442 | 443 | # Define plan set and beam set and density dataset handles 444 | planName = 'ProstC_78_39' 445 | planName = UniquePlanName(planName, patient) #auto-generate a unique plan name if ProstC_78_39 already exists 446 | beamSetImrtName = 'Primaer' #prepares a 7-field IMRT standard primary beamset 447 | beamSetBoostName = 'Boost' #prepares a 7-field IMRT boost beamset 448 | examinationName = examination.Name 449 | 450 | # GROW PLANNING VOLUMES AND STANDARD MARGINS FOR PROSTATA TYPE C 451 | CreateMarginPtvT() #all prostate types 452 | CreateComplementBladderPtvT() #all prostate types 453 | CreateComplementRectumPtvT() #all prostate types 454 | CreateWallPtvT() #all prostate types 455 | CreateComplementExternalPtvT() #all prostate types 456 | 457 | CreateMarginPtvSV() #all prostate types except Type A 458 | CreateUnionPtvTSV() #all prostate types except Type A 459 | CreateComplementBladderPtvTSV() #all prostate types except Type A 460 | CreateComplementRectumPtvTSV() #all prostate types except Type A 461 | CreateWallPtvTSV() #all prostate types except Type A 462 | CreateComplementExternalPtvTSV() #all prostate types except Type A 463 | 464 | #CreateMarginPtvE() #only for Type N+ 465 | #CreateTransitionPtvTsvPtvE() #only for Type N+ 466 | #CreateComplementPtvTsvPtvE() #only for Type N+ 467 | #CreateComplementBladderPtvE() #only for Type N+ 468 | #CreateComplementRectumPtvE() #only for Type N+ 469 | #CreateComplementBowelPtvTSV() #only for Type N+ 470 | #CreateComplementBowelPtvE() #only for Type N+ 471 | #CreateWallPtvE() #only for Type N+ 472 | #CreateComplementExternalPtvE() #only for Type N+ 473 | 474 | # HELP VOLUME PREPARATION COMPLETE - save the active plan 475 | patient.Save() 476 | 477 | 478 | # Setup a standard IMRT protocol plan 479 | with CompositeAction('Adding plan with name {0} '.format(planName)): 480 | # add plan 481 | plan = patient.AddNewPlan(PlanName=planName, Comment="Prostate IMRT auto-plan by Len Wee", ExaminationName=examinationName) 482 | # set standard dose grid size 483 | plan.SetDefaultDoseGrid(VoxelSize={'x':defaultDoseGrid, 'y':defaultDoseGrid, 'z':defaultDoseGrid}) 484 | # how to set the dose grid size to cover 485 | # 486 | # add beam set 487 | beamSetImrt = plan.AddNewBeamSet(Name = beamSetImrtName, ExaminationName = examinationName, 488 | MachineName = defaultLinac, NominalEnergy = None, Modality = "Photons", 489 | TreatmentTechnique = "SMLC", PatientPosition = "HeadFirstSupine", NumberOfFractions = defaultFractions, 490 | CreateSetupBeams = False) 491 | 492 | # Save the current patient 493 | patient.Save() 494 | 495 | # Load the plan and first beamset into the system 496 | LoadPlanAndBeamSet(patient, plan, beamSetImrt) 497 | 498 | # Create prescription, clinical goals and optimisation functions for the first beam set 499 | with CompositeAction('Add prescription, beams, clinical goals, optimization functions'): 500 | # add prescription 501 | beamSetImrt.AddDosePrescriptionToRoi(RoiName = ptvTSV, PrescriptionType = "AverageDose", DoseValue = defaultPrescDose, DoseVolume = 0, RelativePrescriptionLevel = 1) 502 | #set the planning isocenter to the centre of the reference ROI 503 | isocenter = patient.PatientModel.StructureSets[examinationName].RoiGeometries[ptvTSV].GetCenterOfRoi() 504 | # add 7 static IMRT fields around the ROI-based isocenter 505 | beamSetImrt.CreatePhotonBeam(Name = '1; T154A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 154, CollimatorAngle = 15, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 506 | beamSetImrt.CreatePhotonBeam(Name = '2; T102A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 102, CollimatorAngle = 345, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 507 | beamSetImrt.CreatePhotonBeam(Name = '3; T050A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 50, CollimatorAngle = 45, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 508 | beamSetImrt.CreatePhotonBeam(Name = '4; T206A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 206, CollimatorAngle = 345, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 509 | beamSetImrt.CreatePhotonBeam(Name = '5; T258A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 258, CollimatorAngle = 15, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 510 | beamSetImrt.CreatePhotonBeam(Name = '6; T310A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 310, CollimatorAngle = 315, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 511 | beamSetImrt.CreatePhotonBeam(Name = '7; T000A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 0, CollimatorAngle = 0, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 512 | # import clinical goals from a predefined template 513 | plan.TreatmentCourse.EvaluationSetup.ApplyClinicalGoalTemplate(Template=db.TemplateTreatmentOptimizations[templateClinicalGoals]) 514 | # import optimization functions from a predefined template 515 | plan.PlanOptimizations[0].ApplyOptimizationTemplate(Template=db.TemplateTreatmentOptimizations[templateOptimizationFunctions]) 516 | 517 | # Save the current beamset 518 | patient.Save() 519 | 520 | # run optimization for the IMRT plan 521 | plan.PlanOptimizations[0].RunOptimization() 522 | 523 | # compute final dose 524 | beamSetImrt.ComputeDose(ComputeBeamDoses=True, DoseAlgorithm="CCDose", ForceRecompute=False) 525 | 526 | # Save final 527 | patient.Save() 528 | #end of AUTOPLAN 529 | 530 | 531 | -------------------------------------------------------------------------------- /Old_Prostate_Scripting/ProstC_78_39_1arc.py: -------------------------------------------------------------------------------- 1 | from connect import * 2 | import os #file system libraries 3 | import sys #system libraries 4 | 5 | scriptsPath = 'F:/ManagedScripts' #set path to managed python scripts 6 | os.chdir(scriptsPath) #change path to managed python scripts 7 | 8 | #imports the module containing structure definitions and ROI-growing procedures 9 | from C_Prostata_Integning import * 10 | 11 | # Utility function to retrieve a unique plan name 12 | def UniquePlanName(name, pat): 13 | for p in pat.TreatmentPlans: 14 | if name == p.Name: 15 | name = name + '_1' 16 | name = UniquePlanName(name, pat) 17 | return name 18 | 19 | # Utility function that loads a plan and beam set into GUI 20 | def LoadPlanAndBeamSet(patient, plan, beamset): 21 | # load plan 22 | planFilter = {"Name":plan.Name} 23 | planInfos = patient.QueryPlanInfo(Filter = planFilter) 24 | if len(planInfos) != 1: 25 | raise Exception('Failed plan query (nr of plan infos = {0})'.format(len(planInfos))) 26 | patient.LoadPlan(PlanInfo = {"Name": "^" + plan.Name + "$"}) 27 | # load beam set 28 | beamsetInfos = plan.QueryBeamSetInfo(Filter = {"Name":beamset.DicomPlanLabel}) 29 | if len(beamsetInfos) != 1: 30 | raise Exception('Failed beam set query (nr of beam set infos = {0})'.format(len(beamsetInfos))) 31 | plan.LoadBeamSet(BeamSetInfo = beamsetInfos[0]) 32 | # end LoadPlanAndBeamSet 33 | 34 | 35 | # Define null filter 36 | filter = {} 37 | 38 | # Get handle to patient db 39 | db = get_current('PatientDB') 40 | 41 | # Define patient and examination handles 42 | patient = get_current('Patient') 43 | examination = get_current('Examination') 44 | 45 | # STUDY PREPARATION AND FOR ALL PROSTATE TYPES 46 | # -------------------------------------------- 47 | InitialiseDensityConversionTable() #this sets the table to "HR_OEB HUsetting" 48 | 49 | CreateExternalBodyContour() #this draws an external contour called "External" 50 | 51 | AutosegmentFemurAndBladder() #autosegments 'OR; Cap fem dex', 'OR; Cap fem sin' and 'OR; Blaere' 52 | 53 | CreateWallHvRectum() #creates the cylindrical help volume around 'OR; Rectum' 54 | 55 | OverrideFiducialsDensity() #over-rides density around fiducial markers (max of 6 seeds) 56 | 57 | patient.Save() 58 | 59 | # 60 | # 61 | # DEFINE THE STANDARD PLANNING AND PRESCRIPTION PARAMETERS 62 | defaultLinac = 'LW_Agility_VMAT' #standard linac beam model for dose planning 63 | defaultDoseGrid = 0.25 #isotropic dose grid dimension 64 | defaultPhotonEn = 6 #standard photon beam modality in units of MV 65 | defaultPrescDose = 7800 #the absolute prescribed dose in cGy 66 | defaultFractions = 39 #standard number of fractions 67 | 68 | # DEFINE THE NAMES OF THE STANDARD CLINICAL GOALS AND OPTIMIZATION FUNCTIONS 69 | templateClinicalGoals = 'Pros C - Clinical Goals' 70 | templateOptimizationFunctions = 'Pros C - Objective Functions' 71 | #templateOptimizationFunctions = 'Pros C - MCO Tradeoffs' #the other alternative is MCO 72 | # 73 | # names of the other clinical goals and optimisation templates 74 | #templateClinicalGoals = 'Pros B - Clinical Goals' 75 | #templateClinicalGoals = 'Pros N - Clinical Goals' 76 | #templateClinicalGoals = 'Pros S - Clinical Goals' 77 | 78 | # NOTE A TEMPLATE BEAMSET IS NOT DEFINED THROUGH A FUNCTION CALL TO APPLY A TEMPLATE 79 | # but rather each field in the beamset has been explicitly defined using 80 | # the 'CreatePhotonBeam' method acting on a BeamSet instance - see lines in script 81 | 82 | # Define plan set and beam set and density dataset handles 83 | planName = 'ProstC_78_39' 84 | planName = UniquePlanName(planName, patient) #auto-generate a unique plan name if ProstC_78_39 already exists 85 | 86 | beamSetPrimaryName = 'Primaer' #name of the primary beamset 87 | beamSetBoostName = 'Boost' #where necessary the name of the dependent boost beamset 88 | 89 | examinationName = examination.Name #name of the current examination 90 | 91 | # GROW PLANNING VOLUMES AND STANDARD MARGINS FOR PROSTATA TYPE C 92 | # -------------------------------------------------------------- 93 | CreateMarginPtvT() #used for all prostate types 94 | 95 | CreateComplementBladderPtvT() #used for all prostate types 96 | 97 | CreateComplementRectumPtvT() #used for all prostate types 98 | 99 | CreateWallPtvT() #used for all prostate types 100 | 101 | CreateComplementExternalPtvT() #all prostate types 102 | 103 | CreateMarginPtvSV() #all prostate types except Type A 104 | 105 | CreateUnionPtvTSV() #all prostate types except Type A 106 | 107 | CreateComplementBladderPtvTSV() #all prostate types except Type A 108 | 109 | CreateComplementRectumPtvTSV() #all prostate types except Type A 110 | 111 | CreateWallPtvTSV() #all prostate types except Type A 112 | 113 | CreateComplementExternalPtvTSV() #all prostate types except Type A 114 | 115 | #CreateMarginPtvE() #only for Type N+ 116 | #CreateTransitionPtvTsvPtvE() #only for Type N+ 117 | #CreateComplementPtvTsvPtvE() #only for Type N+ 118 | #CreateComplementBladderPtvE() #only for Type N+ 119 | #CreateComplementRectumPtvE() #only for Type N+ 120 | #CreateComplementBowelPtvTSV() #only for Type N+ 121 | #CreateComplementBowelPtvE() #only for Type N+ 122 | #CreateWallPtvE() #only for Type N+ 123 | #CreateComplementExternalPtvE() #only for Type N+ 124 | 125 | # HELP VOLUME PREPARATION COMPLETE - save the active plan 126 | patient.Save() 127 | 128 | # Set up a standard VMAT protocol plan with 1 counter clockwise arc 129 | with CompositeAction('Adding VMAT arc/s for name {0} '.format(planName)): 130 | # add plan 131 | plan = patient.AddNewPlan(PlanName=planName, Comment="Prostate VMAT auto-plan", ExaminationName=examinationName) 132 | # set standard dose grid size 133 | plan.SetDefaultDoseGrid(VoxelSize={'x':defaultDoseGrid, 'y':defaultDoseGrid, 'z':defaultDoseGrid}) 134 | # 135 | # add beam set 136 | beamSet1 = plan.AddNewBeamSet(Name = beamSetPrimaryName, ExaminationName = examinationName, 137 | MachineName = defaultLinac, NominalEnergy = None, Modality = "Photons", 138 | TreatmentTechnique = "VMAT", PatientPosition = "HeadFirstSupine", NumberOfFractions = defaultFractions, 139 | CreateSetupBeams = False) 140 | 141 | 142 | # Save the current patient 143 | patient.Save() 144 | 145 | # Load the plan and first beamset into the system 146 | LoadPlanAndBeamSet(patient, plan, beamSet1) 147 | 148 | # Create prescription, clinical goals and optimisation functions for the first VMAT beamset 149 | with CompositeAction('Add prescription, beams, clinical goals, optimization functions'): 150 | # add prescription 151 | beamSet1.AddDosePrescriptionToRoi(RoiName = ptvTSV, PrescriptionType = "AverageDose", DoseValue = defaultPrescDose, DoseVolume = 0, RelativePrescriptionLevel = 1) 152 | #set the planning isocenter to the centre of the reference ROI 153 | isocenter = patient.PatientModel.StructureSets[examinationName].RoiGeometries[ptvTSV].GetCenterOfRoi() 154 | # add two partial arc vmat fields around the ROI-based isocenter 155 | beamSet1.CreateArcBeam( 156 | Name = '1; 180_CC_0', 157 | Energy=defaultPhotonEn, 158 | CouchAngle = 0, 159 | GantryAngle = 179.9, 160 | CollimatorAngle = 30, 161 | ArcStopGantryAngle = 0.0, 162 | ArcDirectionRotation = 'CounterClockwise' 163 | Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z} 164 | ) 165 | beamSet2.CreateArcBeam( 166 | Name = '2; 180_CW_0', 167 | Energy=defaultPhotonEn, 168 | CouchAngle = 0, 169 | GantryAngle = 180.1, 170 | CollimatorAngle = 330, 171 | ArcStopGantryAngle = 0.0, 172 | ArcDirectionRotation = 'Clockwise' 173 | Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z} 174 | ) 175 | # import clinical goals from a predefined template 176 | plan.TreatmentCourse.EvaluationSetup.ApplyClinicalGoalTemplate(Template=db.TemplateTreatmentOptimizations[templateClinicalGoals]) 177 | # import optimization functions from a predefined template 178 | plan.PlanOptimizations[0].ApplyOptimizationTemplate(Template=db.TemplateTreatmentOptimizations[templateOptimizationFunctions]) 179 | 180 | 181 | # Save the current beamset 182 | patient.Save() 183 | 184 | # run optimization for the IMRT plan 185 | plan.PlanOptimizations[0].RunOptimization() 186 | 187 | # compute final dose 188 | beamSet1.ComputeDose(ComputeBeamDoses=True, DoseAlgorithm="CCDose", ForceRecompute=False) 189 | 190 | # Save final 191 | patient.Save() 192 | #end of AUTOPLAN 193 | 194 | 195 | -------------------------------------------------------------------------------- /Old_Prostate_Scripting/ProstC_78_39_7imrt.py: -------------------------------------------------------------------------------- 1 | from connect import * 2 | import os #file system libraries 3 | import sys #system libraries 4 | 5 | scriptsPath = 'F:/ManagedScripts' #set path to managed python scripts 6 | os.chdir(scriptsPath) #change path to managed python scripts 7 | 8 | #imports the module containing structure definitions and ROI-growing procedures 9 | from C_Prostata_Integning import * 10 | 11 | # Utility function to retrieve a unique plan name 12 | def UniquePlanName(name, pat): 13 | for p in pat.TreatmentPlans: 14 | if name == p.Name: 15 | name = name + '_1' 16 | name = UniquePlanName(name, pat) 17 | return name 18 | 19 | # Utility function that loads a plan and beam set into GUI 20 | def LoadPlanAndBeamSet(patient, plan, beamset): 21 | # load plan 22 | planFilter = {"Name":plan.Name} 23 | planInfos = patient.QueryPlanInfo(Filter = planFilter) 24 | if len(planInfos) != 1: 25 | raise Exception('Failed plan query (nr of plan infos = {0})'.format(len(planInfos))) 26 | patient.LoadPlan(PlanInfo = {"Name": "^" + plan.Name + "$"}) 27 | # load beam set 28 | beamsetInfos = plan.QueryBeamSetInfo(Filter = {"Name":beamset.DicomPlanLabel}) 29 | if len(beamsetInfos) != 1: 30 | raise Exception('Failed beam set query (nr of beam set infos = {0})'.format(len(beamsetInfos))) 31 | plan.LoadBeamSet(BeamSetInfo = beamsetInfos[0]) 32 | # end LoadPlanAndBeamSet 33 | 34 | 35 | # Define null filter 36 | filter = {} 37 | 38 | # Get handle to patient db 39 | db = get_current('PatientDB') 40 | 41 | # Define patient and examination handles 42 | patient = get_current('Patient') 43 | examination = get_current('Examination') 44 | 45 | # STUDY PREPARATION AND FOR ALL PROSTATE TYPES 46 | # -------------------------------------------- 47 | InitialiseDensityConversionTable() #this sets the table to "HR_OEB HUsetting" 48 | 49 | CreateExternalBodyContour() #this draws an external contour called "External" 50 | 51 | AutosegmentFemurAndBladder() #autosegments 'OR; Cap fem dex', 'OR; Cap fem sin' and 'OR; Blaere' 52 | 53 | CreateWallHvRectum() #creates the cylindrical help volume around 'OR; Rectum' 54 | 55 | OverrideFiducialsDensity() #over-rides density around fiducial markers (max of 6 seeds) 56 | 57 | patient.Save() 58 | 59 | # 60 | # 61 | # DEFINE THE STANDARD PLANNING AND PRESCRIPTION PARAMETERS 62 | defaultLinac = 'LW_Agility_VMAT' #standard linac beam model for dose planning 63 | defaultDoseGrid = 0.25 #isotropic dose grid dimension 64 | defaultPhotonEn = 6 #standard photon beam modality in units of MV 65 | defaultPrescDose = 7800 #the absolute prescribed dose in cGy 66 | defaultFractions = 39 #standard number of fractions 67 | 68 | # DEFINE THE NAMES OF THE STANDARD CLINICAL GOALS AND OPTIMIZATION FUNCTIONS 69 | templateClinicalGoals = 'Pros C - Clinical Goals' 70 | templateOptimizationFunctions = 'Pros C - Objective Functions' 71 | #templateOptimizationFunctions = 'Pros C - MCO Tradeoffs' #the other alternative is MCO 72 | # 73 | # names of the other clinical goals and optimisation templates 74 | #templateClinicalGoals = 'Pros B - Clinical Goals' 75 | #templateClinicalGoals = 'Pros N - Clinical Goals' 76 | #templateClinicalGoals = 'Pros S - Clinical Goals' 77 | 78 | # NOTE A TEMPLATE BEAMSET IS NOT DEFINED THROUGH A FUNCTION CALL TO APPLY A TEMPLATE 79 | # but rather each field in the beamset has been explicitly defined using 80 | # the 'CreatePhotonBeam' method acting on a BeamSet instance - see lines in script 81 | 82 | # Define plan set and beam set and density dataset handles 83 | planName = 'ProstC_78_39' 84 | planName = UniquePlanName(planName, patient) #auto-generate a unique plan name if ProstC_78_39 already exists 85 | 86 | beamSetPrimaryName = 'Primaer' #name of the primary beamset 87 | beamSetBoostName = 'Boost' #where necessary the name of the dependent boost beamset 88 | 89 | examinationName = examination.Name #name of the current examination 90 | 91 | # GROW PLANNING VOLUMES AND STANDARD MARGINS FOR PROSTATA TYPE C 92 | # -------------------------------------------------------------- 93 | CreateMarginPtvT() #used for all prostate types 94 | 95 | CreateComplementBladderPtvT() #used for all prostate types 96 | 97 | CreateComplementRectumPtvT() #used for all prostate types 98 | 99 | CreateWallPtvT() #used for all prostate types 100 | 101 | CreateComplementExternalPtvT() #all prostate types 102 | 103 | CreateMarginPtvSV() #all prostate types except Type A 104 | 105 | CreateUnionPtvTSV() #all prostate types except Type A 106 | 107 | CreateComplementBladderPtvTSV() #all prostate types except Type A 108 | 109 | CreateComplementRectumPtvTSV() #all prostate types except Type A 110 | 111 | CreateWallPtvTSV() #all prostate types except Type A 112 | 113 | CreateComplementExternalPtvTSV() #all prostate types except Type A 114 | 115 | #CreateMarginPtvE() #only for Type N+ 116 | #CreateTransitionPtvTsvPtvE() #only for Type N+ 117 | #CreateComplementPtvTsvPtvE() #only for Type N+ 118 | #CreateComplementBladderPtvE() #only for Type N+ 119 | #CreateComplementRectumPtvE() #only for Type N+ 120 | #CreateComplementBowelPtvTSV() #only for Type N+ 121 | #CreateComplementBowelPtvE() #only for Type N+ 122 | #CreateWallPtvE() #only for Type N+ 123 | #CreateComplementExternalPtvE() #only for Type N+ 124 | 125 | # HELP VOLUME PREPARATION COMPLETE - save the active plan 126 | patient.Save() 127 | 128 | 129 | # Setup a standard IMRT protocol plan 130 | with CompositeAction('Adding IMRT beams for name {0} '.format(planName)): 131 | # add plan 132 | plan = patient.AddNewPlan(PlanName=planName, Comment="Prostate IMRT auto-plan", ExaminationName=examinationName) 133 | # set standard dose grid size 134 | plan.SetDefaultDoseGrid(VoxelSize={'x':defaultDoseGrid, 'y':defaultDoseGrid, 'z':defaultDoseGrid}) 135 | # add beam set 136 | beamSet1 = plan.AddNewBeamSet(Name = beamSetPrimaryName, ExaminationName = examinationName, 137 | MachineName = defaultLinac, NominalEnergy = None, Modality = "Photons", 138 | TreatmentTechnique = "SMLC", PatientPosition = "HeadFirstSupine", NumberOfFractions = defaultFractions, 139 | CreateSetupBeams = False) 140 | 141 | # Save the current patient 142 | patient.Save() 143 | 144 | # Load the plan and first beamset into the system 145 | LoadPlanAndBeamSet(patient, plan, beamSet1) 146 | 147 | 148 | # Create prescription, clinical goals and optimisation functions for the first IMRT beamset 149 | with CompositeAction('Add prescription, beams, clinical goals, optimization functions'): 150 | # add prescription 151 | beamSet1.AddDosePrescriptionToRoi(RoiName = ptvTSV, PrescriptionType = "AverageDose", DoseValue = defaultPrescDose, DoseVolume = 0, RelativePrescriptionLevel = 1) 152 | #set the planning isocenter to the centre of the reference ROI 153 | isocenter = patient.PatientModel.StructureSets[examinationName].RoiGeometries[ptvTSV].GetCenterOfRoi() 154 | # add 7 static IMRT fields around the ROI-based isocenter 155 | beamSetImrt.CreatePhotonBeam(Name = '1; T154A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 154, CollimatorAngle = 15, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 156 | beamSetImrt.CreatePhotonBeam(Name = '2; T102A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 102, CollimatorAngle = 345, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 157 | beamSetImrt.CreatePhotonBeam(Name = '3; T050A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 50, CollimatorAngle = 45, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 158 | beamSetImrt.CreatePhotonBeam(Name = '4; T206A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 206, CollimatorAngle = 345, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 159 | beamSetImrt.CreatePhotonBeam(Name = '5; T258A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 258, CollimatorAngle = 15, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 160 | beamSetImrt.CreatePhotonBeam(Name = '6; T310A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 310, CollimatorAngle = 315, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 161 | beamSetImrt.CreatePhotonBeam(Name = '7; T000A', Energy=defaultPhotonEn, CouchAngle = 0, GantryAngle = 0, CollimatorAngle = 0, Isocenter = {'x':isocenter.x, 'y':isocenter.y, 'z':isocenter.z}) 162 | # import clinical goals from a predefined template 163 | plan.TreatmentCourse.EvaluationSetup.ApplyClinicalGoalTemplate(Template=db.TemplateTreatmentOptimizations[templateClinicalGoals]) 164 | # import optimization functions from a predefined template 165 | plan.PlanOptimizations[0].ApplyOptimizationTemplate(Template=db.TemplateTreatmentOptimizations[templateOptimizationFunctions]) 166 | 167 | # Save the current beamset 168 | patient.Save() 169 | 170 | # run optimization for the IMRT plan 171 | plan.PlanOptimizations[0].RunOptimization() 172 | 173 | # compute final dose 174 | beamSet1.ComputeDose(ComputeBeamDoses=True, DoseAlgorithm="CCDose", ForceRecompute=False) 175 | 176 | # Save final 177 | patient.Save() 178 | #end of AUTOPLAN 179 | 180 | 181 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Raystation_Scripting 2 | Scripts developed by Leonard Wee for the Raystation v4.7.2 Treatment Planning System 3 | -------------------------------------------------------------------------------- /Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/Thumbs.db -------------------------------------------------------------------------------- /couchModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weeleon/repo_Raystation_Scripting/791c2ee9a752ada2bdb58e16d08b6e28bc765b64/couchModel.png -------------------------------------------------------------------------------- /excel.py: -------------------------------------------------------------------------------- 1 | import clr, sys 2 | from connect import * 3 | 4 | clr.AddReference("Office") 5 | clr.AddReference("Microsoft.Office.Interop.Excel") 6 | 7 | import Microsoft.Office.Interop.Excel as interop_excel 8 | 9 | import System.Array 10 | 11 | 12 | #open an excel worksheet 13 | excel = interop_excel.ApplicationClass(Visible = True) 14 | wbook = excel.Workbooks.Add(interop_excel.XlWBATemplate.xlWBATWorksheet) 15 | 16 | wsheet = wbook.Worksheets[1] 17 | 18 | def create_array(m,n): 19 | dims = System.Array.CreateInstance(System.Int32,2) 20 | dims[0] = m 21 | dims[1] = n 22 | return System.Array.CreateInstance(System.Object, dims) 23 | 24 | 25 | # from connect get required handles 26 | patient_db = get_current('PatientDB') 27 | 28 | try: 29 | patient = get_current('Patient') 30 | except: 31 | print 'There does not appear to be an active patient - exiting system' 32 | sys.exit() 33 | 34 | 35 | # initialise patient header 36 | patname_head = create_array(2,1) 37 | patname_head[0,0] = patient.PatientName 38 | patname_head[1,0] = patient.PatientID 39 | # add patient header to worksheet 40 | startcell = wsheet.Cells(1,1) 41 | patname_range = wsheet.Range(startcell,startcell.Cells(patname_head.GetLength(0),patname_head.GetLength(1))) 42 | patname_range.Value = patname_head 43 | # initialise worksheet header 44 | header_row = create_array(1,10) 45 | header_row[0,0] = 'ROI' 46 | header_row[0,1] = 'Volume (cc)' 47 | header_row[0,2] = 'D99 (cGy)' 48 | header_row[0,3] = 'D98 (cGy)' 49 | header_row[0,4] = 'D95 (cGy)' 50 | header_row[0,5] = 'Average (cGy)' 51 | header_row[0,6] = 'D50 (cGy)' 52 | header_row[0,7] = 'D2 (cGy)' 53 | header_row[0,8] = 'D1 (cGy)' 54 | header_row[0,9] = 'Plan.Name' 55 | # add header to worksheet 56 | startcell = wsheet.Cells(3,1) 57 | header_range = wsheet.Range(startcell,startcell.Cells(header_row.GetLength(0),header_row.GetLength(1))) 58 | header_range.Value = header_row 59 | 60 | 61 | #loop over all plans in the patient root 62 | p = 0 63 | startrow = 4 64 | while p < patient.TreatmentPlans.Count: 65 | #do something over all plans belonging to this patient 66 | plan = patient.TreatmentPlans[p] 67 | # --- do what? 68 | planName = plan.Name 69 | # initialise ROI list 70 | rois = plan.GetStructureSet() 71 | roi_names = [r.OfRoi.Name for r in rois.RoiGeometries if r.PrimaryShape != None] 72 | #generate data table 73 | data_table = create_array(len(roi_names),10) 74 | for i,r in enumerate(roi_names): 75 | volume = patient.PatientModel.StructureSets[0].RoiGeometries[r].GetRoiVolume() 76 | d99, d98, d95, d50, d2, d1 = plan.TreatmentCourse.TotalDose.GetDoseAtRelativeVolumes(RoiName = r, RelativeVolumes = [0.99,0.98,0.95,0.50,0.02,0.01]) 77 | average = plan.TreatmentCourse.TotalDose.GetDoseStatistic(RoiName = r, DoseType = 'Average') 78 | data_table[i,0] = r 79 | data_table[i,1] = volume 80 | data_table[i,2] = d99 81 | data_table[i,3] = d98 82 | data_table[i,4] = d95 83 | data_table[i,5] = average 84 | data_table[i,6] = d50 85 | data_table[i,7] = d2 86 | data_table[i,8] = d1 87 | data_table[i,9] = planName 88 | # add data table to the open worksheet 89 | startcell = wsheet.Cells(startrow,1) 90 | data_range = wsheet.Range(startcell,startcell.Cells(data_table.GetLength(0),data_table.GetLength(1))) 91 | data_range.Value = data_table 92 | startrow += len(roi_names) 93 | # increment counter 94 | p += 1 95 | 96 | 97 | 98 | 99 | #final touch is to autofit all column widths 100 | wsheet.Columns.AutoFit() 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /interface.py: -------------------------------------------------------------------------------- 1 | from connect import * 2 | 3 | import clr #.NET common Language runtime 4 | # add references to Windows Forms and Drawing libraries 5 | clr.AddReference("System.Windows.Forms") 6 | clr.AddReference("System.Drawing") 7 | # import classes from the libraries 8 | from System.Drawing import Point 9 | from System.Windows.Forms import Application, Button, Form, Label, TextBox, CheckBox, ComboBox, RadioButton 10 | 11 | class MyForm(Form): 12 | # new class inherits from Form 13 | def __init__(self): 14 | self.patient = patient 15 | self.Text = 'My Form' #title of the new format 16 | self.AutoSize = True 17 | labelX1 = Label() 18 | labelX2 = Label() 19 | labelX1.Text = 'What is' 20 | labelX2.Text = 'this?' 21 | labelX1.Location = Point(15,28) 22 | labelX2.Location = Point(120,28) 23 | labelX1.Width = 50 24 | labelX2.Width = 50 25 | labelX1.Height = 20 26 | labelX2.Height = 40 27 | self.Controls.Add(labelX1) 28 | self.Controls.Add(labelX2) 29 | # create a textbox property of the form 30 | self.textbox1 = TextBox() 31 | self.textbox1.Location = Point(50,200) 32 | self.textbox1.Width = 120 33 | self.textbox1.Height = 50 34 | self.Controls.Add(self.textbox1) 35 | # implement an interaction button 36 | self.button1 = Button() 37 | self.button1.Text = "Auto-fill current patient name" 38 | self.button1.Location = Point(50, 120) 39 | self.button1.Width = 150 40 | self.button1.Height = 45 41 | self.Controls.Add(self.button1) 42 | self.button1.Click += self.button1_clicked 43 | # add checklist question 44 | self.question1 = Label() 45 | self.question1.Text = "Which actions have you finished so far?" 46 | self.question1.Location = Point(15,280) 47 | self.question1.AutoSize = True 48 | self.Controls.Add(self.question1) 49 | # first checkbox 50 | self.check1 = CheckBox() 51 | self.check1.Text = "Patient modelling" 52 | self.check1.Location = Point(20,310) 53 | self.check1.AutoSize = True 54 | self.check1.Checked = False 55 | self.Controls.Add(self.check1) 56 | self.check1.CheckedChanged += self.checkedChanged 57 | # second checkbox 58 | self.check2 = CheckBox() 59 | self.check2.Text = "Plan design" 60 | self.check2.Location = Point(20,340) 61 | self.check2.AutoSize = True 62 | self.check2.Checked = False 63 | self.Controls.Add(self.check2) 64 | self.check2.CheckedChanged += self.checkedChanged 65 | # add checklist response message 66 | self.response1 = Label() 67 | self.response1.Text = "-" 68 | self.response1.Location = Point(160,340) 69 | self.response1.AutoSize = True 70 | self.Controls.Add(self.response1) 71 | # generate combobox 72 | self.question2 = Label() 73 | self.question2.Text = "Select an ROI" 74 | self.question2.Location = Point(320,310) 75 | self.question2.AutoSize = True 76 | self.Controls.Add(self.question2) 77 | rois = [r.Name for r in patient.PatientModel.RegionsOfInterest] 78 | self.combobox = ComboBox() 79 | self.combobox.Location = Point(320,340) 80 | self.combobox.DataSource = rois 81 | self.Controls.Add(self.combobox) 82 | self.combobox.SelectionChangeCommitted += self.comboSelection 83 | # generate combobox response 84 | self.response2 = Label() 85 | self.response2.Text = "" 86 | self.response2.Location = Point(320,380) 87 | self.response2.AutoSize = True 88 | self.Controls.Add(self.response2) 89 | 90 | # sub action based on clicking the button 91 | def button1_clicked(self, sender, event): 92 | #sender and event are dummy for the moment 93 | self.textbox1.Text = patient.PatientName 94 | 95 | # sub action based on status of the checkboxes 96 | def checkedChanged(self, sender, event): 97 | if (self.check1.Checked == True) & (self.check2.Checked == True) : 98 | self.response1.Text = "Ready to plan" 99 | else: 100 | self.response1.Text = "-" 101 | 102 | # sub action based on combo selection committed 103 | def comboSelection(self, sender, event): 104 | selectedRoi = self.combobox.SelectedItem 105 | roiVolume = patient.PatientModel.StructureSets['CT 1'].RoiGeometries[selectedRoi].GetRoiVolume() 106 | self.response2.Text = "The volume of the selected ROI "+format(roiVolume)+" cm^3." 107 | 108 | 109 | 110 | 111 | 112 | 113 | #patient_db = get_current('PatientDB') 114 | #myPath = r'S:/Patients' 115 | #patient = get_current("Patient") 116 | #examination = get_current("Examination") 117 | 118 | # grab name of current patient 119 | # catch and throw an exception if there is no active patient 120 | try: 121 | patient = get_current("Patient") 122 | except SystemError: 123 | raise IOError("No patient currently loaded.") 124 | 125 | form = MyForm() 126 | Application.Run(form) 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /mdixonSplit.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Fri Jul 8 12:42:56 2016 4 | 5 | @author: lenw 6 | """ 7 | 8 | import dicom 9 | import numpy as np 10 | import os 11 | 12 | def SplitMDixonInSubSequences(dir): 13 | #splits a 4-sequence mDixon group into individual examinations 14 | #by appending a new suffix to the series instance UID in dicom header 15 | #field (0x20,0x0e) 16 | os.chdir(dir) 17 | listOfFiles = [fn for fn in os.listdir('.') if fn.startswith('MR')] 18 | for fn in listOfFiles : 19 | this = dicom.read_file(fn) 20 | mdTag = this[0x08,0x0008].value[3] #gets the mDixon type tag 21 | oldSeries = this[0x08,0x103e].value #gets the series description 22 | newSeries = oldSeries + mdTag #sets the new series description 23 | this[0x08,0x103e].value = newSeries #overrides the series description 24 | oldSeriesUID = this[0x20,0x000e].value #gets the current Series UID 25 | if (mdTag == 'F'): 26 | this[0x20,0x000e].value = oldSeriesUID + '.1' 27 | if (mdTag == 'IP'): 28 | this[0x20,0x000e].value = oldSeriesUID + '.2' 29 | if (mdTag == 'OP'): 30 | this[0x20,0x000e].value = oldSeriesUID + '.3' 31 | if (mdTag == 'W'): 32 | this[0x20,0x000e].value = oldSeriesUID + '.4' 33 | this.save_as(mdTag+'-'+fn) 34 | 35 | 36 | SplitMDixonInSubSequences('/Users/lenw/Dropbox/Public/mDixon') 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | def GetImageHistogram(dims, datatype, filelist, mtag): 45 | sliceCount = 0 46 | arrayImage = np.zeros(dims,dtype=datatype) 47 | for fn in filelist : 48 | this = dicom.read_file(fn) 49 | mdTag = this[0x08,0x0008].value[3] #gets the mDixon type tag 50 | if (mdTag == mtag): 51 | arrayImage[:, :, int(sliceCount)] = this.pixel_array 52 | sliceCount = sliceCount + 1 53 | binEdge = np.amax(arrayImage) + 1 54 | arrayHisto = np.histogram(arrayImage,bins=np.arange(1,binEdge)) 55 | temp = arrayHisto[0].tolist() 56 | return(temp) 57 | 58 | 59 | def SaveHistoToFile(hp, name, listdata): 60 | fname = hp + name + '.txt' 61 | outfile = open(fname,'w') 62 | for i in listdata: 63 | outfile.write("%d\n" % i) 64 | 65 | histoPath = '/Users/lenw/Documents/Clinical_Studies/Vejle_Projects/mr-normal-histograms/' 66 | work = '/Volumes/CODONICS/DICOM/ST000000' 67 | 68 | os.chdir(work + '/SE000007') 69 | listOfFiles = [fn for fn in os.listdir('.') if fn.startswith('MR')] 70 | numberOfFiles = len(listOfFiles) 71 | numberOfSlices = int(numberOfFiles / 4) 72 | 73 | ref = dicom.read_file(listOfFiles[0]) #examine only the first file 74 | pixelDims = ( int(ref.Rows),int(ref.Columns), numberOfSlices ) 75 | pixelSpacing = ( float(ref.PixelSpacing[0]), float(ref.PixelSpacing[1]), float(ref.SliceThickness) ) 76 | dataImageType = ref.pixel_array.dtype 77 | 78 | histoIP = GetImageHistogram(pixelDims, dataImageType, listOfFiles, 'IP') 79 | SaveHistoToFile(histoPath, 'IP_1', histoIP) 80 | 81 | histoW = GetImageHistogram(pixelDims, dataImageType, listOfFiles, 'W') 82 | SaveHistoToFile(histoPath, 'W_1', histoW) 83 | 84 | histoOP = GetImageHistogram(pixelDims, dataImageType, listOfFiles, 'OP') 85 | SaveHistoToFile(histoPath, 'OP_1', histoOP) 86 | 87 | histoF = GetImageHistogram(pixelDims, dataImageType, listOfFiles, 'F') 88 | SaveHistoToFile(histoPath, 'F_1', histoF) 89 | 90 | 91 | os.chdir(work + '/SE000003') 92 | listOfFiles = [fn for fn in os.listdir('.') if fn.startswith('MR')] 93 | numberOfFiles = len(listOfFiles) 94 | numberOfSlices = numberOfFiles 95 | 96 | ref = dicom.read_file(listOfFiles[0]) #examine only the first file 97 | pixelDims = ( int(ref.Rows),int(ref.Columns), numberOfSlices ) 98 | pixelSpacing = ( float(ref.PixelSpacing[0]), float(ref.PixelSpacing[1]), float(ref.SliceThickness) ) 99 | dataImageType = ref.pixel_array.dtype 100 | 101 | histoT2 = GetImageHistogram(pixelDims, dataImageType, listOfFiles, 'M') 102 | SaveHistoToFile(histoPath, 'TSE_1', histoT2) 103 | 104 | 105 | d = '/Volumes/CODONICS/DICOM/ST000000/SE000003' 106 | test = dicom.read_file(d+'/MR000000') 107 | test.SeriesDescription 108 | 109 | test.SliceThickness 110 | len( [fn for fn in os.listdir(d) if fn.startswith('MR')] ) 111 | 112 | -------------------------------------------------------------------------------- /rectiTest1.py: -------------------------------------------------------------------------------- 1 | # Script recorded 03 Feb 2016 2 | 3 | # RayStation version: 4.7.2.5 4 | # Selected patient: ... 5 | 6 | from connect import * 7 | 8 | #example of a path query 9 | patient_db = get_current('PatientDB') 10 | myPath = r'S:/Patients' 11 | myFilter = {} 12 | query = patient_db.QueryPatientsFromPath(Path=myPath, Filter=myFilter) 13 | for i, q in enumerate(query): 14 | print i,query[i]['Name'] 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | #user specific environment 23 | clinicGridResolution = { 'x': 0.25, 'y': 0.25, 'z': 0.25 } 24 | clinicMachineName = "ElektaAgility" 25 | clinicMachineCT = "CT 1" 26 | 27 | #define data structure 28 | patient = get_current("Patient") 29 | examination = get_current("Examination") 30 | 31 | 32 | 33 | def UniquePlanName(name, pat): 34 | for p in pat.TreatmentPlans: 35 | if name == p.Name: 36 | name = name + '_1' 37 | name = UniquePlanName(name, pat) 38 | return name 39 | #conclude function def 40 | 41 | #initialise plan name 42 | myPlanName = 'Recti_2arc' 43 | myPlanName = UniquePlanName(myPlanName, patient) 44 | myExaminationName = examination.Name 45 | myPlanIso = patient.PatientModel.StructureSets[myExaminationName].RoiGeometries['PTV'].GetCenterOfRoi() 46 | #note expando object here 47 | 48 | 49 | 50 | with CompositeAction('Add Treatment plan'): 51 | retval_0 = patient.AddNewPlan(PlanName=myPlanName, PlannedBy="", Comment="", ExaminationName=clinicMachineCT, AllowDuplicateNames=False) 52 | retval_0.SetDefaultDoseGrid(VoxelSize=clinicGridResolution) 53 | retval_1 = retval_0.AddNewBeamSet(Name="Beam_1", ExaminationName=clinicMachineCT, MachineName=clinicMachineName, NominalEnergy=None, Modality="Photons", TreatmentTechnique="VMAT", PatientPosition="HeadFirstSupine", NumberOfFractions=28, CreateSetupBeams=False, UseLocalizationPointAsSetupIsocenter=False, Comment="") 54 | retval_1.AddDosePrescriptionToRoi(RoiName="PTV", DoseVolume=0, PrescriptionType="AverageDose", DoseValue=5040, RelativePrescriptionLevel=1, AutoScaleDose=False) 55 | retval_1.CreateArcBeam(ArcStopGantryAngle=180.1, ArcRotationDirection="CounterClockwise", Energy=6, MachineCone=None, Isocenter={ 'x': myPlanIso.x, 'y': myPlanIso.y, 'z': myPlanIso.z }, Name="VMAT_1", Description="", GantryAngle=179.9, CouchAngle=0, CollimatorAngle=45, ApertureBlock=None) 56 | retval_1.CreateArcBeam(ArcStopGantryAngle=179.9, ArcRotationDirection="Clockwise", Energy=6, MachineCone=None, Isocenter={ 'x': myPlanIso.x, 'y': myPlanIso.y, 'z': myPlanIso.z }, Name="VMAT_2", Description="", GantryAngle=180.1, CouchAngle=0, CollimatorAngle=315, ApertureBlock=None) 57 | # CompositeAction ends 58 | 59 | 60 | patient.Save() 61 | 62 | 63 | plan = patient.TreatmentPlans['Recti_2arc'] 64 | beamset = plan.BeamSets['Beam_1'] 65 | 66 | po = plan.PlanOptimizations[0].CreateMco() 67 | top = po.TemplateOptimizationProblem 68 | 69 | #first pareto function 70 | mcoFn1 = top.AddOptimizationFunction(RoiName='PTV', FunctionType='MinDvh') 71 | mcoFn1.DoseFunctionParameters.DoseLevel = 4980 72 | mcoFn1.DoseFunctionParameters.PercentVolume = 98.8 73 | 74 | # po = plan.PlanOptimizations[0] 75 | # poSetting = po.OptimizationParameters 76 | # poSetting.Algorithm.MaxNumberOfIterations = 80 77 | # poSetting.DoseCalculation.IterationsInPreparationsPhase = 10 78 | # poSetting.DoseCalculation.ComputeFinalDose = True 79 | # poSetting.DoseCalculation.ComputeIntermediateDose = True 80 | 81 | # #first objective function 82 | # function1 = po.AddOptimizationFunction(RoiName='PTV', FunctionType='MinDvh') 83 | # function1.DoseFunctionParameters.DoseLevel = 4980 84 | # function1.DoseFunctionParameters.PercentVolume = 98.8 85 | # function1.DoseFunctionParameters.Weight = 6000 86 | # #second objective function 87 | # function2 = po.AddOptimizationFunction(RoiName='PTV', FunctionType='MaxDvh') 88 | # function2.DoseFunctionParameters.DoseLevel = 5393 89 | # function2.DoseFunctionParameters.PercentVolume = 1 90 | # function2.DoseFunctionParameters.Weight = 1000 91 | # #external objective function 92 | # function3 = po.AddOptimizationFunction(RoiName='External', FunctionType='DoseFallOff') 93 | # function3.DoseFunctionParameters.HighDoseLevel = 5040 94 | # function3.DoseFunctionParameters.LowDoseLevel = 2500 95 | # function3.DoseFunctionParameters.LowDoseDistance = 2.4 96 | # function3.DoseFunctionParameters.Weight = 10 97 | # #constraining ring help volume 98 | # function4 = po.AddOptimizationFunction(RoiName='_R1', FunctionType='MaxEud') 99 | # function4.DoseFunctionParameters.DoseLevel = 4788 100 | # function4.DoseFunctionParameters.EudParameterA = 1 101 | # function4.DoseFunctionParameters.Weight = 50 102 | 103 | # patient.Save() 104 | 105 | 106 | 107 | 108 | # po.RunOptimization() 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /run_console_and_statetree.py: -------------------------------------------------------------------------------- 1 | # A script that runs the console and shows the state tree 2 | 3 | import os, sys, System, statetree 4 | from connect import * 5 | 6 | statetree.RunStateTree() 7 | 8 | ipyInstallPath = System.IO.Path.GetDirectoryName(System.Environment.GetCommandLineArgs()[0]) 9 | scriptInstallPath = System.IO.Path.GetDirectoryName(sys.argv[0]) 10 | os.chdir(scriptInstallPath) 11 | 12 | ironpython = r'\"' + ipyInstallPath + r'\ipy.exe\"' 13 | ironpythonargs = '-X:TabCompletion -X:ColorfulConsole -X:AutoIndent -X:Frames' 14 | 15 | setenv1 = 'set IRONPYTHONSTARTUP=console_startup.py' 16 | setenv2 = 'set RAYSTATION_PID="{0}"'.format(sys.argv[1]) 17 | 18 | title = 'RayStation Command Console' 19 | exitCmd = 'exit()' 20 | 21 | consolecmd = 'Tools\Console2\Console.exe -w "{0}" -r "/k {1} & {2} & ({3} {4}) & {5}"'.format(title, setenv1, setenv2, ironpython, ironpythonargs, exitCmd) 22 | os.system(consolecmd) 23 | --------------------------------------------------------------------------------