コード例 #1
0
        /// <summary>
        /// In the beginning, some initialization tasks are performed. 
        /// The control instances, like ROIController and WindowController,
        /// are initialized and registered with each other. Also, the
        /// delegates of the models are linked to update methods
        /// to get notified about changes.
        /// </summary>
        public MatchingForm()
        {
            InitializeComponent();

            mView = new HWndCtrl(viewPort);

            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);
        }