public void showROIShape(ROI r) { ROIList.Add(r); roiMode = null; activeROIidx = ROIList.Count - 1; viewController.repaint(); }
/// <summary> /// Sets the sign of a ROI object to the value 'mode' (MODE_ROI_NONE, /// MODE_ROI_POS,MODE_ROI_NEG) /// </summary> public void setROISign(int mode) { stateROI = mode; if (activeROIidx != -1) { ((ROI)ROIList[activeROIidx]).setOperatorFlag(stateROI); viewController.repaint(); NotifyRCObserver(ROIController.EVENT_CHANGED_ROI_SIGN); } }
/// <summary> /// Defines the initial settings for the window /// control. In the very beginning, the window control needs /// to know the view mode of the application form to perform /// the right behavior for incoming mouse events on the /// HALCON window. /// </summary> private void InteractiveForm_Load(object sender, System.EventArgs e) { String fileName = "patras"; HImage image; viewController = new HWndCtrl(viewPort); roiController = new ROIController(); viewController.useROIController(roiController); viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); try { image = new HImage(fileName); } catch(HOperatorException) { MessageBox.Show("Problem occured while reading file!", "InteractROIForm", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } viewController.addIconicVar(image); viewController.repaint(); }
/**************************************************************************/ /* Setup the GUI for the SmartWindow application **************************************************************************/ private void SmartWindowForm_Load(object sender, System.EventArgs e) { hWndControl = new HWndCtrl(viewPort); String fileName = "patras"; HImage image; try { image = new HImage(fileName); } catch(HOperatorException) { MessageBox.Show("Problem occured while reading file!", "SmartWindow2", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } hWndControl.addIconicVar(image); hWndControl.repaint(); }
// public void dispObject(HObject obj) { hWndControl.addIconicVar(obj); hWndControl.repaint(); }
public void SetROIList(ArrayList roiList) { ROIList = roiList; viewController.repaint(); }
public void AddROIShape(ROI r) //增加一个ROI到ROIlist中 { ROIList.Add(r); activeROIidx = ROIList.Count - 1; viewController.repaint(); }