public ImageProcessing(
     IBitmapConverter bitmapConverter,
     IFileInputOutputHelper fileInputOutputHelper)
 {
     _bitmapConverter       = bitmapConverter;
     _fileInputOutputHelper = fileInputOutputHelper;
 }
예제 #2
0
 public CameraService(IDialogService dialogService,
                      ICameraRotationHelper cameraRotationHelper,
                      IBitmapConverter bitmapConverter,
                      ILoggingService loggingService)
 {
     _dialogService        = dialogService;
     _cameraRotationHelper = cameraRotationHelper;
     _bitmapConverter      = bitmapConverter;
     _loggingService       = loggingService;
 }
 private void SetUp()
 {
     _navigationService           = Substitute.For <INavigationService>();
     _cameraService               = Substitute.For <ICameraService>();
     _bitmapConverter             = Substitute.For <IBitmapConverter>();
     _pictureService              = Substitute.For <IPictureService>();
     _locationSnapshotDataService = Substitute.For <ILocationSnapshotDataService>();
     _locationService             = Substitute.For <ILocationService>();
     _eventAggregator             = new EventAggregator();
 }
예제 #4
0
        public ChartsViewModel(IBitmapConverter bitmapConverter)
        {
            GenerateChartsCommand = new RelayCommand(GenerateCharts);
            horizontalBrightness  = new ObservableCollection <KeyValuePair <double, double> >();
            verticalBrightness    = new ObservableCollection <KeyValuePair <double, double> >();

            _bitmapoConverter = bitmapConverter;

            ImageBitmap = GlobalData.XrayBitmap;
            xrayBitmap  = _bitmapoConverter.BitmapImage2Bitmap(ImageBitmap);
        }
예제 #5
0
 public DataServiceFactory(ILocationContextFactory dataContextFactory,
                           IAppSettingsProvider appSettingsProvider,
                           IWebClient webClient,
                           IBitmapConverter bitmapConverter,
                           IMiniaturesCache miniaturesCache)
 {
     _dataContextFactory  = dataContextFactory;
     _appSettingsProvider = appSettingsProvider;
     _webClient           = webClient;
     _bitmapConverter     = bitmapConverter;
     _miniaturesCache     = miniaturesCache;
 }
        public SnapshotDetailsViewModel(INavigationService navigationService,
                                        IBitmapConverter bitmapConverter,
                                        IPictureService pictureService,
                                        IEventAggregator eventAggregator)
        {
            _navigationService = navigationService;
            _pictureService    = pictureService;
            _bitmapConverter   = bitmapConverter;
            _eventAggregator   = eventAggregator;

            AreDetailsVisible   = false;
            IsCommandBarVisible = true;
        }
예제 #7
0
        public MainViewModel(IImageModificatorService imageModificator, IBitmapConverter bitmapConverter)
        {
            _bitmapConverter  = bitmapConverter;
            _imageModyficator = imageModificator;

            LoadImageCommand                     = new RelayCommand(LoadImageAndSaveAsJpg);
            ManualMethodCommand                  = new RelayCommand(ManualMethod);
            StartOtsuMethodCommaand              = new RelayCommand(StartOtsuMethod);
            BasicThresholdingCommand             = new RelayCommand(BasicThresholding);
            ShowChartsCommand                    = new RelayCommand(ShowCharts);
            ShowSegmentedChartsCommand           = new RelayCommand(ShowSegmentedCharts);
            StartBernsenMethodCommaand           = new RelayCommand(BernsenMethod);
            StartNiblackMethodCommand            = new RelayCommand(NiblackMethod);
            StartSouvolaPietikainenMethodCommand = new RelayCommand(SouvolaPietikainenMethod);
        }
예제 #8
0
 public CameraViewModel(INavigationService navigationService,
                        ICameraService cameraService,
                        IBitmapConverter bitmapConverter,
                        IPictureService pictureService,
                        ILocationSnapshotDataService locationSnapshotDataService,
                        ILocationService locationService,
                        IEventAggregator eventAggregator)
 {
     _navigationService           = navigationService;
     _cameraService               = cameraService;
     _bitmapConverter             = bitmapConverter;
     _pictureService              = pictureService;
     _locationSnapshotDataService = locationSnapshotDataService;
     _locationService             = locationService;
     _eventAggregator             = eventAggregator;
 }
예제 #9
0
        public SnapshotsViewModel(ILocationSnapshotDataService locationSnapshotDataService,
                                  INavigationService navigationService,
                                  IPictureService pictureService,
                                  IBitmapConverter bitmapConverter,
                                  IDialogService dialogService,
                                  IPlatformSpecificActions platformSpecificActions)
        {
            _locationSnapshotDataService = locationSnapshotDataService;
            _navigationService           = navigationService;
            _pictureService          = pictureService;
            _bitmapConverter         = bitmapConverter;
            _dialogService           = dialogService;
            _platformSpecificActions = platformSpecificActions;

            SnapshotThumbnails = new ObservableCollection <SnapshotThumbnail>();
            SelectedThumbnails = new List <SnapshotThumbnail>();
            SelectionMode      = SelectionMode.None;
            IsItemClickEnabled = true;
        }
예제 #10
0
 private void SetUp()
 {
     _navigationService = Substitute.For <INavigationService>();
     _bitmapConverter   = Substitute.For <IBitmapConverter>();
     _pictureService    = Substitute.For <IPictureService>();
     _pictureService.GetSnapshotContentAsync(Arg.Any <LocationSnapshot>())
     .Returns(_ =>
     {
         var tcs = new TaskCompletionSource <byte[]>();
         tcs.SetResult(new byte[0]);
         return(tcs.Task);
     });
     _bitmapConverter.GetBitmapAsync(Arg.Any <byte[]>())
     .Returns(_ =>
     {
         var tcs = new TaskCompletionSource <object>();
         tcs.SetResult(new object());
         return(tcs.Task);
     });
     _eventAggregator = new EventAggregator();
 }
예제 #11
0
 public PictureService(IBitmapConverter bitmapConverter,
                       IMiniaturesCache miniaturesCache)
 {
     _bitmapConverter = bitmapConverter;
     _miniaturesCache = miniaturesCache;
 }
 public ImageModificatorService(IBitmapConverter bitmapConverter)
 {
     _bitmapConverter = bitmapConverter;
 }
예제 #13
0
 public ParserService(Parser.ParserClient parserClient, IBitmapConverter bitmapConverter)
 {
     this.parserClient    = parserClient;
     this.bitmapConverter = bitmapConverter;
 }
 private void SetUp()
 {
     _snapshots = new List <LocationSnapshot>
     {
         new LocationSnapshot {
             Id = 1, PictureFileName = "Barcelona_1.jpg"
         },
         new LocationSnapshot {
             Id = 2, PictureFileName = "Barcelona_2.jpg"
         },
         new LocationSnapshot {
             Id = 3, PictureFileName = "Barcelona_3.jpg"
         }
     };
     _miniatures = new List <SnapshotMiniature>
     {
         new SnapshotMiniature {
             Snapshot = _snapshots[0]
         },
         new SnapshotMiniature {
             Snapshot = _snapshots[1]
         },
         new SnapshotMiniature {
             Snapshot = _snapshots[2]
         }
     };
     _thumbnail           = new object();
     _snapshotDataService = Substitute.For <ILocationSnapshotDataService>();
     _snapshotDataService.GetSnapshotsByLocationIdAsync(Arg.Any <int>())
     .Returns(_ =>
     {
         var tcs = new TaskCompletionSource <IEnumerable <LocationSnapshot> >();
         tcs.SetResult(_snapshots);
         return(tcs.Task);
     });
     _snapshotDataService.GetSnapshotsByIdsAsync(Arg.Any <IEnumerable <int> >())
     .Returns(_ =>
     {
         var tcs = new TaskCompletionSource <IEnumerable <LocationSnapshot> >();
         tcs.SetResult(_snapshots);
         return(tcs.Task);
     });
     _pictureService = Substitute.For <IPictureService>();
     _pictureService.GetSnapshotMiniaturesAsync(Arg.Any <IEnumerable <LocationSnapshot> >())
     .Returns(_ =>
     {
         var tcs = new TaskCompletionSource <IEnumerable <SnapshotMiniature> >();
         tcs.SetResult(_miniatures);
         return(tcs.Task);
     });
     _bitmapConverter = Substitute.For <IBitmapConverter>();
     _bitmapConverter.GetBitmapAsync(Arg.Any <byte[]>())
     .Returns(_ =>
     {
         var tcs = new TaskCompletionSource <object>();
         tcs.SetResult(_thumbnail);
         return(tcs.Task);
     });
     _dialogService = Substitute.For <IDialogService>();
     _dialogService.ShowConfirmationAsync(Arg.Any <string>())
     .Returns(_ =>
     {
         var tcs = new TaskCompletionSource <ConfirmationAnswer>();
         tcs.SetResult(ConfirmationAnswer.OK);
         return(tcs.Task);
     });
     _navigationService       = Substitute.For <INavigationService>();
     _platformSpecificActions = Substitute.For <IPlatformSpecificActions>();
 }