public DoseMetricView(PlanSetup planSetup, ESAPI_Methods eSAPI_Methods) { DoseMetricViewModel doseMetricViewModel = new DoseMetricViewModel(planSetup, eSAPI_Methodss); this.DataContext = doseMetricViewModel; InitializeComponent(); }
public DoseMetricViewModel(PlanSetup planSetup, ESAPI_Methods eSAPI_Methods) { _esapi = eSAPI_Methods; _planSetup = planSetup; Structures = new List <string>( _planSetup.StructureSet.Structures.Select(x => x.Id)); Metrics = new List <string>(Enum.GetNames(typeof(MetricType)).Cast <string>()); DQPs = new ObservableCollection <DVHMetric>(); AddMetric = new DelegateCommand(OnAddMetric, CanAddMetric); }
public void Execute(ScriptContext context, System.Windows.Window window, ScriptEnvironment environment) { // TODO : Add here the code that is called when the script is launched from Eclipse. PlanSetup planSetUp = context.PlanSetup; if (null == planSetUp) { MessageBox.Show("Please select one plan"); return; } // ESAPI function ESAPI_Methods eSAPI_Methods = new ESAPI_Methods(); DoseMetricView doseMetricView = new DoseMetricView(planSetUp, eSAPI_Methods); window.Content = doseMetricView; window.Title = "Dose Metric"; window.Width = 650; window.Height = 650; }