Exemple #1
0
 public MainWindow()
 {
     InitializeComponent();
     CurrentImageToDisplay = ImageToDisplay.None;
     ImageHandler          = new ImageHandler();
     LengthCollector       = new LengthCollector();
     EmguImgBox.SizeMode   = PictureBoxSizeMode.Zoom;
     //hogy ne lehessen pan-elni és zoomolni
     //EmguImgBox.FunctionalMode = Emgu.CV.UI.ImageBox.FunctionalModeOption.Minimum;
     //EmguImgBox.VerticalScrollBar.KeyPress
     ImgToDisplay              = new Mat();
     Switch                    = false;
     OgImgBtn.IsChecked        = true;
     ProcessedImgBtn.IsChecked = false;
     SettingsWindow            = new SettingsWindow {
         Visibility = Visibility.Collapsed
     };
     LengthWindow = new LengthWindow {
         Visibility = Visibility.Collapsed
     };
     ImageProcessorExaminer = new ImageProcessorExaminer()
     {
         Visibility = Visibility.Collapsed
     };
 }
Exemple #2
0
        private void LengthClick(object sender, RoutedEventArgs e)
        {
            LengthWindow.Show();

            /*
             * this.LengthMenuItem.IsChecked = !this.LengthMenuItem.IsChecked;
             * if (this.LengthMenuItem.IsChecked)
             * {
             *  LengthGrid.DataContext =
             *      LengthCollector.GetLengthList(ImageHandler.OpenedImgNumber, Convert.ToDouble(SettingsWindow.PPM_Sl));
             * }
             */
            var currImgNumber = ImageHandler.OpenedImgNumber;

            ImageHandler.Process();
            LengthCollector.Add(currImgNumber, this.LastClickedPoint, ImageHandler.GetCellLengthWithBoundingBox(LastClickedPoint));
            //TODO lehet a lengthcollvetor néha takarítani is kellene :|
            //TempLengthList = LengthCollector.GetLengthList(currImgNumber, SettingsWindow.PPM_Sl.Value);
            TempLengthList = LengthCollector.GetLengthTripletList(SettingsWindow.PPM_Sl.Value);
            LengthWindow.LengthGrid.ItemsSource = TempLengthList;
            LengthWindow.LengthGrid.Items.Refresh();
        }