public Colorimeter() { imageSize = new Size(0, 0); m_rawImage = new ManagedImage(); m_processedImage = new ManagedImage(); m_camCtlDlg = new CameraControlDialog(); }
public FullImageWindow() { InitializeComponent(); this.Title = string.Format("FLIR Integrated Imaging Solutions. Zoom Demo. Tier {0}", (RenderCapability.Tier >> 16).ToString()); m_busmgr = new ManagedBusManager(); m_ctldlg = new CameraControlDialog(); m_selDlg = new CameraSelectionDialog(); m_image = new ManagedImage(); m_converted = new ManagedImage(); m_bitmap = new BitmapImage(); m_worker = new BackgroundWorker(); m_worker.WorkerReportsProgress = true; m_worker.DoWork += new DoWorkEventHandler(m_worker_DoWork); m_worker.ProgressChanged += new ProgressChangedEventHandler(m_worker_ProgressChanged); m_Done = new AutoResetEvent(false); RenderOptions.SetBitmapScalingMode(myImage, BitmapScalingMode.LowQuality); RenderOptions.SetEdgeMode(myImage, EdgeMode.Aliased); if (m_selDlg.ShowModal()) { ManagedPGRGuid[] guids = m_selDlg.GetSelectedCameraGuids(); // Determine camera interface var interfaceType = m_busmgr.GetInterfaceTypeFromGuid(guids[0]); if (interfaceType == InterfaceType.GigE) { m_cam = new ManagedGigECamera(); } else { m_cam = new ManagedCamera(); } // Connect to camera object m_cam.Connect(guids[0]); // Connect control dialog m_ctldlg.Connect(m_cam); // Start capturing m_cam.StartCapture(); btn_nearfast.IsChecked = true; WorkerHelper helper = new WorkerHelper(); helper.converted = m_converted; helper.raw = m_image; helper.cam = m_cam; m_continue = true; m_worker.RunWorkerAsync(helper); } else { Application.Current.Shutdown(); } }
/// <summary> /// Open dialog box for setting camera properties /// </summary> public void ShowPropertiesDlg() { CameraControlDialog camCtlDlg = new CameraControlDialog(); camCtlDlg.Connect(this.camera); camCtlDlg.ShowModal(); GigEImageSettings config = this.camera.GetGigEImageSettings(); this.PixelWidth = config.width; this.PixelHeight = config.height; }
public VideoStreamProcessor(Common_ViewModel commVM, Calculation_ViewModel calcVM, Stroboscope_ViewModel strobeVM, HDRI_ViewModel hdriVM) { m_commonViewModel = commVM; m_calculationsViewModel = calcVM; m_stroboscopeViewModel = strobeVM; m_HDRI_ViewModel = hdriVM; m_commonViewModel.Processor = this; m_calculationsViewModel.Processor = this; m_stroboscopeViewModel.Processor = this; m_HDRI_ViewModel.Processor = this; m_actions = new ConcurrentDictionary <string, ActionPresenter>(); m_isHereActionChangingResultImage = false; m_isContinue = false; m_threadsCoordinator = new AutoResetEvent(false); m_rawImg = new ManagedImage(); m_cameraCtrlDialog = new CameraControlDialog(); }