public void calculate_histogram(PictureBox statistikPictureBox)
        {
            statistic_pic = statistikPictureBox;

            if (pic.Image == null)
            {
                Bitmap b = new Bitmap(1, 1);
                pic.Image = b;
                model     = new StatistikModel(pic.Image);
            }
            else
            {
                model = new StatistikModel(pic.Image);
            }
            model.prepare_histogram_data();
            statistikForm.set_entropyLabel(model.get_entropy());
            statistikForm.set_varianceLabel(model.get_variance());
            statistikForm.set_averageLabel(model.get_average());
            statistikForm.set_minLabel(model.get_min_value());
            statistikForm.set_maxLabel(model.get_max_value());
            mainForm.Focus();
        }
        public void calculate_histogram(PictureBox statistikPictureBox)
        {
            statistic_pic = statistikPictureBox;

            if (pic.Image == null)
            {
                Bitmap b = new Bitmap(1, 1);
                pic.Image = b;
                model = new StatistikModel(pic.Image);
            }
            else
            {
                model = new StatistikModel(pic.Image);

            }
            model.prepare_histogram_data();
            statistikForm.set_entropyLabel(model.get_entropy());
            statistikForm.set_varianceLabel(model.get_variance());
            statistikForm.set_averageLabel(model.get_average());
            statistikForm.set_minLabel(model.get_min_value());
            statistikForm.set_maxLabel(model.get_max_value());
            mainForm.Focus();
        }
 public void get_varianceTest()
 {
     Bitmap bitmap = new Bitmap(3, 1);
     StatistikModel target = new StatistikModel(bitmap);
     double expected = 0F; // TODO: Passenden Wert initialisieren
     double actual;
     actual = target.get_variance();
     Assert.AreEqual(expected, actual);
 }
 public void get_min_valueTest()
 {
     Bitmap bitmap = new Bitmap(3, 1);
     StatistikModel target = new StatistikModel(bitmap);
     int expected = 255; // TODO: Passenden Wert initialisieren
     int actual;
     actual = target.get_min_value();
     Assert.AreEqual(expected, actual);
 }
 public void findMinMaxTest()
 {
     Bitmap bitmap = new Bitmap(3, 1);
     StatistikModel target = new StatistikModel(bitmap);
     int grey = 0;
     target.findMinMax(grey);
     Assert.AreEqual(target.get_max_value(), 0);
 }
        public void draw_histogramTest()
        {
            Bitmap bitmap = new Bitmap(3, 1);
            StatistikModel acc = new StatistikModel(bitmap);

            System.Windows.Forms.PictureBox statistik_pic = new System.Windows.Forms.PictureBox();
            statistik_pic.Image = (Image)bitmap;
            acc.draw_histogram(statistik_pic, Config.histogram_canal.GREEN);
        }