예제 #1
0
 public void getarrayimages(ImageController[] source, int count)
 {
     image = source;
     for (int w = 0; w < count; w++)
     {
         comboBox1.Items.Add(image[w].PP36File.namefile);
         comboBox2.Items.Add(image[w].PP36File.namefile);
     }
 }
예제 #2
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            image[counter] = new ImageController();

            if (ofd.ShowDialog() == DialogResult.OK && !string.IsNullOrEmpty(ofd.FileName))
            {
                chart1.Show();
                Benchmark.Start();
                image[counter].Read(ofd.FileName);
                Benchmark.End();
                image[counter].ImageLockBitmap.UnlockBits();
                Benchmark.End();
                this.textBox1.Text = Benchmark.GetSeconds().ToString();
                tabpag[counter] = new TabPage();
                PictureBox p = new PictureBox();
                p.Size = new Size(350, 350);
                p.SizeMode = PictureBoxSizeMode.Zoom;

                p.Image = (image[counter].ImageLockBitmap.source);
                tabpag[counter].Controls.Add(p);
                tabpag[counter].Text = image[counter].PP36File.namefile;
                tabControl1.TabPages.Add(tabpag[counter]);
                his = new Histogramdrawing();
                his.drawing(image[counter].ImageLockBitmap, chart1);
                tabControl1.SelectedIndex = counter;
                counter++;
            }
        }
예제 #3
0
 private void calculationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Calc c = new Calc();
     c.getarrayimages(image, counter);
     c.ShowDialog();
     tabpag[counter] = new TabPage();
     PictureBox p = new PictureBox();
     p.Size = new Size(350, 350);
     p.SizeMode = PictureBoxSizeMode.Zoom;
     p.Image = c.returned_image.source;
     image[counter] = new ImageController();
     image[counter].ImageBitmap = c.returned_image.source;
     image[counter].ImageLockBitmap = new bufferedLockBitmap(c.returned_image.source);
     image[counter].ImageLockBitmap.LockBits();
     image[counter].ImageLockBitmap.UnlockBits();
     image[counter].ImageHigh = image[counter].ImageLockBitmap.Height;
     image[counter].ImageHigh = image[counter].ImageLockBitmap.Width;
     image[counter].PP36File = new PP36FileReading();
     image[counter].PP36File.namefile = "result" + counter.ToString();
     tabpag[counter].Controls.Add(p);
     tabpag[counter].Text = "Result image";
     tabControl1.TabPages.Add(tabpag[counter]);
     this.tabControl1.SelectedIndex = counter;
     counter++;
     his.zeros();
     his.drawing(image[tabControl1.SelectedIndex].ImageLockBitmap, this.chart1);
 }