private void FillOptimalFluences() { foreach (Beam b in beams.Where(x => !x.IsSetupField)) { Fluence fluence = b.GetOptimalFluence(); if (fluence != null) { float[,] pixels = fluence.GetPixels(); var SizeX = fluence.XSizePixel; var SizeY = fluence.YSizePixel; int stride = SizeY * 3 + (SizeY % 4); BitmapSource bms = DrawImage(fluence); OptimalFluences.Add(new OptimalFluenceModel { FieldId = b.Id, OptimalFluenceMap = bms }); } } }
private bool CanPrint() { return(OptimalFluences.Count() != null); }