private void MenuItem_Click_Reset(object sender, RoutedEventArgs e) { if (_graph3D != null) { _graph3D.Size = new System.Drawing.Size((int)img.ActualWidth, (int)img.ActualHeight); _graph3D.HorizontalAngleGrad = _graph3D.DefaultHorizontalAngleGrad; _graph3D.VerticalAngleGrad = _graph3D.DefaultVerticalAngleGrad; _graph3D.Zoom = _graph3D.DefaultZoom; img.Source = Helper.BitmapToImageSource(_graph3D.DrawGraph()); } }
private void ProceedReal() { TransitionMatrices.InitializeStateMatrix(_bmpOriginal.Width, _bmpOriginal.Height); Image = new Bitmap(_bmpOriginal.Width, _bmpOriginal.Height); for (int y = 0; y < _bmpOriginal.Height; y++) { for (int x = 0; x < _bmpOriginal.Width; x++) { var pixel = _bmpOriginal.GetPixel(x, y); var sv = _statesValues.GetStateValue(pixel); Image.SetPixel(x, y, sv.Color); TransitionMatrices.SetStateMatrix(x, y, sv.ID); } } TransitionMatrices.SetTransitionMatrices(); _graph3D.Points3D = TransitionMatrices.ACF; ImageAcf = _graph3D.DrawGraph(); }