Mean dose
apichu opened this issue · comments
Hi
How to calculate mean dose?
Getting DVH Max, min and mean:
PlanSetup ps = context.PlanSetup;
DVHData dvh = ps.GetDVHCumulativeData(MyStructure, VMS.TPS.Common.Model.Types.DoseValuePresentation.Absolute, VMS.TPS.Common.Model.Types.VolumePresentation.Relative, 0.1);
var maxDose = dvh.MaxDose;
var minDose = dvh.MinDose;
var meanDose = dvh.MeanDose;
Thanks. But I need it Python (PyESAPI) code ?
Since pyesapi is a wrapper of C# interface (plus some extras), you can use nearly identical code. The types are exposed in pyesapi module, something like:
dvh = ps.GetDVHCumulativeData(structure, pyesapi.DoseValuePresentation.Absolute, pyesapi.VolumePresentation.Relative, 0.1)