Exemple #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
        }
Exemple #2
0
 /// <summary>
 /// Registers an instance of an ROIController with this window
 /// controller (and vice versa).
 /// </summary>
 /// <param name="rC">
 /// Controller that manages interactive ROIs for the HALCON window
 /// </param>
 public void useROIController(ROIController rC)
 {
     roiManager = rC;
     rC.setViewController(this);
 }