예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
            });
        }
예제 #4
0
 private void InvalidateAll()
 {
     AxialPanelModel.Invalidate();
     SagittalPanelModel.Invalidate();
     CoronalPanelModel.Invalidate();
 }