You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

  1. //----------------------------------------------------------------------------
  2. // Copyright (C) 2004-2019 by EMGU Corporation. All rights reserved.
  3. //----------------------------------------------------------------------------
  4. /*
  5. using System;
  6. using System.Windows.Forms;
  7. using Microsoft.VisualStudio.DebuggerVisualizers;
  8. using Emgu.CV;
  9. using Emgu.CV.UI;
  10. using System.Diagnostics;
  11. [assembly: DebuggerVisualizer(
  12. typeof(Emgu.CV.DebuggerVisualizers.DenseHistogramVisualizer),
  13. Target = typeof(Emgu.CV.DenseHistogram))]
  14. namespace Emgu.CV.DebuggerVisualizers
  15. {
  16. public sealed class DenseHistogramVisualizer : DialogDebuggerVisualizer
  17. {
  18. protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
  19. {
  20. DenseHistogram hist = objectProvider.GetObject() as DenseHistogram;
  21. if (hist.Cols > 1)
  22. {
  23. MessageBox.Show("Only 1-D histogram visualization is supported");
  24. return;
  25. }
  26. if (hist != null)
  27. {
  28. using (HistogramViewer viewer = new HistogramViewer())
  29. {
  30. viewer.HistogramCtrl.AddHistogram("Histogram", System.Drawing.Color.Black, hist, 256, new float[] {0, 255});
  31. viewer.HistogramCtrl.Refresh();
  32. windowService.ShowDialog(viewer);
  33. }
  34. }
  35. }
  36. }
  37. }*/