Ejemplo n.º 1
0
        public StereoImaging(IDisparitySolver disparitySolver, ICalibration cameraCalibration,
            ICameraImageConverter cameraImageConverter, IComponentConfiguration componentConfiguration)
        {
            calibration = cameraCalibration;
            disparity = disparitySolver;
            converter = cameraImageConverter;

            configuration = componentConfiguration;
            NewDisparityMap += OnNewDisparityMap;
        }
Ejemplo n.º 2
0
        public TargetViewModel(ITargetLocation targetModel, ITransformation transformation, ICalibration calibration, IACPC acpc)
        {
            _targetModel             = targetModel;
            _transformationInterface = transformation;
            _calibrationInterface    = calibration;
            _acpcInterface           = acpc;

            // subscribe to the event with the proper function
            // the event is TargetLocationChangedRas
            // the function when the event is fired is TargetModel_TargetLocationChangedRas
            _targetModel.TargetLocationChangedRas    += TargetModel_TargetLocationChangedRas;
            _targetModel.TargetAcPcEnabledChanged    += TargetModel_TargetAcPcEnabledChanged;
            _calibrationInterface.CalibrationChanged += CalibrationInterface_CalibrationChanged;
            _acpcInterface.ACPCLengthChanged         += ACPCInterface_ACPCLengthChanged;
            _acpcInterface.ACPCOriginUpdated         += ACPCInterface_ACPCOriginUpdated;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialization method calls calibration mechanism till finished
        /// At the end when calibration is finished it also sets IsInitialized property to True
        /// </summary>
        public override void Initialize()
        {
            if (!IsInitialized)
            {
                if (_calibration == null)
                {
                    _calibration = new CalibrationUnit(ImagingData);
                    SetMonitors();
                }

                _calibration.Calibrate(_currentFrame);

                if (_calibration.CurrentState.Equals(eCalibrationState.Finished))
                {
                    IsInitialized = true;
                }
            }
        }
Ejemplo n.º 4
0
        public MainViewModel(
            Dispatcher dispatcher,
            IEventAggregator eventAggregator,
            ISeriesSelectorController seriesSelectorController,
            IUiModeChanges uiModeModel,
            ITargetLocation targetModel,
            ITransformation transformationInterface,
            IStripsViewerLayoutController viewerLayoutController,
            ICalibration calibrationInterface,
            IMovementDetection movementDetectionModel,
            ILocateXD locateXDModel,
            IStripsManager stripsManager,
            IACPC acpcInterface,
            IRigidNPR rigidNPRInterface)
        {
            _dispatcher               = dispatcher;
            _eventAggregator          = eventAggregator;
            _seriesSelectorController = seriesSelectorController;

            _uiModeModel                        = uiModeModel;
            _uiModeModel.ModeChanged           += (s, a) => UiModeChanged?.Invoke(s, a);
            _uiModeModel.LayerVisiblityChanged += (s, a) => LayerVisibilityChanged?.Invoke(s, a);

            _viewerLayoutController = viewerLayoutController;
            _stripsManager          = stripsManager;
            _rigidNPR = rigidNPRInterface;

            ACPC = new TargetViewModel(targetModel, transformationInterface, calibrationInterface, acpcInterface);

            MD      = new MDViewModel(movementDetectionModel);
            XDCalib = new XDCalibViewModel(locateXDModel);

            SwitchLayoutCommand      = new DelegateCommand <StripsViewerLayout>(SwitchLayout);
            AppWorkingOcurredCommand = new DelegateCommand(() => _eventAggregator.GetEvent <AppWorkingEvent>().Publish());

            StripsViewerLayouts = new ObservableCollection <StripsViewerLayout>(_viewerLayoutController.Layouts);

            _seriesSelectorController.SeriesSelected += OnSeriesSelected;
            _stripsManager.Changed += OnStripsManagerChanged;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initialization method calls calibration mechanism till finished
        /// At the end when calibration is finished it also sets IsInitialized property to True
        /// </summary>
        public override void Initialize()
        {
            if (!IsInitialized)
            {
                if (_calibration == null)
                {
                    _calibration = new CalibrationUnit(ImagingData);
                    SetMonitors();
                }

                _calibration.Calibrate(_currentFrame);

                if (_calibration.CurrentState.Equals(eCalibrationState.Finished))
                    IsInitialized = true;
            }
        }