Ejemplo n.º 1
0
        static GlobalSettings()
        {
            UnitSettings = ModelResolver.Resolve<IUnitSettings>();
            UnitSettings.LoadSettings();

            ColorSettings = ModelResolver.Resolve<IColorSettings>();
            ColorSettings.LoadSettings();

            ClipSettings = ModelResolver.Resolve<IClipSettings>();

            FrameRateSettings = ModelResolver.Resolve<IFrameRateSettings>();
        }
Ejemplo n.º 2
0
        static GlobalSettings()
        {
            UnitSettings = ModelResolver.Resolve <IUnitSettings>();
            UnitSettings.LoadSettings();

            ColorSettings = ModelResolver.Resolve <IColorSettings>();
            ColorSettings.LoadSettings();

            ClipSettings = ModelResolver.Resolve <IClipSettings>();

            FrameRateSettings = ModelResolver.Resolve <IFrameRateSettings>();
        }
Ejemplo n.º 3
0
 public ClipSettingsXml(IClipSettings clipSettings)
 {
     ClipFilePath             = clipSettings.ClipFilePath;
     StartFrame               = clipSettings.StartFrame;
     EndFrame                 = clipSettings.EndFrame;
     FrameInterval            = clipSettings.FrameInterval;
     NumberOfWhiskers         = clipSettings.NumberOfWhiskers;
     NumberOfPointsPerWhisker = clipSettings.NumberOfPointsPerWhisker;
     IncludeNosePoint         = clipSettings.IncludeNosePoint;
     IncludeOrientationPoint  = clipSettings.IncludeOrientationPoint;
     NumberOfGenericPoints    = clipSettings.NumberOfGenericPoints;
     Whiskers                 = clipSettings.Whiskers.Select(x => new WhiskerClipSettingsXml(x)).ToArray();
 }
Ejemplo n.º 4
0
 public ClipSettingsXml(IClipSettings clipSettings)
 {
     ClipFilePath = clipSettings.ClipFilePath;
     StartFrame = clipSettings.StartFrame;
     EndFrame = clipSettings.EndFrame;
     FrameInterval = clipSettings.FrameInterval;
     NumberOfWhiskers = clipSettings.NumberOfWhiskers;
     NumberOfPointsPerWhisker = clipSettings.NumberOfPointsPerWhisker;
     IncludeNosePoint = clipSettings.IncludeNosePoint;
     IncludeOrientationPoint = clipSettings.IncludeOrientationPoint;
     NumberOfGenericPoints = clipSettings.NumberOfGenericPoints;
     Whiskers = clipSettings.Whiskers.Select(x => new WhiskerClipSettingsXml(x)).ToArray();
 }
Ejemplo n.º 5
0
        private void NewSession()
        {
            string fileName = FileBrowser.BroseForVideoFiles();

            if (string.IsNullOrWhiteSpace(fileName))
            {
                return;
            }

            WhiskerVideo = ModelResolver.Resolve <IWhiskerVideo>();
            WhiskerVideo.SetVideo(fileName);
            m_VideoWidth  = (int)WhiskerVideo.Width;
            m_VideoHeight = (int)WhiskerVideo.Height;
            FrameCount    = WhiskerVideo.FrameCount;

            ClipSettingsView            clipSettingsView = new ClipSettingsView();
            ClipSettingsWindowViewModel viewModel        = new ClipSettingsWindowViewModel(WhiskerVideo);

            clipSettingsView.DataContext = viewModel;

            clipSettingsView.ShowDialog();

            if (viewModel.ExitResult != WindowExitResult.Ok)
            {
                return;
            }

            IClipSettings clipSettings = viewModel.Model;

            GlobalSettings.GlobalSettings.ClipSettings = clipSettings;
            GlobalSettings.GlobalSettings.ClipSettings.Commit();

            GlobalSettings.GlobalSettings.FrameRateSettings.CurrentFrameRate  = WhiskerVideo.FrameRate;
            GlobalSettings.GlobalSettings.FrameRateSettings.OriginalFrameRate = viewModel.OriginalFrameRate;

            Image         = null;
            Started       = false;
            VideoSelected = true;

            StartPicking();

            WorkingFile = string.Empty;
            ClearUndoActions();
        }
        public ClipSettingsWindowViewModel(IWhiskerVideo video)
        {
            IClipSettings clipSettings = ModelResolver.Resolve <IClipSettings>();

            clipSettings.ClipFilePath = video.FilePath;
            clipSettings.StartFrame   = 1;
            int frameCount = video.FrameCount;

            clipSettings.EndFrame                = frameCount < 100 ? frameCount : 100;
            clipSettings.IncludeNosePoint        = true;
            clipSettings.IncludeOrientationPoint = true;

            clipSettings.NumberOfPointsPerWhisker = 3;
            clipSettings.FrameInterval            = 1;
            FrameCount = frameCount;

            ViewModel = new ClipSettingsViewModel(clipSettings);
            SelectedNumberOfWhiskers = 4;

            OriginalFrameRate = video.FrameRate;
        }
 public ClipSettingsWindowViewModel(IClipSettings model, int frameCount)
 {
     ViewModel  = new ClipSettingsViewModel(model);
     FrameCount = frameCount;
 }
Ejemplo n.º 8
0
 public ClipSettingsViewModel(IClipSettings model)
 {
     Model = model;
 }
Ejemplo n.º 9
0
 public ClipSettingsViewModel(IClipSettings model)
 {
     Model = model;
 }