Ejemplo n.º 1
0
        public void Excute()
        {
            var count = FileUris.Count;

            Task.Run(() =>
            {
                for (int i = 0; i < count && FileUris.Count > 0; i++)
                {
                    int size = GetKernelSize();

                    var kernel          = new SpatialFilterKernel(SourceToKernel(), size);
                    kernel.IsNormalized = _IsNormalized;
                    var images          = ImageManager.Filter(FileUris[0], kernel);
                    images.Freeze();
                    var viewmodel = new ImageWindowViewModel(images);
                    Messenger.Raise(new TransitionMessage(viewmodel, "ImageWindow"));
                    App.Current.Dispatcher.Invoke(() => Delete(i));
                }
            });
        }
Ejemplo n.º 2
0
        public void Excute()
        {
            var count = FileUris.Count;
            Task.Run(() =>
            {
                for (int i = 0; i < count && FileUris.Count > 0; i++)
                {
                    int size = GetKernelSize();

                    var kernel = new SpatialFilterKernel(SourceToKernel(), size);
                    var images = ImageManager.Filter(FileUris[0], kernel);
                    images.Freeze();
                    var viewmodel = new ImageWindowViewModel(images);
                    Messenger.Raise(new TransitionMessage(viewmodel, "ImageWindow"));
                    App.Current.Dispatcher.Invoke(() => Delete(i));
                }
            });
        }