예제 #1
0
        public CCDShow()
        {
            InitializeComponent();
            m_configFile = Application.StartupPath + "\\CONFIG\\config.ini";
            #region 初始化halcon模块
            mView = new HWndCtrl(this.hWindowControl_Player);

            createModelWindowMode = Color.RoyalBlue;
            trainModelWindowMode  = Color.Chartreuse;

            roiController = new ROIController();
            mView.useROIController(roiController);

            roiController.setROISign(ROIController.MODE_ROI_POS);

            mView.NotifyIconObserver       = new IconicDelegate(UpdateViewData);
            roiController.NotifyRCObserver = new IconicDelegate(UpdateViewData);

            mView.setViewState(HWndCtrl.MODE_VIEW_NONE);
            locked       = true;
            parameterSet = new MatchingParam();
            Init(parameterSet);
            locked = false;

            mAssistant = new MatchingAssistant(parameterSet);
            mAssistant.NotifyIconObserver = new MatchingDelegate(UpdateMatching);
            //mAssistant.NotifyParamObserver = new AutoParamDelegate(UpdateButton);

            speedOptHandler = new MatchingOptSpeed(mAssistant, parameterSet);
            speedOptHandler.NotifyStatisticsObserver = new StatisticsDelegate(UpdateStatisticsData);

            inspectOptHandler = new MatchingOptStatistics(mAssistant, parameterSet);
            inspectOptHandler.NotifyStatisticsObserver = new StatisticsDelegate(UpdateStatisticsData);
            #endregion
        }
예제 #2
0
 /// <summary>Registers the HWndCtrl to this ROIController instance</summary>
 public void setViewController(HWndCtrl view)
 {
     viewController = view;
 }