/// <summary> /// Display the histograms of the specific image /// </summary> /// <param name="image">The image to retrieve hostigram from</param> /// <param name="numberOfBins">The numebr of bins in the histogram</param> public static void Show(IImage image, int numberOfBins) { HistogramViewer viewer = new HistogramViewer(); viewer.HistogramCtrl.GenerateHistograms(image, numberOfBins); viewer.HistogramCtrl.Refresh(); viewer.Show(); }
/// <summary> /// Display the specific histogram /// </summary> /// <param name="hist">The histogram to be displayed</param> /// <param name="title">The name of the histogram</param> public static void Show(Histogram hist, string title) { HistogramViewer viewer = new HistogramViewer(); viewer.HistogramCtrl.AddHistogram(title, Color.Black, hist); viewer.HistogramCtrl.Refresh(); viewer.Show(); }
/// <summary> /// Display the histograms of the specific image /// </summary> /// <param name="image">The image to retrieve histogram from</param> /// <param name="numberOfBins">The number of bins in the histogram</param> public static void Show(IImage image, int numberOfBins) { HistogramViewer viewer = new HistogramViewer(); viewer.HistogramCtrl.GenerateHistograms(image, numberOfBins); viewer.HistogramCtrl.Refresh(); viewer.ShowDialog(); }
/// <summary> /// Display the specific histogram /// </summary> /// <param name="hist">The 1 dimension histogram to be displayed</param> /// <param name="title">The name of the histogram</param> public static void Show(DenseHistogram hist, string title) { HistogramViewer viewer = new HistogramViewer(); if (hist.Dimension == 1) viewer.HistogramCtrl.AddHistogram(title, Color.Black, hist); viewer.HistogramCtrl.Refresh(); viewer.Show(); }
/// <summary> /// Display the specific histogram /// </summary> /// <param name="hist">The 1 dimension histogram to be displayed</param> /// <param name="title">The name of the histogram</param> public static void Show(DenseHistogram hist, string title) { HistogramViewer viewer = new HistogramViewer(); if (hist.Dimension == 1) { viewer.HistogramCtrl.AddHistogram(title, Color.Black, hist); } viewer.HistogramCtrl.Refresh(); viewer.Show(); }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); if (_histogramViewer != null) { _histogramViewer.Dispose(); _histogramViewer = null; } _imageBox.OnFunctionalModeChanged -= HandleFunctionalModeChange; } base.Dispose(disposing); }
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { DenseHistogram hist = objectProvider.GetObject() as DenseHistogram; if (hist.Dimension > 1) { MessageBox.Show("Only 1-D histogram visualization is supported"); return; } if (hist != null) { using (HistogramViewer viewer = new HistogramViewer()) { viewer.HistogramCtrl.AddHistogram("Histogram", System.Drawing.Color.Black, hist); viewer.HistogramCtrl.Refresh(); windowService.ShowDialog(viewer); } } }
private void showHistogramButton_Click(object sender, EventArgs e) { if (_imageBox.DisplayedImage == null) { MessageBox.Show(Properties.StringTable.PleaseLoadAnImageFirst); return; } if (_histogramViewer != null && _histogramViewer.Visible == false) { _histogramViewer.Dispose(); _histogramViewer = null; } if (_histogramViewer == null) { _histogramViewer = new HistogramViewer(); _histogramViewer.Show(); } UpdateHistogram(); }
private void showHistogramButton_Click(object sender, EventArgs e) { if (_imageBox.DisplayedImage == null) { MessageBox.Show("Please load an image first"); return; } if (_histogramViewer != null && _histogramViewer.Visible == false) { _histogramViewer.Dispose(); _histogramViewer = null; } if (_histogramViewer == null) { _histogramViewer = new HistogramViewer(); _histogramViewer.Width = 600; _histogramViewer.Height = 1000; _histogramViewer.Show(); } UpdateHistogram(); }