public void CreateNewPOI() { var poi = new PointOfInterest(); poi.Name = "New POI"; MessengerInstance.Send(new RTObjectAddedMessage <PointOfInterest>(poi)); AxialPanelModel.AddPOI(poi); CoronalPanelModel.AddPOI(poi); SagittalPanelModel.AddPOI(poi); }
public void CreateNewBeam() { var beam = new Beam(); beam.ControlPoints = new List <ControlPoint>(); beam.GantryStart = 0; beam.CollimatorAngle = 0; beam.Name = "New Beam"; if (Workspace.Workspace.Current.Points.GetList().Count == 0) { CreateNewPOI(); } beam.Isocentre = Workspace.Workspace.Current.Points.GetList().First(); MessengerInstance.Send(new RTObjectAddedMessage <Beam>(beam)); AxialPanelModel.AddBeam(beam); CoronalPanelModel.AddBeam(beam); SagittalPanelModel.AddBeam(beam); }
private void SubscribeToMessages() { //When we load a new image, render it MessengerInstance.Register <RTObjectAddedMessage <DicomImageObject> >(this, x => { AxialPanelModel.SetPrimaryImage(x.Value); SagittalPanelModel.SetPrimaryImage(x.Value); CoronalPanelModel.SetPrimaryImage(x.Value); InvalidateAll(); }); MessengerInstance.Register <RTObjectDeletedMessage <DicomImageObject> >(this, x => { AxialPanelModel.SetPrimaryImage(null); SagittalPanelModel.SetPrimaryImage(null); CoronalPanelModel.SetPrimaryImage(null); InvalidateAll(); }); MessengerInstance.Register <ROIsObjectRenderMessage>(this, x => { AxialPanelModel.AddROIs(x.AddedRois); AxialPanelModel.RemoveROIs(x.RemovedRois); SagittalPanelModel.AddROIs(x.AddedRois); SagittalPanelModel.RemoveROIs(x.RemovedRois); CoronalPanelModel.AddROIs(x.AddedRois); CoronalPanelModel.RemoveROIs(x.RemovedRois); }); MessengerInstance.Register <NotificationMessage>(this, x => { MessageBox.Show(x.Notification); }); //When the dose render options are changed... MessengerInstance.Register <DoseRenderQualityChanged>(this, x => { ChangeDoseRenderOptions(x.Options); }); }
private void InvalidateAll() { AxialPanelModel.Invalidate(); SagittalPanelModel.Invalidate(); CoronalPanelModel.Invalidate(); }