private void RefreshDataDisplay(List <ImageObject> imageObjs, bool doubleExposure, int beamon_num) { //ImgCapture.RotateImage(imageObjs); foreach (ImageObject imageObj in imageObjs) { ImgCapture.RotateImage(imageObj); ImageObject imgROI = ImageObject.GenerateImageROI(imageObj); imgROI.ImageData = imgROI.imageData; captureImagesNow.Add(imgROI); if (ImgCapture is CapturePKI) { CapturePKI imgCapturePKI = ImgCapture as CapturePKI; imgROI.SaveasHisFile(SaveFilePath, (int)imgCapturePKI.pki_config.integrationTime, imgCapturePKI.pki_config.imageCorrection); } } userControlMutiDicomImages.DrawImagesInPane(GetSmallBitmapList(captureImagesNow), true); if (captureImagesNow.Count <= 0) { Bitmap bm = new Bitmap(pictureBox1.Width, pictureBox1.Height); Graphics g = Graphics.FromImage(bm); g.Clear(Color.Black); g.Dispose(); pictureBox1.Image = bm; } }
private void gbCapture_Click(object sender, EventArgs e) { switch (ImgCapture.LinkStatus) { case PanelLinkStatus.NONE: break; case PanelLinkStatus.LINK_FAIL: cls_MessageBox.Show("Link error!", "Information"); return; case PanelLinkStatus.LINK_SUCCESS: break; case PanelLinkStatus.LINKING: cls_MessageBox.Show("It is connecting panel,Please wait a few minutes.", "Information"); return; default: cls_MessageBox.Show("No link status!", "Information"); return; } if (ImgCapture.WorkStatus) { if (cls_MessageBox.Show("Are you sure to stop capturing images", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes) { Application.DoEvents(); ImgCapture.Cancel(); } } else { if (ImgCapture is CapturePKI) { CapturePKI imgCapturePKI = ImgCapture as CapturePKI; imgCapturePKI.pki_config.gianMode = (CapturePKI.ElectricCapacityMode)comboBoxGainMode_Image.SelectedIndex; //imgCapturePKI.FrameCount = 1; imgCapturePKI.RefreshAcquisitionStructureParameters(); imgCapturePKI.pki_config.imageCorrection = CapturePKI.ImageCorrection.Offset; } if (this.ImgCapture is CaptureCareRay) { this.ImgCapture.SetCaptureMode(PanelCaptureMode.Single); (this.ImgCapture as CaptureCareRay).SetCorrection(true); } ImgCapture.Start(); } }
private void gbCapture_Click(object sender, EventArgs e) { switch (ImgCapture.LinkStatus) { case PanelLinkStatus.NONE: break; case PanelLinkStatus.LINK_FAIL: cls_MessageBox.Show("Link error!", "Information"); return; case PanelLinkStatus.LINK_SUCCESS: break; case PanelLinkStatus.LINKING: cls_MessageBox.Show("It is connecting panel,Please wait a few minutes.", "Information"); return; default: cls_MessageBox.Show("No link status!", "Information"); return; } //if (!(ImgCapture is CapturePKI)) //{ // cls_MessageBox.Show("Do not link panel!", "Information"); //} if (ImgCapture.WorkStatus) { if (cls_MessageBox.Show("Are you sure to stop capturing images", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes) { Application.DoEvents(); ImgCapture.Cancel(); } } else { if (ImgCapture is CapturePKI) { CapturePKI imgCapturePKI = ImgCapture as CapturePKI; SaveFilePath = CapturePub.SaveDFPath + "\\setup" + DateTime.Now.ToString("yyyy.MM.dd.hhmmss"); //imgCapturePKI.pki_config.captureImageMode = CapturePKI.PanelCaptureMode.Sequence; imgCapturePKI.DoseScaleMode = false; imgCapturePKI.RefreshAcquisitionStructureParameters(); } ImgCapture.Start(); } }