/// <summary> /// /// </summary> /// <param name="e"></param> void OnImageDataLoadedEvent(ImageDataLoadedEventArgs e) { var mprImageModel = CreateMprImage(e.ImageVolumeGuid); // remove any MPRs vms from background layer BackgroundLayer.OfType <MprImageViewModel>() .ToList().ForEach(vm => BackgroundLayer.Remove(vm)); // create a new MPR vm var mprImageVm = _container.Resolve <MprImageViewModel>(); mprImageVm.SetPerformanceCounter(_backgroundLayerPerformance); mprImageVm.MprImageModel = mprImageModel; BackgroundLayer.Add(mprImageVm); // remove any isocurve vms from background layer PassiveLayer.OfType <IsocurveViewModel>() .ToList().ForEach(vm => PassiveLayer.Remove(vm)); // setup the isocurves var isocurveVm = _container.Resolve <IsocurveViewModel>(); isocurveVm.SetPerformanceCounter(_passiveLayerPerformance); isocurveVm.MprImageModel = mprImageModel; PassiveLayer.Add(isocurveVm); isocurveVm.PopulateIsocurveRange(10); // and perform the update UpdateAllRendered(DateTime.Now.Ticks); }
/// <summary> /// /// </summary> /// <param name="e"></param> void OnSetIsocurveLevel(SetIsocurveLevelEventArgs e) { // set the levels and setup var isocurveVm = PassiveLayer.OfType <IsocurveViewModel>().FirstOrDefault(); isocurveVm.PopulateIsocurveRange(e.Levels); // and perform updates UpdateAllRendered(DateTime.Now.Ticks); }