예제 #1
0
 public static double GetVolumeAtDose(this PlanningItem pitem, Structure structure, DoseValue dose, VolumePresentation requestedVolumePresentation)
 {
     if (pitem is PlanSetup)
     {
         return(((PlanSetup)pitem).GetVolumeAtDose(structure, dose, requestedVolumePresentation));
     }
     else
     {
         DVHData dvh = pitem.GetDVHCumulativeData(structure, DoseValuePresentation.Absolute, requestedVolumePresentation, 0.001);
         return(DvhExtensions.VolumeAtDose(dvh, dose.Dose));
     }
 }
예제 #2
0
 public static DoseValue GetDoseAtVolume(this PlanningItem pitem, Structure structure, double volume, VolumePresentation volumePresentation, DoseValuePresentation requestedDosePresentation)
 {
     if (pitem is PlanSetup)
     {
         return(((PlanSetup)pitem).GetDoseAtVolume(structure, volume, volumePresentation, requestedDosePresentation));
     }
     else
     {
         if (requestedDosePresentation != DoseValuePresentation.Absolute)
         {
             throw new ApplicationException("Only absolute dose supported for Plan Sums");
         }
         DVHData dvh = pitem.GetDVHCumulativeData(structure, DoseValuePresentation.Absolute, volumePresentation, 0.001);
         return(DvhExtensions.DoseAtVolume(dvh, volume));
     }
 }