private void OnStructureSelectionChanged(StructureSelectionModel selStructure) { if (selStructure.bIsChecked) { //add to the plot model Structure s = _plan.StructureSet.Structures.FirstOrDefault(x => x.Id == selStructure.Id); DVHData dvh = _plan.GetDVHCumulativeData(s, DoseValuePresentation.Absolute, VolumePresentation.Relative, 1); if (dvh != null) { GeneratePlotSeries(s, dvh); } } else { //remove from teh plot model if (DVHPlotModel.Series.FirstOrDefault(x => x.Title == selStructure.Id) != null) { DVHPlotModel.Series.Remove(DVHPlotModel.Series.FirstOrDefault(x => x.Title == selStructure.Id)); } } DVHPlotModel.InvalidatePlot(true); }
private void OnRemoveStructure(StructureSelectionModel structure) { var series_structure = EQDPlotModel.Series.FirstOrDefault(x => x.Title == structure.StructureId); if (series_structure != null) { EQDPlotModel.Series.Remove(series_structure); EQDPlotModel.InvalidatePlot(true); } }
private void OnAddStructure(StructureSelectionModel structure) { var s = _plan.StructureSet.Structures.FirstOrDefault(x => x.Id == structure.StructureId); if (s != null) { var dvh = _plan.GetDVHCumulativeData(s, DoseValuePresentation.Absolute, VolumePresentation.Relative, 1); if (dvh != null) { EQDPlotModel.Series.Add(CreateDVHSeries(dvh, s, structure.ABRatio)); EQDPlotModel.InvalidatePlot(true); } } }