Beispiel #1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     NationalInstruments.Vision.WindowsForms.Palette palette3 = new NationalInstruments.Vision.WindowsForms.Palette();
     this.imageViewerOriginal    = new NationalInstruments.Vision.WindowsForms.ImageViewer();
     this.imageViewerThresholded = new NationalInstruments.Vision.WindowsForms.ImageViewer();
     this.imagePath          = new System.Windows.Forms.TextBox();
     this.label1             = new System.Windows.Forms.Label();
     this.browseButton       = new System.Windows.Forms.Button();
     this.tabControl1        = new System.Windows.Forms.TabControl();
     this.localTab           = new System.Windows.Forms.TabPage();
     this.groupBox1          = new System.Windows.Forms.GroupBox();
     this.localYSize         = new System.Windows.Forms.NumericUpDown();
     this.label6             = new System.Windows.Forms.Label();
     this.localXSize         = new System.Windows.Forms.NumericUpDown();
     this.label5             = new System.Windows.Forms.Label();
     this.label4             = new System.Windows.Forms.Label();
     this.niblackUpDown      = new System.Windows.Forms.NumericUpDown();
     this.label3             = new System.Windows.Forms.Label();
     this.localMethodBox     = new System.Windows.Forms.ComboBox();
     this.label2             = new System.Windows.Forms.Label();
     this.localObjectBox     = new System.Windows.Forms.ComboBox();
     this.autoTab            = new System.Windows.Forms.TabPage();
     this.label7             = new System.Windows.Forms.Label();
     this.autoObjectBox      = new System.Windows.Forms.ComboBox();
     this.autoMethodBox      = new System.Windows.Forms.ComboBox();
     this.label8             = new System.Windows.Forms.Label();
     this.manualTab          = new System.Windows.Forms.TabPage();
     this.label10            = new System.Windows.Forms.Label();
     this.label11            = new System.Windows.Forms.Label();
     this.quitButton         = new System.Windows.Forms.Button();
     this.manualMinimumSlide = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     this.manualMaximumSlide = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     this.tabControl1.SuspendLayout();
     this.localTab.SuspendLayout();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.localYSize)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.localXSize)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.niblackUpDown)).BeginInit();
     this.autoTab.SuspendLayout();
     this.manualTab.SuspendLayout();
     this.SuspendLayout();
     //
     // imageViewerOriginal
     //
     this.imageViewerOriginal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.imageViewerOriginal.Location    = new System.Drawing.Point(289, 7);
     this.imageViewerOriginal.Name        = "imageViewerOriginal";
     this.imageViewerOriginal.Size        = new System.Drawing.Size(267, 242);
     this.imageViewerOriginal.TabIndex    = 0;
     //
     // imageViewerThresholded
     //
     this.imageViewerThresholded.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.imageViewerThresholded.Location    = new System.Drawing.Point(289, 267);
     this.imageViewerThresholded.Name        = "imageViewerThresholded";
     palette3.Type = NationalInstruments.Vision.WindowsForms.PaletteType.Binary;
     this.imageViewerThresholded.Palette  = palette3;
     this.imageViewerThresholded.Size     = new System.Drawing.Size(267, 242);
     this.imageViewerThresholded.TabIndex = 1;
     //
     // imagePath
     //
     this.imagePath.Location  = new System.Drawing.Point(12, 25);
     this.imagePath.Multiline = true;
     this.imagePath.Name      = "imagePath";
     this.imagePath.Size      = new System.Drawing.Size(185, 120);
     this.imagePath.TabIndex  = 2;
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(9, 9);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(61, 13);
     this.label1.TabIndex = 3;
     this.label1.Text     = "Image Path";
     //
     // browseButton
     //
     this.browseButton.Location = new System.Drawing.Point(203, 25);
     this.browseButton.Name     = "browseButton";
     this.browseButton.Size     = new System.Drawing.Size(30, 23);
     this.browseButton.TabIndex = 4;
     this.browseButton.Text     = "...";
     this.browseButton.UseVisualStyleBackColor = true;
     this.browseButton.Click += new System.EventHandler(this.browseButton_Click);
     //
     // tabControl1
     //
     this.tabControl1.Controls.Add(this.localTab);
     this.tabControl1.Controls.Add(this.autoTab);
     this.tabControl1.Controls.Add(this.manualTab);
     this.tabControl1.Location      = new System.Drawing.Point(12, 161);
     this.tabControl1.Name          = "tabControl1";
     this.tabControl1.SelectedIndex = 0;
     this.tabControl1.Size          = new System.Drawing.Size(220, 227);
     this.tabControl1.TabIndex      = 5;
     //
     // localTab
     //
     this.localTab.Controls.Add(this.groupBox1);
     this.localTab.Controls.Add(this.label4);
     this.localTab.Controls.Add(this.niblackUpDown);
     this.localTab.Controls.Add(this.label3);
     this.localTab.Controls.Add(this.localMethodBox);
     this.localTab.Controls.Add(this.label2);
     this.localTab.Controls.Add(this.localObjectBox);
     this.localTab.Location = new System.Drawing.Point(4, 22);
     this.localTab.Name     = "localTab";
     this.localTab.Padding  = new System.Windows.Forms.Padding(3);
     this.localTab.Size     = new System.Drawing.Size(212, 201);
     this.localTab.TabIndex = 0;
     this.localTab.Text     = "Local";
     this.localTab.UseVisualStyleBackColor = true;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.localYSize);
     this.groupBox1.Controls.Add(this.label6);
     this.groupBox1.Controls.Add(this.localXSize);
     this.groupBox1.Controls.Add(this.label5);
     this.groupBox1.Location = new System.Drawing.Point(16, 122);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(122, 73);
     this.groupBox1.TabIndex = 6;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "Window Size";
     //
     // localYSize
     //
     this.localYSize.Location = new System.Drawing.Point(64, 44);
     this.localYSize.Maximum  = new decimal(new int[] {
         65000,
         0,
         0,
         0
     });
     this.localYSize.Name     = "localYSize";
     this.localYSize.Size     = new System.Drawing.Size(43, 20);
     this.localYSize.TabIndex = 9;
     this.localYSize.Value    = new decimal(new int[] {
         160,
         0,
         0,
         0
     });
     this.localYSize.ValueChanged += new System.EventHandler(this.localYSize_ValueChanged);
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Location = new System.Drawing.Point(44, 46);
     this.label6.Name     = "label6";
     this.label6.Size     = new System.Drawing.Size(14, 13);
     this.label6.TabIndex = 8;
     this.label6.Text     = "Y";
     //
     // localXSize
     //
     this.localXSize.Location = new System.Drawing.Point(64, 18);
     this.localXSize.Maximum  = new decimal(new int[] {
         65000,
         0,
         0,
         0
     });
     this.localXSize.Name     = "localXSize";
     this.localXSize.Size     = new System.Drawing.Size(43, 20);
     this.localXSize.TabIndex = 7;
     this.localXSize.Value    = new decimal(new int[] {
         160,
         0,
         0,
         0
     });
     this.localXSize.ValueChanged += new System.EventHandler(this.localXSize_ValueChanged);
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(44, 20);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(14, 13);
     this.label5.TabIndex = 0;
     this.label5.Text     = "X";
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(13, 76);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(58, 43);
     this.label4.TabIndex = 5;
     this.label4.Text     = "Niblack Deviation Factor";
     //
     // niblackUpDown
     //
     this.niblackUpDown.DecimalPlaces = 1;
     this.niblackUpDown.Increment     = new decimal(new int[] {
         1,
         0,
         0,
         65536
     });
     this.niblackUpDown.Location = new System.Drawing.Point(76, 84);
     this.niblackUpDown.Maximum  = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.niblackUpDown.Name     = "niblackUpDown";
     this.niblackUpDown.Size     = new System.Drawing.Size(47, 20);
     this.niblackUpDown.TabIndex = 4;
     this.niblackUpDown.Value    = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.niblackUpDown.ValueChanged += new System.EventHandler(this.niblackUpDown_ValueChanged);
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(28, 48);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(43, 13);
     this.label3.TabIndex = 3;
     this.label3.Text     = "Method";
     //
     // localMethodBox
     //
     this.localMethodBox.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.localMethodBox.FormattingEnabled = true;
     this.localMethodBox.Items.AddRange(new object[] {
         "Niblack",
         "Background Correction"
     });
     this.localMethodBox.Location              = new System.Drawing.Point(77, 45);
     this.localMethodBox.Name                  = "localMethodBox";
     this.localMethodBox.Size                  = new System.Drawing.Size(104, 21);
     this.localMethodBox.TabIndex              = 2;
     this.localMethodBox.SelectedIndexChanged += new System.EventHandler(this.localMethodBox_SelectedIndexChanged);
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(9, 19);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(65, 13);
     this.label2.TabIndex = 1;
     this.label2.Text     = "Object Type";
     //
     // localObjectBox
     //
     this.localObjectBox.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.localObjectBox.FormattingEnabled = true;
     this.localObjectBox.Items.AddRange(new object[] {
         "Bright Objects",
         "Dark Objects"
     });
     this.localObjectBox.Location              = new System.Drawing.Point(77, 16);
     this.localObjectBox.Name                  = "localObjectBox";
     this.localObjectBox.Size                  = new System.Drawing.Size(104, 21);
     this.localObjectBox.TabIndex              = 0;
     this.localObjectBox.SelectedIndexChanged += new System.EventHandler(this.localObjectBox_SelectedIndexChanged);
     //
     // autoTab
     //
     this.autoTab.Controls.Add(this.label7);
     this.autoTab.Controls.Add(this.autoObjectBox);
     this.autoTab.Controls.Add(this.autoMethodBox);
     this.autoTab.Controls.Add(this.label8);
     this.autoTab.Location = new System.Drawing.Point(4, 22);
     this.autoTab.Name     = "autoTab";
     this.autoTab.Padding  = new System.Windows.Forms.Padding(3);
     this.autoTab.Size     = new System.Drawing.Size(212, 201);
     this.autoTab.TabIndex = 1;
     this.autoTab.Text     = "Automatic";
     this.autoTab.UseVisualStyleBackColor = true;
     //
     // label7
     //
     this.label7.AutoSize = true;
     this.label7.Location = new System.Drawing.Point(28, 48);
     this.label7.Name     = "label7";
     this.label7.Size     = new System.Drawing.Size(43, 13);
     this.label7.TabIndex = 9;
     this.label7.Text     = "Method";
     //
     // autoObjectBox
     //
     this.autoObjectBox.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.autoObjectBox.FormattingEnabled = true;
     this.autoObjectBox.Items.AddRange(new object[] {
         "Bright Objects",
         "Dark Objects"
     });
     this.autoObjectBox.Location              = new System.Drawing.Point(77, 16);
     this.autoObjectBox.Name                  = "autoObjectBox";
     this.autoObjectBox.Size                  = new System.Drawing.Size(104, 21);
     this.autoObjectBox.TabIndex              = 6;
     this.autoObjectBox.SelectedIndexChanged += new System.EventHandler(this.autoObjectBox_SelectedIndexChanged);
     //
     // autoMethodBox
     //
     this.autoMethodBox.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.autoMethodBox.FormattingEnabled = true;
     this.autoMethodBox.Items.AddRange(new object[] {
         "clustering",
         "entropy",
         "metric",
         "moments",
         "inter-class variance"
     });
     this.autoMethodBox.Location              = new System.Drawing.Point(77, 45);
     this.autoMethodBox.Name                  = "autoMethodBox";
     this.autoMethodBox.Size                  = new System.Drawing.Size(104, 21);
     this.autoMethodBox.TabIndex              = 8;
     this.autoMethodBox.SelectedIndexChanged += new System.EventHandler(this.autoMethodBox_SelectedIndexChanged);
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Location = new System.Drawing.Point(9, 19);
     this.label8.Name     = "label8";
     this.label8.Size     = new System.Drawing.Size(65, 13);
     this.label8.TabIndex = 7;
     this.label8.Text     = "Object Type";
     //
     // manualTab
     //
     this.manualTab.Controls.Add(this.manualMaximumSlide);
     this.manualTab.Controls.Add(this.manualMinimumSlide);
     this.manualTab.Controls.Add(this.label10);
     this.manualTab.Controls.Add(this.label11);
     this.manualTab.Location = new System.Drawing.Point(4, 22);
     this.manualTab.Name     = "manualTab";
     this.manualTab.Padding  = new System.Windows.Forms.Padding(3);
     this.manualTab.Size     = new System.Drawing.Size(212, 201);
     this.manualTab.TabIndex = 2;
     this.manualTab.Text     = "Manual";
     this.manualTab.UseVisualStyleBackColor = true;
     //
     // label10
     //
     this.label10.AutoSize = true;
     this.label10.Location = new System.Drawing.Point(25, 93);
     this.label10.Name     = "label10";
     this.label10.Size     = new System.Drawing.Size(81, 13);
     this.label10.TabIndex = 14;
     this.label10.Text     = "Maximum Value";
     //
     // label11
     //
     this.label11.AutoSize = true;
     this.label11.Location = new System.Drawing.Point(25, 9);
     this.label11.Name     = "label11";
     this.label11.Size     = new System.Drawing.Size(78, 13);
     this.label11.TabIndex = 15;
     this.label11.Text     = "Minimum Value";
     //
     // quitButton
     //
     this.quitButton.Location = new System.Drawing.Point(17, 468);
     this.quitButton.Name     = "quitButton";
     this.quitButton.Size     = new System.Drawing.Size(72, 40);
     this.quitButton.TabIndex = 6;
     this.quitButton.Text     = "Quit";
     this.quitButton.UseVisualStyleBackColor = true;
     this.quitButton.Click += new System.EventHandler(this.quitButton_Click);
     //
     // manualMinimumSlide
     //
     this.manualMinimumSlide.AutoSize      = true;
     this.manualMinimumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.manualMinimumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Default;
     this.manualMinimumSlide.Location      = new System.Drawing.Point(6, 25);
     this.manualMinimumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.manualMinimumSlide.Name          = "manualMinimumSlide";
     this.manualMinimumSlide.Size          = new System.Drawing.Size(203, 53);
     this.manualMinimumSlide.TabIndex      = 16;
     this.manualMinimumSlide.Value         = 0;
     this.manualMinimumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.manualMinimumSlide_ValueChanged);
     //
     // manualMaximumSlide
     //
     this.manualMaximumSlide.AutoSize      = true;
     this.manualMaximumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.manualMaximumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Default;
     this.manualMaximumSlide.Location      = new System.Drawing.Point(6, 109);
     this.manualMaximumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.manualMaximumSlide.Name          = "manualMaximumSlide";
     this.manualMaximumSlide.Size          = new System.Drawing.Size(203, 53);
     this.manualMaximumSlide.TabIndex      = 16;
     this.manualMaximumSlide.Value         = 100;
     this.manualMaximumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.manualMaximumSlide_ValueChanged);
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(563, 520);
     this.Controls.Add(this.quitButton);
     this.Controls.Add(this.tabControl1);
     this.Controls.Add(this.browseButton);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.imagePath);
     this.Controls.Add(this.imageViewerThresholded);
     this.Controls.Add(this.imageViewerOriginal);
     this.Name  = "Form1";
     this.Text  = "Form1";
     this.Load += new System.EventHandler(this.Form1_Load);
     this.tabControl1.ResumeLayout(false);
     this.localTab.ResumeLayout(false);
     this.localTab.PerformLayout();
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.localYSize)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.localXSize)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.niblackUpDown)).EndInit();
     this.autoTab.ResumeLayout(false);
     this.autoTab.PerformLayout();
     this.manualTab.ResumeLayout(false);
     this.manualTab.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Beispiel #2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     NationalInstruments.Vision.WindowsForms.Palette palette1 = new NationalInstruments.Vision.WindowsForms.Palette();
     this.imageViewer1        = new NationalInstruments.Vision.WindowsForms.ImageViewer();
     this.imageViewer2        = new NationalInstruments.Vision.WindowsForms.ImageViewer();
     this.label1              = new System.Windows.Forms.Label();
     this.imagePath           = new System.Windows.Forms.TextBox();
     this.browseButton        = new System.Windows.Forms.Button();
     this.groupBox1           = new System.Windows.Forms.GroupBox();
     this.label2              = new System.Windows.Forms.Label();
     this.toleranceUpDown     = new System.Windows.Forms.NumericUpDown();
     this.connectivity4Button = new System.Windows.Forms.RadioButton();
     this.connectivity8Button = new System.Windows.Forms.RadioButton();
     this.label3              = new System.Windows.Forms.Label();
     this.label4              = new System.Windows.Forms.Label();
     this.label5              = new System.Windows.Forms.Label();
     this.quitButton          = new System.Windows.Forms.Button();
     this.loadImageButton     = new System.Windows.Forms.Button();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.toleranceUpDown)).BeginInit();
     this.SuspendLayout();
     //
     // imageViewer1
     //
     this.imageViewer1.ActiveTool            = NationalInstruments.Vision.WindowsForms.ViewerTools.Point;
     this.imageViewer1.BorderStyle           = System.Windows.Forms.BorderStyle.FixedSingle;
     this.imageViewer1.ContextSensitiveTools = false;
     this.imageViewer1.Location     = new System.Drawing.Point(12, 12);
     this.imageViewer1.Name         = "imageViewer1";
     this.imageViewer1.Size         = new System.Drawing.Size(533, 297);
     this.imageViewer1.TabIndex     = 0;
     this.imageViewer1.ImagePanned += new System.EventHandler <NationalInstruments.Vision.WindowsForms.ImagePannedEventArgs>(this.imageViewer1_ImagePanned);
     this.imageViewer1.RoiChanged  += new System.EventHandler <NationalInstruments.Vision.WindowsForms.ContoursChangedEventArgs>(this.imageViewer1_RoiChanged);
     this.imageViewer1.ImageZoomed += new System.EventHandler <NationalInstruments.Vision.WindowsForms.ImageZoomedEventArgs>(this.imageViewer1_ImageZoomed);
     //
     // imageViewer2
     //
     this.imageViewer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.imageViewer2.Location    = new System.Drawing.Point(12, 326);
     this.imageViewer2.Name        = "imageViewer2";
     palette1.Type                  = NationalInstruments.Vision.WindowsForms.PaletteType.Binary;
     this.imageViewer2.Palette      = palette1;
     this.imageViewer2.Size         = new System.Drawing.Size(533, 297);
     this.imageViewer2.TabIndex     = 0;
     this.imageViewer2.ImagePanned += new System.EventHandler <NationalInstruments.Vision.WindowsForms.ImagePannedEventArgs>(this.imageViewer2_ImagePanned);
     this.imageViewer2.ImageZoomed += new System.EventHandler <NationalInstruments.Vision.WindowsForms.ImageZoomedEventArgs>(this.imageViewer2_ImageZoomed);
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(12, 631);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(61, 13);
     this.label1.TabIndex = 1;
     this.label1.Text     = "Image Path";
     //
     // imagePath
     //
     this.imagePath.Location = new System.Drawing.Point(79, 628);
     this.imagePath.Name     = "imagePath";
     this.imagePath.Size     = new System.Drawing.Size(430, 20);
     this.imagePath.TabIndex = 2;
     //
     // browseButton
     //
     this.browseButton.Location = new System.Drawing.Point(517, 628);
     this.browseButton.Name     = "browseButton";
     this.browseButton.Size     = new System.Drawing.Size(28, 20);
     this.browseButton.TabIndex = 3;
     this.browseButton.Text     = "...";
     this.browseButton.UseVisualStyleBackColor = true;
     this.browseButton.Click += new System.EventHandler(this.browseButton_Click);
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.label2);
     this.groupBox1.Controls.Add(this.toleranceUpDown);
     this.groupBox1.Controls.Add(this.connectivity4Button);
     this.groupBox1.Controls.Add(this.connectivity8Button);
     this.groupBox1.Location = new System.Drawing.Point(12, 659);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(124, 76);
     this.groupBox1.TabIndex = 4;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "Options";
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(64, 54);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(55, 13);
     this.label2.TabIndex = 2;
     this.label2.Text     = "Tolerance";
     //
     // toleranceUpDown
     //
     this.toleranceUpDown.Location = new System.Drawing.Point(11, 52);
     this.toleranceUpDown.Maximum  = new decimal(new int[] {
         255,
         0,
         0,
         0
     });
     this.toleranceUpDown.Name     = "toleranceUpDown";
     this.toleranceUpDown.Size     = new System.Drawing.Size(50, 20);
     this.toleranceUpDown.TabIndex = 1;
     this.toleranceUpDown.Value    = new decimal(new int[] {
         20,
         0,
         0,
         0
     });
     //
     // connectivity4Button
     //
     this.connectivity4Button.AutoSize = true;
     this.connectivity4Button.Checked  = true;
     this.connectivity4Button.Location = new System.Drawing.Point(11, 31);
     this.connectivity4Button.Name     = "connectivity4Button";
     this.connectivity4Button.Size     = new System.Drawing.Size(92, 17);
     this.connectivity4Button.TabIndex = 0;
     this.connectivity4Button.TabStop  = true;
     this.connectivity4Button.Text     = "4-Connectivity";
     this.connectivity4Button.UseVisualStyleBackColor = true;
     //
     // connectivity8Button
     //
     this.connectivity8Button.AutoSize = true;
     this.connectivity8Button.Location = new System.Drawing.Point(11, 15);
     this.connectivity8Button.Name     = "connectivity8Button";
     this.connectivity8Button.Size     = new System.Drawing.Size(92, 17);
     this.connectivity8Button.TabIndex = 0;
     this.connectivity8Button.Text     = "8-Connectivity";
     this.connectivity8Button.UseVisualStyleBackColor = true;
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(169, 659);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(64, 13);
     this.label3.TabIndex = 5;
     this.label3.Text     = "Instructions:";
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(169, 673);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(108, 13);
     this.label4.TabIndex = 5;
     this.label4.Text     = "1. Load an image file.";
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(169, 687);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(211, 13);
     this.label5.TabIndex = 5;
     this.label5.Text     = "2. Click on the object you want to segment.";
     //
     // quitButton
     //
     this.quitButton.Location = new System.Drawing.Point(482, 706);
     this.quitButton.Name     = "quitButton";
     this.quitButton.Size     = new System.Drawing.Size(63, 29);
     this.quitButton.TabIndex = 6;
     this.quitButton.Text     = "Quit";
     this.quitButton.UseVisualStyleBackColor = true;
     this.quitButton.Click += new System.EventHandler(this.quitButton_Click);
     //
     // loadImageButton
     //
     this.loadImageButton.Location = new System.Drawing.Point(404, 706);
     this.loadImageButton.Name     = "loadImageButton";
     this.loadImageButton.Size     = new System.Drawing.Size(72, 29);
     this.loadImageButton.TabIndex = 6;
     this.loadImageButton.Text     = "Load Image";
     this.loadImageButton.UseVisualStyleBackColor = true;
     this.loadImageButton.Click += new System.EventHandler(this.loadImageButton_Click);
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(559, 743);
     this.Controls.Add(this.loadImageButton);
     this.Controls.Add(this.quitButton);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.browseButton);
     this.Controls.Add(this.imagePath);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.imageViewer2);
     this.Controls.Add(this.imageViewer1);
     this.Name  = "Form1";
     this.Text  = "Magic Wand Example";
     this.Load += new System.EventHandler(this.Form1_Load);
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.toleranceUpDown)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Beispiel #3
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     NationalInstruments.Vision.WindowsForms.Palette palette8 = new NationalInstruments.Vision.WindowsForms.Palette();
     this.label1            = new System.Windows.Forms.Label();
     this.stepNumber        = new System.Windows.Forms.NumericUpDown();
     this.label2            = new System.Windows.Forms.Label();
     this.stepsTextBox      = new System.Windows.Forms.TextBox();
     this.groupBox1         = new System.Windows.Forms.GroupBox();
     this.imageSelection2   = new System.Windows.Forms.RadioButton();
     this.imageSelection1   = new System.Windows.Forms.RadioButton();
     this.groupBox2         = new System.Windows.Forms.GroupBox();
     this.imageTypeHSL      = new System.Windows.Forms.RadioButton();
     this.imageTypeRGB      = new System.Windows.Forms.RadioButton();
     this.label3            = new System.Windows.Forms.Label();
     this.label8            = new System.Windows.Forms.Label();
     this.label11           = new System.Windows.Forms.Label();
     this.imageViewer1      = new NationalInstruments.Vision.WindowsForms.ImageViewer();
     this.imageViewer2      = new NationalInstruments.Vision.WindowsForms.ImageViewer();
     this.label12           = new System.Windows.Forms.Label();
     this.imageViewer2Label = new System.Windows.Forms.Label();
     this.quitButton        = new System.Windows.Forms.Button();
     this.redMinimumSlide   = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     this.redMaximumSlide   = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     this.greenMinimumSlide = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     this.greenMaximumSlide = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     this.blueMinimumSlide  = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     this.blueMaximumSlide  = new NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider();
     ((System.ComponentModel.ISupportInitialize)(this.stepNumber)).BeginInit();
     this.groupBox1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.SuspendLayout();
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(9, 9);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(197, 43);
     this.label1.TabIndex = 0;
     this.label1.Text     = "This example illustrates how to use the HSL color space to perform inspection tas" +
                            "ks based on object colors.";
     //
     // stepNumber
     //
     this.stepNumber.Location = new System.Drawing.Point(44, 59);
     this.stepNumber.Maximum  = new decimal(new int[] {
         8,
         0,
         0,
         0
     });
     this.stepNumber.Minimum = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.stepNumber.Name     = "stepNumber";
     this.stepNumber.Size     = new System.Drawing.Size(38, 20);
     this.stepNumber.TabIndex = 1;
     this.stepNumber.Value    = new decimal(new int[] {
         1,
         0,
         0,
         0
     });
     this.stepNumber.ValueChanged += new System.EventHandler(this.stepNumber_ValueChanged);
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(9, 61);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(29, 13);
     this.label2.TabIndex = 2;
     this.label2.Text     = "Step";
     //
     // stepsTextBox
     //
     this.stepsTextBox.Location  = new System.Drawing.Point(12, 85);
     this.stepsTextBox.Multiline = true;
     this.stepsTextBox.Name      = "stepsTextBox";
     this.stepsTextBox.ReadOnly  = true;
     this.stepsTextBox.Size      = new System.Drawing.Size(296, 87);
     this.stepsTextBox.TabIndex  = 3;
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.imageSelection2);
     this.groupBox1.Controls.Add(this.imageSelection1);
     this.groupBox1.Location = new System.Drawing.Point(12, 190);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(84, 69);
     this.groupBox1.TabIndex = 4;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "Test Image";
     //
     // imageSelection2
     //
     this.imageSelection2.AutoSize = true;
     this.imageSelection2.Location = new System.Drawing.Point(10, 43);
     this.imageSelection2.Name     = "imageSelection2";
     this.imageSelection2.Size     = new System.Drawing.Size(63, 17);
     this.imageSelection2.TabIndex = 0;
     this.imageSelection2.Text     = "Image 2";
     this.imageSelection2.UseVisualStyleBackColor = true;
     this.imageSelection2.CheckedChanged         += new System.EventHandler(this.imageSelection2_CheckedChanged);
     //
     // imageSelection1
     //
     this.imageSelection1.AutoSize = true;
     this.imageSelection1.Checked  = true;
     this.imageSelection1.Location = new System.Drawing.Point(10, 20);
     this.imageSelection1.Name     = "imageSelection1";
     this.imageSelection1.Size     = new System.Drawing.Size(63, 17);
     this.imageSelection1.TabIndex = 0;
     this.imageSelection1.TabStop  = true;
     this.imageSelection1.Text     = "Image 1";
     this.imageSelection1.UseVisualStyleBackColor = true;
     this.imageSelection1.CheckedChanged         += new System.EventHandler(this.imageSelection1_CheckedChanged);
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.imageTypeHSL);
     this.groupBox2.Controls.Add(this.imageTypeRGB);
     this.groupBox2.Location = new System.Drawing.Point(102, 190);
     this.groupBox2.Name     = "groupBox2";
     this.groupBox2.Size     = new System.Drawing.Size(206, 69);
     this.groupBox2.TabIndex = 5;
     this.groupBox2.TabStop  = false;
     this.groupBox2.Text     = "Threshold Color Mode";
     //
     // imageTypeHSL
     //
     this.imageTypeHSL.AutoSize = true;
     this.imageTypeHSL.Location = new System.Drawing.Point(12, 43);
     this.imageTypeHSL.Name     = "imageTypeHSL";
     this.imageTypeHSL.Size     = new System.Drawing.Size(187, 17);
     this.imageTypeHSL.TabIndex = 0;
     this.imageTypeHSL.Text     = "HSL (Hue, Saturation, Luminance)";
     this.imageTypeHSL.UseVisualStyleBackColor = true;
     this.imageTypeHSL.CheckedChanged         += new System.EventHandler(this.imageTypeHSL_CheckedChanged);
     //
     // imageTypeRGB
     //
     this.imageTypeRGB.AutoSize = true;
     this.imageTypeRGB.Checked  = true;
     this.imageTypeRGB.Location = new System.Drawing.Point(12, 20);
     this.imageTypeRGB.Name     = "imageTypeRGB";
     this.imageTypeRGB.Size     = new System.Drawing.Size(139, 17);
     this.imageTypeRGB.TabIndex = 0;
     this.imageTypeRGB.TabStop  = true;
     this.imageTypeRGB.Text     = "RGB (Red, Green, Blue)";
     this.imageTypeRGB.UseVisualStyleBackColor = true;
     this.imageTypeRGB.CheckedChanged         += new System.EventHandler(this.imageTypeRGB_CheckedChanged);
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(25, 265);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(62, 13);
     this.label3.TabIndex = 15;
     this.label3.Text     = "Red or Hue";
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Location = new System.Drawing.Point(25, 376);
     this.label8.Name     = "label8";
     this.label8.Size     = new System.Drawing.Size(99, 13);
     this.label8.TabIndex = 15;
     this.label8.Text     = "Green or Saturation";
     //
     // label11
     //
     this.label11.AutoSize = true;
     this.label11.Location = new System.Drawing.Point(25, 487);
     this.label11.Name     = "label11";
     this.label11.Size     = new System.Drawing.Size(95, 13);
     this.label11.TabIndex = 15;
     this.label11.Text     = "Blue or Luminance";
     //
     // imageViewer1
     //
     this.imageViewer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.imageViewer1.Location    = new System.Drawing.Point(342, 18);
     this.imageViewer1.Name        = "imageViewer1";
     this.imageViewer1.Size        = new System.Drawing.Size(312, 247);
     this.imageViewer1.TabIndex    = 16;
     //
     // imageViewer2
     //
     this.imageViewer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.imageViewer2.Location    = new System.Drawing.Point(342, 293);
     this.imageViewer2.Name        = "imageViewer2";
     palette8.Type              = NationalInstruments.Vision.WindowsForms.PaletteType.Binary;
     this.imageViewer2.Palette  = palette8;
     this.imageViewer2.Size     = new System.Drawing.Size(312, 247);
     this.imageViewer2.TabIndex = 16;
     //
     // label12
     //
     this.label12.AutoSize = true;
     this.label12.Location = new System.Drawing.Point(339, 2);
     this.label12.Name     = "label12";
     this.label12.Size     = new System.Drawing.Size(74, 13);
     this.label12.TabIndex = 17;
     this.label12.Text     = "Original Image";
     //
     // imageViewer2Label
     //
     this.imageViewer2Label.AutoSize = true;
     this.imageViewer2Label.Location = new System.Drawing.Point(339, 277);
     this.imageViewer2Label.Name     = "imageViewer2Label";
     this.imageViewer2Label.Size     = new System.Drawing.Size(0, 13);
     this.imageViewer2Label.TabIndex = 17;
     //
     // quitButton
     //
     this.quitButton.Location = new System.Drawing.Point(229, 9);
     this.quitButton.Name     = "quitButton";
     this.quitButton.Size     = new System.Drawing.Size(79, 35);
     this.quitButton.TabIndex = 18;
     this.quitButton.Text     = "Quit";
     this.quitButton.UseVisualStyleBackColor = true;
     this.quitButton.Click += new System.EventHandler(this.quitButton_Click);
     //
     // redMinimumSlide
     //
     this.redMinimumSlide.AutoSize      = true;
     this.redMinimumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.redMinimumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Red;
     this.redMinimumSlide.Location      = new System.Drawing.Point(22, 277);
     this.redMinimumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.redMinimumSlide.Name          = "redMinimumSlide";
     this.redMinimumSlide.Size          = new System.Drawing.Size(203, 53);
     this.redMinimumSlide.TabIndex      = 19;
     this.redMinimumSlide.Value         = 42;
     this.redMinimumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.redMinimumSlide_ValueChanged);
     //
     // redMaximumSlide
     //
     this.redMaximumSlide.AutoSize      = true;
     this.redMaximumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.redMaximumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Red;
     this.redMaximumSlide.Location      = new System.Drawing.Point(22, 321);
     this.redMaximumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.redMaximumSlide.Name          = "redMaximumSlide";
     this.redMaximumSlide.Size          = new System.Drawing.Size(203, 53);
     this.redMaximumSlide.TabIndex      = 19;
     this.redMaximumSlide.Value         = 121;
     this.redMaximumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.redMaximumSlide_ValueChanged);
     //
     // greenMinimumSlide
     //
     this.greenMinimumSlide.AutoSize      = true;
     this.greenMinimumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.greenMinimumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Green;
     this.greenMinimumSlide.Location      = new System.Drawing.Point(22, 387);
     this.greenMinimumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.greenMinimumSlide.Name          = "greenMinimumSlide";
     this.greenMinimumSlide.Size          = new System.Drawing.Size(203, 53);
     this.greenMinimumSlide.TabIndex      = 19;
     this.greenMinimumSlide.Value         = 15;
     this.greenMinimumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.greenMinimumSlide_ValueChanged);
     //
     // greenMaximumSlide
     //
     this.greenMaximumSlide.AutoSize      = true;
     this.greenMaximumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.greenMaximumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Green;
     this.greenMaximumSlide.Location      = new System.Drawing.Point(22, 431);
     this.greenMaximumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.greenMaximumSlide.Name          = "greenMaximumSlide";
     this.greenMaximumSlide.Size          = new System.Drawing.Size(203, 53);
     this.greenMaximumSlide.TabIndex      = 19;
     this.greenMaximumSlide.Value         = 255;
     this.greenMaximumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.greenMaximumSlide_ValueChanged);
     //
     // blueMinimumSlide
     //
     this.blueMinimumSlide.AutoSize      = true;
     this.blueMinimumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.blueMinimumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Blue;
     this.blueMinimumSlide.Location      = new System.Drawing.Point(22, 499);
     this.blueMinimumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.blueMinimumSlide.Name          = "blueMinimumSlide";
     this.blueMinimumSlide.Size          = new System.Drawing.Size(203, 53);
     this.blueMinimumSlide.TabIndex      = 19;
     this.blueMinimumSlide.Value         = 54;
     this.blueMinimumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.blueMinimumSlide_ValueChanged);
     //
     // blueMaximumSlide
     //
     this.blueMaximumSlide.AutoSize      = true;
     this.blueMaximumSlide.AutoSizeMode  = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.blueMaximumSlide.ColorSet      = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.ColorScheme.Blue;
     this.blueMaximumSlide.Location      = new System.Drawing.Point(22, 543);
     this.blueMaximumSlide.Mode          = NationalInstruments.Vision.MeasurementStudioDemo.GenericSlider.SliderRangeMode.Default;
     this.blueMaximumSlide.Name          = "blueMaximumSlide";
     this.blueMaximumSlide.Size          = new System.Drawing.Size(203, 53);
     this.blueMaximumSlide.TabIndex      = 19;
     this.blueMaximumSlide.Value         = 255;
     this.blueMaximumSlide.ValueChanged += new System.EventHandler <System.EventArgs>(this.blueMaximumSlide_ValueChanged);
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(677, 597);
     this.Controls.Add(this.blueMaximumSlide);
     this.Controls.Add(this.blueMinimumSlide);
     this.Controls.Add(this.greenMaximumSlide);
     this.Controls.Add(this.greenMinimumSlide);
     this.Controls.Add(this.redMaximumSlide);
     this.Controls.Add(this.redMinimumSlide);
     this.Controls.Add(this.quitButton);
     this.Controls.Add(this.imageViewer2Label);
     this.Controls.Add(this.label12);
     this.Controls.Add(this.imageViewer2);
     this.Controls.Add(this.imageViewer1);
     this.Controls.Add(this.label11);
     this.Controls.Add(this.label8);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.groupBox2);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.stepsTextBox);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.stepNumber);
     this.Controls.Add(this.label1);
     this.Name  = "Form1";
     this.Text  = "Color Threshold Example";
     this.Load += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.stepNumber)).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.groupBox2.ResumeLayout(false);
     this.groupBox2.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }