Export DVH in tabular format

Sep 1, 2016 at 11:51 AM
From File > Export > DVH in Tabular format, one can export DVH for selected structures into a single text file. I have been using the R package RadOnc to load these DVH for analysis. I have a single dummy patient containing 40 plans and I wish to write a script to export the DVH in this way for all structures in the 40 plans. I cannot find a way to do this via scripting? Any advice appreciated
Sep 10, 2016 at 9:22 PM
Look at the GetDVHCumulativeData method of the PlanningItem class (the parent class of PlanSetup and PlanSum). It returns a DVHData object that contains the CurveData property, which represents the DVH itself.
Sep 11, 2016 at 11:31 PM
I wrote a Python script to do what you asked. It's on my GitHub account as export-dvh. I also wrote a blog post describing the script in more detail: Export DVHs to a CSV File Using Python. I hope it helps!
Sep 23, 2016 at 1:01 PM
Excellent thanks for the script, I will try it out soon. Using python certainly looks preferable to C#..!
Oct 19, 2016 at 2:51 PM
I am now just exporting the dose.dcm files, importing with dicompyler-core (https://github.com/dicompyler/dicompyler-core), and doing my analysis there. Cheers!