/// <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 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 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(); }
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(); }