using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using HalconDotNet;
namespace HalconTools
{
///
/// This project provides the main functionality of HDevelop's Measure Assistant,
/// with the main exception of fuzzy measure.
/// In the first tab you can adjust the parameters for edge
/// detection. The second tab displays the measure results and the
/// third tab plots the gray value profile of the selected ROI.
/// The project is composed of several classes for paremeterizing
/// the measurements (like MeasurementEdge, MeasurementPair or
/// MeasurementResult) and the controller class MeasureAssistant,
/// which is in charge of the communication between the GUI-frontend
/// and the model classes.
///
public class frmMeasureAssistant : System.Windows.Forms.Form
{
/* base variables */
private HWindowControl viewPort;
private HWndCtrl mView;
private ROIController roiController;
private MeasureAssistant mAssistant;
private HXLDCont mShadow;
private FunctionPlot plotGraphWindow;
private HImage currImage;
/* display parameters */
private string regionColor;
private string edgeColor;
private int lineWidth;
private bool displayRegion;
private bool useShadow;
private bool updateLineProfile;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button LoadImgButton;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton NoneButton;
private System.Windows.Forms.RadioButton MoveButton;
private System.Windows.Forms.RadioButton ZoomButton;
private System.Windows.Forms.Button LineButton;
private System.Windows.Forms.Button DeleteActRoiButton;
private System.Windows.Forms.Button ResetROIButton;
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage tabPageEdges;
private System.Windows.Forms.TabPage tabPageResults;
private System.Windows.Forms.OpenFileDialog openImageFileDialog;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.CheckBox EdgeToPaircheckBox;
private System.Windows.Forms.RadioButton MagnifyButton;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.ComboBox TransitionComboBox;
private System.Windows.Forms.ComboBox PositionComboBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox RegionColorComboBox;
private System.Windows.Forms.ComboBox EdgeColorComboBox;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown EdgeLengthUpDown;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.NumericUpDown LineWidthDown;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.CheckBox ShowRegionCheckBox;
private System.Windows.Forms.CheckBox UseShadowsCheckBox;
private System.Windows.Forms.CheckBox UseROIWidthCheckBox;
private System.Windows.Forms.NumericUpDown ROIWidthUpDown;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.NumericUpDown SmoothingUpDown;
private System.Windows.Forms.NumericUpDown MinEdgAmplUpDown;
private System.Windows.Forms.ComboBox InterpolationComboBox;
private System.Windows.Forms.Button ResetViewButton;
private System.Windows.Forms.TrackBar MinEdgAmplTrackBar;
private System.Windows.Forms.TrackBar SmoothingTrackBar;
private System.Windows.Forms.TrackBar ROIWidthTrackBar;
private System.Windows.Forms.Button ResetMinEdgAmplButton;
private System.Windows.Forms.Label StatusLabel;
private System.Windows.Forms.Button ResetSmoothingButton;
private System.Windows.Forms.Button ResetROIWidthButton;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.CheckBox PositionCheckBox;
private System.Windows.Forms.CheckBox PairWidthCheckBox;
private System.Windows.Forms.CheckBox AmplitudeCheckBox;
private System.Windows.Forms.CheckBox DistanceCheckBox;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.CheckBox TransWCoordCheckBox;
private System.Windows.Forms.Button LoadPoseButton;
private System.Windows.Forms.Button LoadCalibButton;
private System.Windows.Forms.TextBox CalibCamTextBox;
private System.Windows.Forms.TextBox CalibPoseTextBox;
private System.Windows.Forms.ListView EdgeResultListView;
private System.Windows.Forms.OpenFileDialog openCamparFileDialog;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.ComboBox UnitComboBox;
private System.Windows.Forms.Panel UnitPanel;
private System.Windows.Forms.ListBox ActiveROIListBox;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.CheckBox ShowROIcheckBox;
private System.Windows.Forms.Button CircArcButton;
private System.Windows.Forms.TabPage tabPageLineProfile;
private System.Windows.Forms.GroupBox groupBox9;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Panel panelAxis;
private System.Windows.Forms.Label labelDeviation;
private System.Windows.Forms.Label labelMean;
private System.Windows.Forms.Label labelRange;
private System.Windows.Forms.Label labelPeak;
private System.Windows.Forms.Label labelRangeX;
private System.Windows.Forms.Label labelPeakX;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.ComboBox CSScaleComboBox;
private GroupBox groupBox3;
private TabPage tabPageSaveConfige;
private Button btnSaveConfige;
private Label label11;
private Label labMinEdgeAmpl;
private Label label12;
private Label labMinEdgeAmplSet;
private Label labROIWidth;
private Label labROIWidthSet;
private Label labSmoothing;
private Label labSmoothingSet;
private Label labROIHeightSet;
private Label labTransition;
private Label labTransitionSet;
private Label labInterpolation;
private Label labInterpolationSet;
private Label labPosition;
private Label labPositionSet;
private GroupBox groupBox10;
private Button butRoiHeightReset;
private TrackBar tBroiHeight;
private NumericUpDown numUDRoiHeight;
private Label labROIHeight1;
private Label labROIHeight;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public frmMeasureAssistant()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
private HImage mImage;
public frmMeasureAssistant(HImage image)
{
InitializeComponent();
mImage = image;
initLoadImage();
}
private void initLoadImage()
{
InitViewer();
int dispROI = HWndCtrl.MODE_INCLUDE_ROI;
roiController.reset();
mView.resetWindow();
mAssistant.setImage(mImage);
currImage = mAssistant.getImage();
mView.setDispLevel(dispROI);
UpdateView();
}
public frmMeasureAssistant(string name)
{
InitializeComponent();
ResourceCulture.SetCurrentCulture(name);
ResourceCulture.SetLanguage((Control)this);
}
///
/// Cleans up the used resources.
///
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.viewPort = new HalconDotNet.HWindowControl();
this.tabControl = new System.Windows.Forms.TabControl();
this.tabPageEdges = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.ShowROIcheckBox = new System.Windows.Forms.CheckBox();
this.UseROIWidthCheckBox = new System.Windows.Forms.CheckBox();
this.UseShadowsCheckBox = new System.Windows.Forms.CheckBox();
this.ShowRegionCheckBox = new System.Windows.Forms.CheckBox();
this.label6 = new System.Windows.Forms.Label();
this.LineWidthDown = new System.Windows.Forms.NumericUpDown();
this.label5 = new System.Windows.Forms.Label();
this.EdgeLengthUpDown = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.EdgeColorComboBox = new System.Windows.Forms.ComboBox();
this.RegionColorComboBox = new System.Windows.Forms.ComboBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.PositionComboBox = new System.Windows.Forms.ComboBox();
this.TransitionComboBox = new System.Windows.Forms.ComboBox();
this.EdgeToPaircheckBox = new System.Windows.Forms.CheckBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.butRoiHeightReset = new System.Windows.Forms.Button();
this.tBroiHeight = new System.Windows.Forms.TrackBar();
this.numUDRoiHeight = new System.Windows.Forms.NumericUpDown();
this.labROIHeight1 = new System.Windows.Forms.Label();
this.ResetROIWidthButton = new System.Windows.Forms.Button();
this.ResetSmoothingButton = new System.Windows.Forms.Button();
this.ResetMinEdgAmplButton = new System.Windows.Forms.Button();
this.ROIWidthTrackBar = new System.Windows.Forms.TrackBar();
this.SmoothingTrackBar = new System.Windows.Forms.TrackBar();
this.MinEdgAmplTrackBar = new System.Windows.Forms.TrackBar();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.MinEdgAmplUpDown = new System.Windows.Forms.NumericUpDown();
this.SmoothingUpDown = new System.Windows.Forms.NumericUpDown();
this.InterpolationComboBox = new System.Windows.Forms.ComboBox();
this.ROIWidthUpDown = new System.Windows.Forms.NumericUpDown();
this.tabPageResults = new System.Windows.Forms.TabPage();
this.label15 = new System.Windows.Forms.Label();
this.ActiveROIListBox = new System.Windows.Forms.ListBox();
this.EdgeResultListView = new System.Windows.Forms.ListView();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.UnitPanel = new System.Windows.Forms.Panel();
this.label14 = new System.Windows.Forms.Label();
this.UnitComboBox = new System.Windows.Forms.ComboBox();
this.CalibPoseTextBox = new System.Windows.Forms.TextBox();
this.CalibCamTextBox = new System.Windows.Forms.TextBox();
this.LoadPoseButton = new System.Windows.Forms.Button();
this.LoadCalibButton = new System.Windows.Forms.Button();
this.TransWCoordCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.DistanceCheckBox = new System.Windows.Forms.CheckBox();
this.AmplitudeCheckBox = new System.Windows.Forms.CheckBox();
this.PairWidthCheckBox = new System.Windows.Forms.CheckBox();
this.PositionCheckBox = new System.Windows.Forms.CheckBox();
this.tabPageLineProfile = new System.Windows.Forms.TabPage();
this.label20 = new System.Windows.Forms.Label();
this.CSScaleComboBox = new System.Windows.Forms.ComboBox();
this.panelAxis = new System.Windows.Forms.Panel();
this.groupBox9 = new System.Windows.Forms.GroupBox();
this.labelDeviation = new System.Windows.Forms.Label();
this.labelMean = new System.Windows.Forms.Label();
this.labelRange = new System.Windows.Forms.Label();
this.labelPeak = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label25 = new System.Windows.Forms.Label();
this.labelRangeX = new System.Windows.Forms.Label();
this.labelPeakX = new System.Windows.Forms.Label();
this.label23 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.tabPageSaveConfige = new System.Windows.Forms.TabPage();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.labROIHeight = new System.Windows.Forms.Label();
this.labROIHeightSet = new System.Windows.Forms.Label();
this.labPosition = new System.Windows.Forms.Label();
this.labPositionSet = new System.Windows.Forms.Label();
this.labTransition = new System.Windows.Forms.Label();
this.labTransitionSet = new System.Windows.Forms.Label();
this.labInterpolation = new System.Windows.Forms.Label();
this.labInterpolationSet = new System.Windows.Forms.Label();
this.labROIWidth = new System.Windows.Forms.Label();
this.labROIWidthSet = new System.Windows.Forms.Label();
this.labSmoothing = new System.Windows.Forms.Label();
this.labSmoothingSet = new System.Windows.Forms.Label();
this.labMinEdgeAmpl = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.labMinEdgeAmplSet = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.btnSaveConfige = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.CircArcButton = new System.Windows.Forms.Button();
this.LineButton = new System.Windows.Forms.Button();
this.DeleteActRoiButton = new System.Windows.Forms.Button();
this.ResetROIButton = new System.Windows.Forms.Button();
this.LoadImgButton = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.ResetViewButton = new System.Windows.Forms.Button();
this.MagnifyButton = new System.Windows.Forms.RadioButton();
this.ZoomButton = new System.Windows.Forms.RadioButton();
this.MoveButton = new System.Windows.Forms.RadioButton();
this.NoneButton = new System.Windows.Forms.RadioButton();
this.openImageFileDialog = new System.Windows.Forms.OpenFileDialog();
this.StatusLabel = new System.Windows.Forms.Label();
this.openCamparFileDialog = new System.Windows.Forms.OpenFileDialog();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tabControl.SuspendLayout();
this.tabPageEdges.SuspendLayout();
this.groupBox6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LineWidthDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.EdgeLengthUpDown)).BeginInit();
this.groupBox5.SuspendLayout();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tBroiHeight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ROIWidthTrackBar)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.SmoothingTrackBar)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplTrackBar)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.SmoothingUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ROIWidthUpDown)).BeginInit();
this.tabPageResults.SuspendLayout();
this.groupBox8.SuspendLayout();
this.UnitPanel.SuspendLayout();
this.groupBox7.SuspendLayout();
this.tabPageLineProfile.SuspendLayout();
this.groupBox9.SuspendLayout();
this.tabPageSaveConfige.SuspendLayout();
this.groupBox10.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// viewPort
//
this.viewPort.BackColor = System.Drawing.Color.Black;
this.viewPort.BorderColor = System.Drawing.Color.Black;
this.viewPort.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480);
this.viewPort.Location = new System.Drawing.Point(10, 55);
this.viewPort.Name = "viewPort";
this.viewPort.Size = new System.Drawing.Size(785, 545);
this.viewPort.TabIndex = 0;
this.viewPort.WindowSize = new System.Drawing.Size(785, 545);
this.viewPort.HMouseMove += new HalconDotNet.HMouseEventHandler(this.viewPort_HMouseMove);
//
// tabControl
//
this.tabControl.Controls.Add(this.tabPageEdges);
this.tabControl.Controls.Add(this.tabPageResults);
this.tabControl.Controls.Add(this.tabPageLineProfile);
this.tabControl.Controls.Add(this.tabPageSaveConfige);
this.tabControl.Location = new System.Drawing.Point(801, 12);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(430, 593);
this.tabControl.TabIndex = 1;
this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged);
//
// tabPageEdges
//
this.tabPageEdges.Controls.Add(this.groupBox6);
this.tabPageEdges.Controls.Add(this.groupBox5);
this.tabPageEdges.Controls.Add(this.groupBox4);
this.tabPageEdges.Location = new System.Drawing.Point(4, 22);
this.tabPageEdges.Name = "tabPageEdges";
this.tabPageEdges.Size = new System.Drawing.Size(422, 567);
this.tabPageEdges.TabIndex = 1;
this.tabPageEdges.Text = " Edges ";
this.tabPageEdges.UseVisualStyleBackColor = true;
//
// groupBox6
//
this.groupBox6.Controls.Add(this.ShowROIcheckBox);
this.groupBox6.Controls.Add(this.UseROIWidthCheckBox);
this.groupBox6.Controls.Add(this.UseShadowsCheckBox);
this.groupBox6.Controls.Add(this.ShowRegionCheckBox);
this.groupBox6.Controls.Add(this.label6);
this.groupBox6.Controls.Add(this.LineWidthDown);
this.groupBox6.Controls.Add(this.label5);
this.groupBox6.Controls.Add(this.EdgeLengthUpDown);
this.groupBox6.Controls.Add(this.label4);
this.groupBox6.Controls.Add(this.label3);
this.groupBox6.Controls.Add(this.EdgeColorComboBox);
this.groupBox6.Controls.Add(this.RegionColorComboBox);
this.groupBox6.Location = new System.Drawing.Point(10, 392);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(403, 172);
this.groupBox6.TabIndex = 3;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Display Parameters";
//
// ShowROIcheckBox
//
this.ShowROIcheckBox.Location = new System.Drawing.Point(259, 138);
this.ShowROIcheckBox.Name = "ShowROIcheckBox";
this.ShowROIcheckBox.Size = new System.Drawing.Size(125, 26);
this.ShowROIcheckBox.TabIndex = 11;
this.ShowROIcheckBox.Text = " Show ROIs";
this.ShowROIcheckBox.CheckedChanged += new System.EventHandler(this.ShowROIcheckBox_CheckedChanged);
//
// UseROIWidthCheckBox
//
this.UseROIWidthCheckBox.Location = new System.Drawing.Point(259, 103);
this.UseROIWidthCheckBox.Name = "UseROIWidthCheckBox";
this.UseROIWidthCheckBox.Size = new System.Drawing.Size(125, 26);
this.UseROIWidthCheckBox.TabIndex = 10;
this.UseROIWidthCheckBox.Text = "Use ROI Width";
this.UseROIWidthCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.UseROIWidthCheckBox.CheckedChanged += new System.EventHandler(this.UseROIWidthCheckBox_CheckedChanged);
//
// UseShadowsCheckBox
//
this.UseShadowsCheckBox.Location = new System.Drawing.Point(259, 69);
this.UseShadowsCheckBox.Name = "UseShadowsCheckBox";
this.UseShadowsCheckBox.Size = new System.Drawing.Size(115, 26);
this.UseShadowsCheckBox.TabIndex = 9;
this.UseShadowsCheckBox.Text = "Use Shadows";
this.UseShadowsCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.UseShadowsCheckBox.CheckedChanged += new System.EventHandler(this.UseShadowsCheckBox_CheckedChanged);
//
// ShowRegionCheckBox
//
this.ShowRegionCheckBox.Location = new System.Drawing.Point(259, 34);
this.ShowRegionCheckBox.Name = "ShowRegionCheckBox";
this.ShowRegionCheckBox.Size = new System.Drawing.Size(115, 26);
this.ShowRegionCheckBox.TabIndex = 8;
this.ShowRegionCheckBox.Text = "Show Region";
this.ShowRegionCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.ShowRegionCheckBox.CheckedChanged += new System.EventHandler(this.ShowRegionCheckBox_CheckedChanged);
//
// label6
//
this.label6.Location = new System.Drawing.Point(10, 138);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(86, 26);
this.label6.TabIndex = 7;
this.label6.Text = "Line Width";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// LineWidthDown
//
this.LineWidthDown.Location = new System.Drawing.Point(106, 138);
this.LineWidthDown.Maximum = new decimal(new int[] {
9,
0,
0,
0});
this.LineWidthDown.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.LineWidthDown.Name = "LineWidthDown";
this.LineWidthDown.Size = new System.Drawing.Size(134, 21);
this.LineWidthDown.TabIndex = 6;
this.LineWidthDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.LineWidthDown.Value = new decimal(new int[] {
1,
0,
0,
0});
this.LineWidthDown.ValueChanged += new System.EventHandler(this.LineWidthDown_ValueChanged);
//
// label5
//
this.label5.Location = new System.Drawing.Point(10, 103);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(86, 26);
this.label5.TabIndex = 5;
this.label5.Text = "Edge Length";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// EdgeLengthUpDown
//
this.EdgeLengthUpDown.Location = new System.Drawing.Point(106, 103);
this.EdgeLengthUpDown.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.EdgeLengthUpDown.Name = "EdgeLengthUpDown";
this.EdgeLengthUpDown.Size = new System.Drawing.Size(134, 21);
this.EdgeLengthUpDown.TabIndex = 4;
this.EdgeLengthUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.EdgeLengthUpDown.Value = new decimal(new int[] {
1,
0,
0,
0});
this.EdgeLengthUpDown.ValueChanged += new System.EventHandler(this.EdgeLengthUpDown_ValueChanged);
//
// label4
//
this.label4.Location = new System.Drawing.Point(10, 69);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(86, 26);
this.label4.TabIndex = 3;
this.label4.Text = "Edge Color";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label3
//
this.label3.Location = new System.Drawing.Point(10, 34);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(86, 26);
this.label3.TabIndex = 2;
this.label3.Text = "Region Color";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// EdgeColorComboBox
//
this.EdgeColorComboBox.Items.AddRange(new object[] {
"green",
"red",
"blue",
"black",
"white",
"yellow",
"magenta",
"cyan",
"gray"});
this.EdgeColorComboBox.Location = new System.Drawing.Point(106, 69);
this.EdgeColorComboBox.Name = "EdgeColorComboBox";
this.EdgeColorComboBox.Size = new System.Drawing.Size(134, 20);
this.EdgeColorComboBox.TabIndex = 1;
this.EdgeColorComboBox.Text = "EdgeColor";
this.EdgeColorComboBox.SelectedIndexChanged += new System.EventHandler(this.EdgeColorComboBox_SelectedIndexChanged);
//
// RegionColorComboBox
//
this.RegionColorComboBox.Items.AddRange(new object[] {
"green",
"red",
"blue",
"black",
"white",
"yellow",
"magenta",
"cyan",
"gray"});
this.RegionColorComboBox.Location = new System.Drawing.Point(106, 34);
this.RegionColorComboBox.Name = "RegionColorComboBox";
this.RegionColorComboBox.Size = new System.Drawing.Size(134, 20);
this.RegionColorComboBox.TabIndex = 0;
this.RegionColorComboBox.Text = "RegionColor";
this.RegionColorComboBox.SelectedIndexChanged += new System.EventHandler(this.RegionColorComboBox_SelectedIndexChanged);
//
// groupBox5
//
this.groupBox5.Controls.Add(this.label2);
this.groupBox5.Controls.Add(this.label1);
this.groupBox5.Controls.Add(this.PositionComboBox);
this.groupBox5.Controls.Add(this.TransitionComboBox);
this.groupBox5.Controls.Add(this.EdgeToPaircheckBox);
this.groupBox5.Location = new System.Drawing.Point(10, 252);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(403, 134);
this.groupBox5.TabIndex = 2;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Edge Selection";
//
// label2
//
this.label2.Location = new System.Drawing.Point(21, 93);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(76, 26);
this.label2.TabIndex = 5;
this.label2.Text = "Position";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label1
//
this.label1.Location = new System.Drawing.Point(21, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(76, 26);
this.label1.TabIndex = 4;
this.label1.Text = "Transition";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// PositionComboBox
//
this.PositionComboBox.Items.AddRange(new object[] {
"all",
"first",
"last"});
this.PositionComboBox.Location = new System.Drawing.Point(117, 93);
this.PositionComboBox.Name = "PositionComboBox";
this.PositionComboBox.Size = new System.Drawing.Size(192, 20);
this.PositionComboBox.TabIndex = 3;
this.PositionComboBox.Text = "Position";
this.PositionComboBox.SelectedIndexChanged += new System.EventHandler(this.PositionComboBox_SelectedIndexChanged);
//
// TransitionComboBox
//
this.TransitionComboBox.Items.AddRange(new object[] {
"all",
"positive",
"negative"});
this.TransitionComboBox.Location = new System.Drawing.Point(117, 50);
this.TransitionComboBox.Name = "TransitionComboBox";
this.TransitionComboBox.Size = new System.Drawing.Size(192, 20);
this.TransitionComboBox.TabIndex = 2;
this.TransitionComboBox.Text = "Transition";
this.TransitionComboBox.SelectedIndexChanged += new System.EventHandler(this.TransitionComboBox_SelectedIndexChanged);
//
// EdgeToPaircheckBox
//
this.EdgeToPaircheckBox.Location = new System.Drawing.Point(117, 16);
this.EdgeToPaircheckBox.Name = "EdgeToPaircheckBox";
this.EdgeToPaircheckBox.Size = new System.Drawing.Size(172, 26);
this.EdgeToPaircheckBox.TabIndex = 1;
this.EdgeToPaircheckBox.Text = "Group Edges to Pairs";
this.EdgeToPaircheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.EdgeToPaircheckBox.CheckedChanged += new System.EventHandler(this.EdgeToPaircheckBox_CheckedChanged);
//
// groupBox4
//
this.groupBox4.Controls.Add(this.butRoiHeightReset);
this.groupBox4.Controls.Add(this.tBroiHeight);
this.groupBox4.Controls.Add(this.numUDRoiHeight);
this.groupBox4.Controls.Add(this.labROIHeight1);
this.groupBox4.Controls.Add(this.ResetROIWidthButton);
this.groupBox4.Controls.Add(this.ResetSmoothingButton);
this.groupBox4.Controls.Add(this.ResetMinEdgAmplButton);
this.groupBox4.Controls.Add(this.ROIWidthTrackBar);
this.groupBox4.Controls.Add(this.SmoothingTrackBar);
this.groupBox4.Controls.Add(this.MinEdgAmplTrackBar);
this.groupBox4.Controls.Add(this.label10);
this.groupBox4.Controls.Add(this.label9);
this.groupBox4.Controls.Add(this.label8);
this.groupBox4.Controls.Add(this.label7);
this.groupBox4.Controls.Add(this.MinEdgAmplUpDown);
this.groupBox4.Controls.Add(this.SmoothingUpDown);
this.groupBox4.Controls.Add(this.InterpolationComboBox);
this.groupBox4.Controls.Add(this.ROIWidthUpDown);
this.groupBox4.Location = new System.Drawing.Point(10, 17);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(403, 229);
this.groupBox4.TabIndex = 1;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Edge Extraction";
//
// butRoiHeightReset
//
this.butRoiHeightReset.Location = new System.Drawing.Point(339, 141);
this.butRoiHeightReset.Name = "butRoiHeightReset";
this.butRoiHeightReset.Size = new System.Drawing.Size(58, 26);
this.butRoiHeightReset.TabIndex = 53;
this.butRoiHeightReset.Text = "Reset";
this.butRoiHeightReset.Click += new System.EventHandler(this.butRoiHeightReset_Click);
//
// tBroiHeight
//
this.tBroiHeight.Location = new System.Drawing.Point(163, 127);
this.tBroiHeight.Maximum = 2000;
this.tBroiHeight.Minimum = 5;
this.tBroiHeight.Name = "tBroiHeight";
this.tBroiHeight.Size = new System.Drawing.Size(173, 45);
this.tBroiHeight.TabIndex = 52;
this.tBroiHeight.TickFrequency = 10;
this.tBroiHeight.TickStyle = System.Windows.Forms.TickStyle.None;
this.tBroiHeight.Value = 20;
this.tBroiHeight.ValueChanged += new System.EventHandler(this.tBroiHeight_ValueChanged);
//
// numUDRoiHeight
//
this.numUDRoiHeight.Location = new System.Drawing.Point(106, 127);
this.numUDRoiHeight.Maximum = new decimal(new int[] {
2000,
0,
0,
0});
this.numUDRoiHeight.Minimum = new decimal(new int[] {
5,
0,
0,
0});
this.numUDRoiHeight.Name = "numUDRoiHeight";
this.numUDRoiHeight.Size = new System.Drawing.Size(57, 21);
this.numUDRoiHeight.TabIndex = 51;
this.numUDRoiHeight.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numUDRoiHeight.Value = new decimal(new int[] {
20,
0,
0,
0});
this.numUDRoiHeight.ValueChanged += new System.EventHandler(this.numUDRoiHeight_ValueChanged);
//
// labROIHeight1
//
this.labROIHeight1.BackColor = System.Drawing.SystemColors.Control;
this.labROIHeight1.Location = new System.Drawing.Point(10, 127);
this.labROIHeight1.Name = "labROIHeight1";
this.labROIHeight1.Size = new System.Drawing.Size(96, 26);
this.labROIHeight1.TabIndex = 50;
this.labROIHeight1.Text = "ROI Height";
this.labROIHeight1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// ResetROIWidthButton
//
this.ResetROIWidthButton.Location = new System.Drawing.Point(336, 95);
this.ResetROIWidthButton.Name = "ResetROIWidthButton";
this.ResetROIWidthButton.Size = new System.Drawing.Size(58, 26);
this.ResetROIWidthButton.TabIndex = 14;
this.ResetROIWidthButton.Text = "Reset";
this.ResetROIWidthButton.Click += new System.EventHandler(this.ResetROIWidthButton_Click);
//
// ResetSmoothingButton
//
this.ResetSmoothingButton.Location = new System.Drawing.Point(336, 60);
this.ResetSmoothingButton.Name = "ResetSmoothingButton";
this.ResetSmoothingButton.Size = new System.Drawing.Size(58, 26);
this.ResetSmoothingButton.TabIndex = 13;
this.ResetSmoothingButton.Text = "Reset";
this.ResetSmoothingButton.Click += new System.EventHandler(this.ResetSmoothingButton_Click);
//
// ResetMinEdgAmplButton
//
this.ResetMinEdgAmplButton.Location = new System.Drawing.Point(336, 26);
this.ResetMinEdgAmplButton.Name = "ResetMinEdgAmplButton";
this.ResetMinEdgAmplButton.Size = new System.Drawing.Size(58, 26);
this.ResetMinEdgAmplButton.TabIndex = 12;
this.ResetMinEdgAmplButton.Text = "Reset";
this.ResetMinEdgAmplButton.Click += new System.EventHandler(this.ResetMinEdgAmplButton_Click);
//
// ROIWidthTrackBar
//
this.ROIWidthTrackBar.Location = new System.Drawing.Point(163, 93);
this.ROIWidthTrackBar.Maximum = 255;
this.ROIWidthTrackBar.Minimum = 1;
this.ROIWidthTrackBar.Name = "ROIWidthTrackBar";
this.ROIWidthTrackBar.Size = new System.Drawing.Size(173, 45);
this.ROIWidthTrackBar.TabIndex = 11;
this.ROIWidthTrackBar.TickFrequency = 10;
this.ROIWidthTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
this.ROIWidthTrackBar.Value = 1;
this.ROIWidthTrackBar.Scroll += new System.EventHandler(this.ROIWidthTrackBar_Scroll);
//
// SmoothingTrackBar
//
this.SmoothingTrackBar.Location = new System.Drawing.Point(163, 58);
this.SmoothingTrackBar.Maximum = 250;
this.SmoothingTrackBar.Minimum = 4;
this.SmoothingTrackBar.Name = "SmoothingTrackBar";
this.SmoothingTrackBar.Size = new System.Drawing.Size(173, 45);
this.SmoothingTrackBar.TabIndex = 10;
this.SmoothingTrackBar.TickFrequency = 10;
this.SmoothingTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
this.SmoothingTrackBar.Value = 4;
this.SmoothingTrackBar.Scroll += new System.EventHandler(this.SmoothingTrackBar_Scroll);
//
// MinEdgAmplTrackBar
//
this.MinEdgAmplTrackBar.Location = new System.Drawing.Point(163, 22);
this.MinEdgAmplTrackBar.Maximum = 255;
this.MinEdgAmplTrackBar.Minimum = 1;
this.MinEdgAmplTrackBar.Name = "MinEdgAmplTrackBar";
this.MinEdgAmplTrackBar.Size = new System.Drawing.Size(173, 45);
this.MinEdgAmplTrackBar.TabIndex = 9;
this.MinEdgAmplTrackBar.TickFrequency = 10;
this.MinEdgAmplTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
this.MinEdgAmplTrackBar.Value = 1;
this.MinEdgAmplTrackBar.Scroll += new System.EventHandler(this.MinEdgAmplTrackBar_Scroll);
//
// label10
//
this.label10.Location = new System.Drawing.Point(10, 93);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(96, 26);
this.label10.TabIndex = 8;
this.label10.Text = "ROI Width";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label9
//
this.label9.Location = new System.Drawing.Point(10, 60);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(96, 26);
this.label9.TabIndex = 7;
this.label9.Text = "Smoothing*10";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label8
//
this.label8.Location = new System.Drawing.Point(7, 184);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(87, 40);
this.label8.TabIndex = 6;
this.label8.Text = "Interpolation Method";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label7
//
this.label7.Location = new System.Drawing.Point(10, 26);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(96, 26);
this.label7.TabIndex = 5;
this.label7.Text = "Min.EdgeAmpl";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// MinEdgAmplUpDown
//
this.MinEdgAmplUpDown.Location = new System.Drawing.Point(106, 26);
this.MinEdgAmplUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.MinEdgAmplUpDown.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.MinEdgAmplUpDown.Name = "MinEdgAmplUpDown";
this.MinEdgAmplUpDown.Size = new System.Drawing.Size(57, 21);
this.MinEdgAmplUpDown.TabIndex = 3;
this.MinEdgAmplUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.MinEdgAmplUpDown.Value = new decimal(new int[] {
1,
0,
0,
0});
this.MinEdgAmplUpDown.ValueChanged += new System.EventHandler(this.MinEdgAmplUpDown_ValueChanged);
//
// SmoothingUpDown
//
this.SmoothingUpDown.Location = new System.Drawing.Point(106, 60);
this.SmoothingUpDown.Maximum = new decimal(new int[] {
250,
0,
0,
0});
this.SmoothingUpDown.Minimum = new decimal(new int[] {
4,
0,
0,
0});
this.SmoothingUpDown.Name = "SmoothingUpDown";
this.SmoothingUpDown.Size = new System.Drawing.Size(57, 21);
this.SmoothingUpDown.TabIndex = 2;
this.SmoothingUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.SmoothingUpDown.Value = new decimal(new int[] {
4,
0,
0,
0});
this.SmoothingUpDown.ValueChanged += new System.EventHandler(this.SmoothingUpDown_ValueChanged);
//
// InterpolationComboBox
//
this.InterpolationComboBox.Items.AddRange(new object[] {
"nearest_neighbor",
"bilinear",
"bicubic"});
this.InterpolationComboBox.Location = new System.Drawing.Point(106, 194);
this.InterpolationComboBox.Name = "InterpolationComboBox";
this.InterpolationComboBox.Size = new System.Drawing.Size(192, 20);
this.InterpolationComboBox.TabIndex = 1;
this.InterpolationComboBox.Text = "Interpolation";
this.InterpolationComboBox.SelectedIndexChanged += new System.EventHandler(this.InterpolationComboBox_SelectedIndexChanged);
//
// ROIWidthUpDown
//
this.ROIWidthUpDown.Location = new System.Drawing.Point(106, 95);
this.ROIWidthUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.ROIWidthUpDown.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.ROIWidthUpDown.Name = "ROIWidthUpDown";
this.ROIWidthUpDown.Size = new System.Drawing.Size(57, 21);
this.ROIWidthUpDown.TabIndex = 0;
this.ROIWidthUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.ROIWidthUpDown.Value = new decimal(new int[] {
1,
0,
0,
0});
this.ROIWidthUpDown.ValueChanged += new System.EventHandler(this.ROIWidthUpDown_ValueChanged);
//
// tabPageResults
//
this.tabPageResults.Controls.Add(this.label15);
this.tabPageResults.Controls.Add(this.ActiveROIListBox);
this.tabPageResults.Controls.Add(this.EdgeResultListView);
this.tabPageResults.Controls.Add(this.groupBox8);
this.tabPageResults.Controls.Add(this.groupBox7);
this.tabPageResults.Location = new System.Drawing.Point(4, 22);
this.tabPageResults.Name = "tabPageResults";
this.tabPageResults.Size = new System.Drawing.Size(422, 567);
this.tabPageResults.TabIndex = 2;
this.tabPageResults.Text = " Results ";
this.tabPageResults.UseVisualStyleBackColor = true;
//
// label15
//
this.label15.Location = new System.Drawing.Point(48, 207);
this.label15.Name = "label15";
this.label15.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label15.Size = new System.Drawing.Size(86, 26);
this.label15.TabIndex = 16;
this.label15.Text = "Active ROI";
this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// ActiveROIListBox
//
this.ActiveROIListBox.ItemHeight = 12;
this.ActiveROIListBox.Location = new System.Drawing.Point(137, 207);
this.ActiveROIListBox.Name = "ActiveROIListBox";
this.ActiveROIListBox.Size = new System.Drawing.Size(276, 76);
this.ActiveROIListBox.TabIndex = 15;
this.ActiveROIListBox.SelectedIndexChanged += new System.EventHandler(this.ActiveROIListBox_SelectedIndexChanged);
//
// EdgeResultListView
//
this.EdgeResultListView.AutoArrange = false;
this.EdgeResultListView.FullRowSelect = true;
this.EdgeResultListView.GridLines = true;
this.EdgeResultListView.Location = new System.Drawing.Point(12, 312);
this.EdgeResultListView.Name = "EdgeResultListView";
this.EdgeResultListView.Size = new System.Drawing.Size(401, 205);
this.EdgeResultListView.TabIndex = 14;
this.EdgeResultListView.UseCompatibleStateImageBehavior = false;
this.EdgeResultListView.View = System.Windows.Forms.View.Details;
//
// groupBox8
//
this.groupBox8.Controls.Add(this.UnitPanel);
this.groupBox8.Controls.Add(this.CalibPoseTextBox);
this.groupBox8.Controls.Add(this.CalibCamTextBox);
this.groupBox8.Controls.Add(this.LoadPoseButton);
this.groupBox8.Controls.Add(this.LoadCalibButton);
this.groupBox8.Controls.Add(this.TransWCoordCheckBox);
this.groupBox8.Location = new System.Drawing.Point(10, 78);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(403, 116);
this.groupBox8.TabIndex = 12;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "Feature Processing";
//
// UnitPanel
//
this.UnitPanel.Controls.Add(this.label14);
this.UnitPanel.Controls.Add(this.UnitComboBox);
this.UnitPanel.Location = new System.Drawing.Point(259, 17);
this.UnitPanel.Name = "UnitPanel";
this.UnitPanel.Size = new System.Drawing.Size(135, 35);
this.UnitPanel.TabIndex = 16;
//
// label14
//
this.label14.Location = new System.Drawing.Point(10, 9);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(48, 25);
this.label14.TabIndex = 4;
this.label14.Text = "Unit";
this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// UnitComboBox
//
this.UnitComboBox.Items.AddRange(new object[] {
"m",
"cm",
"mm",
"µm"});
this.UnitComboBox.Location = new System.Drawing.Point(67, 9);
this.UnitComboBox.Name = "UnitComboBox";
this.UnitComboBox.Size = new System.Drawing.Size(67, 20);
this.UnitComboBox.TabIndex = 3;
this.UnitComboBox.Text = "unit";
this.UnitComboBox.SelectedIndexChanged += new System.EventHandler(this.UnitComboBox_SelectedIndexChanged);
//
// CalibPoseTextBox
//
this.CalibPoseTextBox.Location = new System.Drawing.Point(144, 84);
this.CalibPoseTextBox.Name = "CalibPoseTextBox";
this.CalibPoseTextBox.ReadOnly = true;
this.CalibPoseTextBox.Size = new System.Drawing.Size(250, 21);
this.CalibPoseTextBox.TabIndex = 15;
this.CalibPoseTextBox.Text = " *.dat";
//
// CalibCamTextBox
//
this.CalibCamTextBox.Location = new System.Drawing.Point(144, 60);
this.CalibCamTextBox.Name = "CalibCamTextBox";
this.CalibCamTextBox.ReadOnly = true;
this.CalibCamTextBox.Size = new System.Drawing.Size(250, 21);
this.CalibCamTextBox.TabIndex = 14;
this.CalibCamTextBox.Text = " *.cal";
//
// LoadPoseButton
//
this.LoadPoseButton.Location = new System.Drawing.Point(19, 84);
this.LoadPoseButton.Name = "LoadPoseButton";
this.LoadPoseButton.Size = new System.Drawing.Size(106, 22);
this.LoadPoseButton.TabIndex = 13;
this.LoadPoseButton.Text = " Load Pose";
this.LoadPoseButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.LoadPoseButton.Click += new System.EventHandler(this.LoadCamParamButton_Click);
//
// LoadCalibButton
//
this.LoadCalibButton.Location = new System.Drawing.Point(19, 60);
this.LoadCalibButton.Name = "LoadCalibButton";
this.LoadCalibButton.Size = new System.Drawing.Size(106, 22);
this.LoadCalibButton.TabIndex = 12;
this.LoadCalibButton.Text = " Load CamPar";
this.LoadCalibButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.LoadCalibButton.Click += new System.EventHandler(this.LoadCamParamButton_Click);
//
// TransWCoordCheckBox
//
this.TransWCoordCheckBox.Location = new System.Drawing.Point(19, 26);
this.TransWCoordCheckBox.Name = "TransWCoordCheckBox";
this.TransWCoordCheckBox.Size = new System.Drawing.Size(234, 26);
this.TransWCoordCheckBox.TabIndex = 0;
this.TransWCoordCheckBox.Text = "Transform into World Coordinates";
this.TransWCoordCheckBox.CheckedChanged += new System.EventHandler(this.TransWCoordCheckBox_CheckedChanged);
//
// groupBox7
//
this.groupBox7.Controls.Add(this.DistanceCheckBox);
this.groupBox7.Controls.Add(this.AmplitudeCheckBox);
this.groupBox7.Controls.Add(this.PairWidthCheckBox);
this.groupBox7.Controls.Add(this.PositionCheckBox);
this.groupBox7.Location = new System.Drawing.Point(10, 17);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(403, 52);
this.groupBox7.TabIndex = 11;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "Feature Selection";
//
// DistanceCheckBox
//
this.DistanceCheckBox.Location = new System.Drawing.Point(206, 20);
this.DistanceCheckBox.Name = "DistanceCheckBox";
this.DistanceCheckBox.Size = new System.Drawing.Size(87, 26);
this.DistanceCheckBox.TabIndex = 3;
this.DistanceCheckBox.Text = "Distance";
this.DistanceCheckBox.CheckedChanged += new System.EventHandler(this.DistanceCheckBox_CheckedChanged);
//
// AmplitudeCheckBox
//
this.AmplitudeCheckBox.Location = new System.Drawing.Point(108, 20);
this.AmplitudeCheckBox.Name = "AmplitudeCheckBox";
this.AmplitudeCheckBox.Size = new System.Drawing.Size(96, 26);
this.AmplitudeCheckBox.TabIndex = 2;
this.AmplitudeCheckBox.Text = "Amplitude";
this.AmplitudeCheckBox.CheckedChanged += new System.EventHandler(this.AmplitudeCheckBox_CheckedChanged);
//
// PairWidthCheckBox
//
this.PairWidthCheckBox.Enabled = false;
this.PairWidthCheckBox.Location = new System.Drawing.Point(300, 20);
this.PairWidthCheckBox.Name = "PairWidthCheckBox";
this.PairWidthCheckBox.Size = new System.Drawing.Size(96, 26);
this.PairWidthCheckBox.TabIndex = 1;
this.PairWidthCheckBox.Text = "Pair Width";
this.PairWidthCheckBox.CheckedChanged += new System.EventHandler(this.PairWidthCheckBox_CheckedChanged);
//
// PositionCheckBox
//
this.PositionCheckBox.Location = new System.Drawing.Point(19, 20);
this.PositionCheckBox.Name = "PositionCheckBox";
this.PositionCheckBox.Size = new System.Drawing.Size(77, 26);
this.PositionCheckBox.TabIndex = 0;
this.PositionCheckBox.Text = "Position";
this.PositionCheckBox.CheckedChanged += new System.EventHandler(this.PositionCheckBox_CheckedChanged);
//
// tabPageLineProfile
//
this.tabPageLineProfile.Controls.Add(this.label20);
this.tabPageLineProfile.Controls.Add(this.CSScaleComboBox);
this.tabPageLineProfile.Controls.Add(this.panelAxis);
this.tabPageLineProfile.Controls.Add(this.groupBox9);
this.tabPageLineProfile.Location = new System.Drawing.Point(4, 22);
this.tabPageLineProfile.Name = "tabPageLineProfile";
this.tabPageLineProfile.Size = new System.Drawing.Size(422, 567);
this.tabPageLineProfile.TabIndex = 3;
this.tabPageLineProfile.Text = " LineProfile ";
this.tabPageLineProfile.UseVisualStyleBackColor = true;
//
// label20
//
this.label20.Location = new System.Drawing.Point(192, 43);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(96, 26);
this.label20.TabIndex = 6;
this.label20.Text = "Y-axis scale:";
this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CSScaleComboBox
//
this.CSScaleComboBox.Items.AddRange(new object[] {
"Adaptive",
"Increasing",
"Fixed"});
this.CSScaleComboBox.Location = new System.Drawing.Point(298, 43);
this.CSScaleComboBox.Name = "CSScaleComboBox";
this.CSScaleComboBox.Size = new System.Drawing.Size(115, 20);
this.CSScaleComboBox.TabIndex = 5;
this.CSScaleComboBox.Text = "Scale Y-Axis";
this.CSScaleComboBox.SelectedIndexChanged += new System.EventHandler(this.CSScaleComboBox_SelectedIndexChanged);
//
// panelAxis
//
this.panelAxis.Location = new System.Drawing.Point(10, 95);
this.panelAxis.Name = "panelAxis";
this.panelAxis.Size = new System.Drawing.Size(403, 250);
this.panelAxis.TabIndex = 4;
//
// groupBox9
//
this.groupBox9.Controls.Add(this.labelDeviation);
this.groupBox9.Controls.Add(this.labelMean);
this.groupBox9.Controls.Add(this.labelRange);
this.groupBox9.Controls.Add(this.labelPeak);
this.groupBox9.Controls.Add(this.label24);
this.groupBox9.Controls.Add(this.label25);
this.groupBox9.Controls.Add(this.labelRangeX);
this.groupBox9.Controls.Add(this.labelPeakX);
this.groupBox9.Controls.Add(this.label23);
this.groupBox9.Controls.Add(this.label22);
this.groupBox9.Controls.Add(this.label19);
this.groupBox9.Controls.Add(this.label18);
this.groupBox9.Controls.Add(this.label17);
this.groupBox9.Controls.Add(this.label16);
this.groupBox9.Location = new System.Drawing.Point(10, 370);
this.groupBox9.Name = "groupBox9";
this.groupBox9.Size = new System.Drawing.Size(403, 121);
this.groupBox9.TabIndex = 2;
this.groupBox9.TabStop = false;
this.groupBox9.Text = "Statistics";
//
// labelDeviation
//
this.labelDeviation.Location = new System.Drawing.Point(269, 95);
this.labelDeviation.Name = "labelDeviation";
this.labelDeviation.Size = new System.Drawing.Size(86, 17);
this.labelDeviation.TabIndex = 18;
this.labelDeviation.Text = "0";
this.labelDeviation.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelMean
//
this.labelMean.Location = new System.Drawing.Point(269, 78);
this.labelMean.Name = "labelMean";
this.labelMean.Size = new System.Drawing.Size(86, 17);
this.labelMean.TabIndex = 17;
this.labelMean.Text = "0";
this.labelMean.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelRange
//
this.labelRange.Location = new System.Drawing.Point(269, 60);
this.labelRange.Name = "labelRange";
this.labelRange.Size = new System.Drawing.Size(115, 18);
this.labelRange.TabIndex = 15;
this.labelRange.Text = "0 ... 0";
this.labelRange.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelPeak
//
this.labelPeak.Location = new System.Drawing.Point(269, 43);
this.labelPeak.Name = "labelPeak";
this.labelPeak.Size = new System.Drawing.Size(86, 17);
this.labelPeak.TabIndex = 14;
this.labelPeak.Text = "0";
this.labelPeak.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label24
//
this.label24.Location = new System.Drawing.Point(154, 95);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(86, 17);
this.label24.TabIndex = 13;
this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label25
//
this.label25.Location = new System.Drawing.Point(154, 78);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(86, 17);
this.label25.TabIndex = 12;
this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelRangeX
//
this.labelRangeX.Location = new System.Drawing.Point(154, 60);
this.labelRangeX.Name = "labelRangeX";
this.labelRangeX.Size = new System.Drawing.Size(86, 18);
this.labelRangeX.TabIndex = 9;
this.labelRangeX.Text = "0 ... 0";
this.labelRangeX.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelPeakX
//
this.labelPeakX.Location = new System.Drawing.Point(154, 43);
this.labelPeakX.Name = "labelPeakX";
this.labelPeakX.Size = new System.Drawing.Size(86, 17);
this.labelPeakX.TabIndex = 8;
this.labelPeakX.Text = "0";
this.labelPeakX.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label23
//
this.label23.Location = new System.Drawing.Point(19, 95);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(106, 17);
this.label23.TabIndex = 7;
this.label23.Text = "Deviation:";
this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label22
//
this.label22.Location = new System.Drawing.Point(19, 78);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(106, 17);
this.label22.TabIndex = 6;
this.label22.Text = "Mean:";
this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label19
//
this.label19.Location = new System.Drawing.Point(19, 60);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(106, 18);
this.label19.TabIndex = 3;
this.label19.Text = "Range:";
this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label18
//
this.label18.Location = new System.Drawing.Point(19, 43);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(106, 17);
this.label18.TabIndex = 2;
this.label18.Text = "Peak:";
this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label17
//
this.label17.Location = new System.Drawing.Point(269, 17);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(105, 17);
this.label17.TabIndex = 1;
this.label17.Text = "Gray Values";
this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label16
//
this.label16.Location = new System.Drawing.Point(154, 17);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(105, 17);
this.label16.TabIndex = 0;
this.label16.Text = "x-Value";
this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tabPageSaveConfige
//
this.tabPageSaveConfige.Controls.Add(this.groupBox10);
this.tabPageSaveConfige.Controls.Add(this.btnSaveConfige);
this.tabPageSaveConfige.Location = new System.Drawing.Point(4, 22);
this.tabPageSaveConfige.Name = "tabPageSaveConfige";
this.tabPageSaveConfige.Padding = new System.Windows.Forms.Padding(3);
this.tabPageSaveConfige.Size = new System.Drawing.Size(422, 567);
this.tabPageSaveConfige.TabIndex = 4;
this.tabPageSaveConfige.Text = "²ÎÊý±£´æ";
this.tabPageSaveConfige.UseVisualStyleBackColor = true;
//
// groupBox10
//
this.groupBox10.Controls.Add(this.labROIHeight);
this.groupBox10.Controls.Add(this.labROIHeightSet);
this.groupBox10.Controls.Add(this.labPosition);
this.groupBox10.Controls.Add(this.labPositionSet);
this.groupBox10.Controls.Add(this.labTransition);
this.groupBox10.Controls.Add(this.labTransitionSet);
this.groupBox10.Controls.Add(this.labInterpolation);
this.groupBox10.Controls.Add(this.labInterpolationSet);
this.groupBox10.Controls.Add(this.labROIWidth);
this.groupBox10.Controls.Add(this.labROIWidthSet);
this.groupBox10.Controls.Add(this.labSmoothing);
this.groupBox10.Controls.Add(this.labSmoothingSet);
this.groupBox10.Controls.Add(this.labMinEdgeAmpl);
this.groupBox10.Controls.Add(this.label12);
this.groupBox10.Controls.Add(this.labMinEdgeAmplSet);
this.groupBox10.Controls.Add(this.label11);
this.groupBox10.Location = new System.Drawing.Point(7, 24);
this.groupBox10.Name = "groupBox10";
this.groupBox10.Size = new System.Drawing.Size(356, 321);
this.groupBox10.TabIndex = 50;
this.groupBox10.TabStop = false;
this.groupBox10.Text = "groupBox10";
//
// labROIHeight
//
this.labROIHeight.BackColor = System.Drawing.SystemColors.Control;
this.labROIHeight.Location = new System.Drawing.Point(14, 206);
this.labROIHeight.Name = "labROIHeight";
this.labROIHeight.Size = new System.Drawing.Size(115, 21);
this.labROIHeight.TabIndex = 47;
this.labROIHeight.Text = "ROI Height";
this.labROIHeight.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labROIHeightSet
//
this.labROIHeightSet.BackColor = System.Drawing.Color.White;
this.labROIHeightSet.Location = new System.Drawing.Point(135, 206);
this.labROIHeightSet.Name = "labROIHeightSet";
this.labROIHeightSet.Size = new System.Drawing.Size(115, 21);
this.labROIHeightSet.TabIndex = 39;
this.labROIHeightSet.Text = "-";
this.labROIHeightSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labPosition
//
this.labPosition.BackColor = System.Drawing.SystemColors.Control;
this.labPosition.Location = new System.Drawing.Point(14, 155);
this.labPosition.Name = "labPosition";
this.labPosition.Size = new System.Drawing.Size(115, 21);
this.labPosition.TabIndex = 46;
this.labPosition.Text = "Position";
this.labPosition.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labPositionSet
//
this.labPositionSet.BackColor = System.Drawing.Color.White;
this.labPositionSet.Location = new System.Drawing.Point(135, 154);
this.labPositionSet.Name = "labPositionSet";
this.labPositionSet.Size = new System.Drawing.Size(115, 21);
this.labPositionSet.TabIndex = 45;
this.labPositionSet.Text = "-";
this.labPositionSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labTransition
//
this.labTransition.BackColor = System.Drawing.SystemColors.Control;
this.labTransition.Location = new System.Drawing.Point(14, 130);
this.labTransition.Name = "labTransition";
this.labTransition.Size = new System.Drawing.Size(115, 21);
this.labTransition.TabIndex = 44;
this.labTransition.Text = "Transition";
this.labTransition.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labTransitionSet
//
this.labTransitionSet.BackColor = System.Drawing.Color.White;
this.labTransitionSet.Location = new System.Drawing.Point(135, 129);
this.labTransitionSet.Name = "labTransitionSet";
this.labTransitionSet.Size = new System.Drawing.Size(115, 21);
this.labTransitionSet.TabIndex = 43;
this.labTransitionSet.Text = "-";
this.labTransitionSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labInterpolation
//
this.labInterpolation.BackColor = System.Drawing.SystemColors.Control;
this.labInterpolation.Location = new System.Drawing.Point(14, 105);
this.labInterpolation.Name = "labInterpolation";
this.labInterpolation.Size = new System.Drawing.Size(115, 21);
this.labInterpolation.TabIndex = 42;
this.labInterpolation.Text = "Interpolation";
this.labInterpolation.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labInterpolationSet
//
this.labInterpolationSet.BackColor = System.Drawing.Color.White;
this.labInterpolationSet.Location = new System.Drawing.Point(135, 104);
this.labInterpolationSet.Name = "labInterpolationSet";
this.labInterpolationSet.Size = new System.Drawing.Size(115, 21);
this.labInterpolationSet.TabIndex = 41;
this.labInterpolationSet.Text = "-";
this.labInterpolationSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labROIWidth
//
this.labROIWidth.BackColor = System.Drawing.SystemColors.Control;
this.labROIWidth.Location = new System.Drawing.Point(14, 180);
this.labROIWidth.Name = "labROIWidth";
this.labROIWidth.Size = new System.Drawing.Size(115, 21);
this.labROIWidth.TabIndex = 38;
this.labROIWidth.Text = "ROI Width";
this.labROIWidth.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labROIWidthSet
//
this.labROIWidthSet.BackColor = System.Drawing.Color.White;
this.labROIWidthSet.Location = new System.Drawing.Point(135, 179);
this.labROIWidthSet.Name = "labROIWidthSet";
this.labROIWidthSet.Size = new System.Drawing.Size(115, 21);
this.labROIWidthSet.TabIndex = 37;
this.labROIWidthSet.Text = "-";
this.labROIWidthSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labSmoothing
//
this.labSmoothing.BackColor = System.Drawing.SystemColors.Control;
this.labSmoothing.Location = new System.Drawing.Point(14, 80);
this.labSmoothing.Name = "labSmoothing";
this.labSmoothing.Size = new System.Drawing.Size(115, 21);
this.labSmoothing.TabIndex = 36;
this.labSmoothing.Text = "Smoothing";
this.labSmoothing.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labSmoothingSet
//
this.labSmoothingSet.BackColor = System.Drawing.Color.White;
this.labSmoothingSet.Location = new System.Drawing.Point(135, 79);
this.labSmoothingSet.Name = "labSmoothingSet";
this.labSmoothingSet.Size = new System.Drawing.Size(115, 21);
this.labSmoothingSet.TabIndex = 35;
this.labSmoothingSet.Text = "-";
this.labSmoothingSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labMinEdgeAmpl
//
this.labMinEdgeAmpl.BackColor = System.Drawing.SystemColors.Control;
this.labMinEdgeAmpl.Location = new System.Drawing.Point(14, 55);
this.labMinEdgeAmpl.Name = "labMinEdgeAmpl";
this.labMinEdgeAmpl.Size = new System.Drawing.Size(115, 21);
this.labMinEdgeAmpl.TabIndex = 34;
this.labMinEdgeAmpl.Text = "Min.EdgeAmpl";
this.labMinEdgeAmpl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label12
//
this.label12.BackColor = System.Drawing.SystemColors.Control;
this.label12.Location = new System.Drawing.Point(135, 29);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(115, 21);
this.label12.TabIndex = 33;
this.label12.Text = "Recognition";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labMinEdgeAmplSet
//
this.labMinEdgeAmplSet.BackColor = System.Drawing.Color.White;
this.labMinEdgeAmplSet.Location = new System.Drawing.Point(135, 54);
this.labMinEdgeAmplSet.Name = "labMinEdgeAmplSet";
this.labMinEdgeAmplSet.Size = new System.Drawing.Size(115, 21);
this.labMinEdgeAmplSet.TabIndex = 32;
this.labMinEdgeAmplSet.Text = "-";
this.labMinEdgeAmplSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label11
//
this.label11.BackColor = System.Drawing.SystemColors.Control;
this.label11.Location = new System.Drawing.Point(14, 29);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(115, 21);
this.label11.TabIndex = 31;
this.label11.Text = "Recognition";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// btnSaveConfige
//
this.btnSaveConfige.Location = new System.Drawing.Point(277, 451);
this.btnSaveConfige.Name = "btnSaveConfige";
this.btnSaveConfige.Size = new System.Drawing.Size(106, 42);
this.btnSaveConfige.TabIndex = 0;
this.btnSaveConfige.Text = "±£´æ²ÎÊý";
this.btnSaveConfige.UseVisualStyleBackColor = true;
this.btnSaveConfige.Click += new System.EventHandler(this.btnSaveConfige_Click);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.CircArcButton);
this.groupBox2.Controls.Add(this.LineButton);
this.groupBox2.Controls.Add(this.DeleteActRoiButton);
this.groupBox2.Controls.Add(this.ResetROIButton);
this.groupBox2.Location = new System.Drawing.Point(12, 610);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(614, 70);
this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "ROIs";
//
// CircArcButton
//
this.CircArcButton.Location = new System.Drawing.Point(154, 17);
this.CircArcButton.Name = "CircArcButton";
this.CircArcButton.Size = new System.Drawing.Size(120, 47);
this.CircArcButton.TabIndex = 10;
this.CircArcButton.Text = "Create Circular Arc";
this.CircArcButton.Click += new System.EventHandler(this.CircArcButton_Click);
//
// LineButton
//
this.LineButton.Location = new System.Drawing.Point(19, 17);
this.LineButton.Name = "LineButton";
this.LineButton.Size = new System.Drawing.Size(120, 47);
this.LineButton.TabIndex = 1;
this.LineButton.Text = "Create Line";
this.LineButton.Click += new System.EventHandler(this.LineButton_Click);
//
// DeleteActRoiButton
//
this.DeleteActRoiButton.Location = new System.Drawing.Point(365, 17);
this.DeleteActRoiButton.Name = "DeleteActRoiButton";
this.DeleteActRoiButton.Size = new System.Drawing.Size(120, 47);
this.DeleteActRoiButton.TabIndex = 2;
this.DeleteActRoiButton.Text = "Delete";
this.DeleteActRoiButton.Click += new System.EventHandler(this.DeleteActRoiButton_Click);
//
// ResetROIButton
//
this.ResetROIButton.Location = new System.Drawing.Point(490, 17);
this.ResetROIButton.Name = "ResetROIButton";
this.ResetROIButton.Size = new System.Drawing.Size(120, 47);
this.ResetROIButton.TabIndex = 3;
this.ResetROIButton.Text = "Delete All";
this.ResetROIButton.Click += new System.EventHandler(this.ResetROIButton_Click);
//
// LoadImgButton
//
this.LoadImgButton.Location = new System.Drawing.Point(107, 13);
this.LoadImgButton.Name = "LoadImgButton";
this.LoadImgButton.Size = new System.Drawing.Size(95, 28);
this.LoadImgButton.TabIndex = 4;
this.LoadImgButton.Text = "Load ...";
this.LoadImgButton.Click += new System.EventHandler(this.LoadImgButton_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.ResetViewButton);
this.groupBox1.Controls.Add(this.MagnifyButton);
this.groupBox1.Controls.Add(this.ZoomButton);
this.groupBox1.Controls.Add(this.MoveButton);
this.groupBox1.Controls.Add(this.NoneButton);
this.groupBox1.Location = new System.Drawing.Point(239, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(529, 48);
this.groupBox1.TabIndex = 8;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "View Interaction";
//
// ResetViewButton
//
this.ResetViewButton.Location = new System.Drawing.Point(403, 13);
this.ResetViewButton.Name = "ResetViewButton";
this.ResetViewButton.Size = new System.Drawing.Size(111, 28);
this.ResetViewButton.TabIndex = 10;
this.ResetViewButton.Text = "Reset ";
this.ResetViewButton.Click += new System.EventHandler(this.ResetViewButton_Click);
//
// MagnifyButton
//
this.MagnifyButton.Location = new System.Drawing.Point(298, 20);
this.MagnifyButton.Name = "MagnifyButton";
this.MagnifyButton.Size = new System.Drawing.Size(76, 18);
this.MagnifyButton.TabIndex = 4;
this.MagnifyButton.Text = "magnify";
this.MagnifyButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.MagnifyButton.CheckedChanged += new System.EventHandler(this.MagnifyButton_CheckedChanged);
//
// ZoomButton
//
this.ZoomButton.Location = new System.Drawing.Point(218, 20);
this.ZoomButton.Name = "ZoomButton";
this.ZoomButton.Size = new System.Drawing.Size(68, 18);
this.ZoomButton.TabIndex = 2;
this.ZoomButton.Text = "zoom";
this.ZoomButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.ZoomButton.CheckedChanged += new System.EventHandler(this.ZoomButton_CheckedChanged);
//
// MoveButton
//
this.MoveButton.Location = new System.Drawing.Point(125, 20);
this.MoveButton.Name = "MoveButton";
this.MoveButton.Size = new System.Drawing.Size(67, 18);
this.MoveButton.TabIndex = 1;
this.MoveButton.Text = "move";
this.MoveButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.MoveButton.CheckedChanged += new System.EventHandler(this.MoveButton_CheckedChanged);
//
// NoneButton
//
this.NoneButton.Checked = true;
this.NoneButton.Location = new System.Drawing.Point(29, 20);
this.NoneButton.Name = "NoneButton";
this.NoneButton.Size = new System.Drawing.Size(67, 18);
this.NoneButton.TabIndex = 0;
this.NoneButton.TabStop = true;
this.NoneButton.Text = "none";
this.NoneButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.NoneButton.CheckedChanged += new System.EventHandler(this.NoneButton_CheckedChanged);
//
// openImageFileDialog
//
this.openImageFileDialog.Filter = "png (*.png)|*.png|tiff (*.tif)|*.tif|jpeg (*.jpg)| *.jpg|all files (*.*)|*.*";
this.openImageFileDialog.RestoreDirectory = true;
//
// StatusLabel
//
this.StatusLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.StatusLabel.Location = new System.Drawing.Point(799, 618);
this.StatusLabel.Name = "StatusLabel";
this.StatusLabel.Size = new System.Drawing.Size(428, 56);
this.StatusLabel.TabIndex = 9;
this.StatusLabel.Text = "Status";
this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// openCamparFileDialog
//
this.openCamparFileDialog.Filter = "camera parameters (*.cal)|*.cal|camera parameters (*.dat)|*dat|all files (*.*)|*." +
"*";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.LoadImgButton);
this.groupBox3.Location = new System.Drawing.Point(10, 0);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(211, 48);
this.groupBox3.TabIndex = 11;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Image";
//
// frmMeasureAssistant
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(1253, 679);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.StatusLabel);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.tabControl);
this.Controls.Add(this.viewPort);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "frmMeasureAssistant";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Measure Assistant";
this.Load += new System.EventHandler(this.MeasureForm_Load);
this.tabControl.ResumeLayout(false);
this.tabPageEdges.ResumeLayout(false);
this.groupBox6.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LineWidthDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.EdgeLengthUpDown)).EndInit();
this.groupBox5.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tBroiHeight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ROIWidthTrackBar)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.SmoothingTrackBar)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplTrackBar)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.SmoothingUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ROIWidthUpDown)).EndInit();
this.tabPageResults.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.groupBox8.PerformLayout();
this.UnitPanel.ResumeLayout(false);
this.groupBox7.ResumeLayout(false);
this.tabPageLineProfile.ResumeLayout(false);
this.groupBox9.ResumeLayout(false);
this.tabPageSaveConfige.ResumeLayout(false);
this.groupBox10.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
///
/// Loads MeasureForm and initializes view functions
/// to include in the MeasureAssistant.
///
private void MeasureForm_Load(object sender, System.EventArgs e)
{
InitViewer();
}
private void InitViewer()
{
mView = new HWndCtrl(viewPort);
roiController = new ROIController();
mView.useROIController(roiController);
mAssistant = new MeasureAssistant(roiController);
mShadow = new HXLDCont();
mView.setViewState(HWndCtrl.MODE_VIEW_NONE);
mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 1);
roiController.NotifyRCObserver = new IconicDelegate(UpdateROIData);
mAssistant.NotifyMeasureObserver = new MeasureDelegate(UpdateMeasureResults);
plotGraphWindow = new FunctionPlot(panelAxis, true);
openImageFileDialog.InitialDirectory =
(string)(HSystem.GetSystem("image_dir").TupleSplit(";"));
Init();
mView.setDispLevel(HWndCtrl.MODE_EXCLUDE_ROI);
}
///
/// Initializes the parameters for the edges measurement and
/// sets up the measure assistant.
///
private void Init()
{
MinEdgAmplUpDown.Value = 40;
SmoothingUpDown.Value = 10;
ROIWidthUpDown.Value = 10;
InterpolationComboBox.SelectedIndex = 0;
EdgeToPaircheckBox.Checked = false;
TransitionComboBox.SelectedIndex = 0;
PositionComboBox.SelectedIndex = 0;
EdgeLengthUpDown.Value = 30;
UseROIWidthCheckBox.Checked = true;
ShowRegionCheckBox.Checked = true;
ShowROIcheckBox.Checked = true;
UseShadowsCheckBox.Checked = false;
ResetMinEdgAmplButton.ForeColor = System.Drawing.Color.Gray;
ResetROIWidthButton.ForeColor = System.Drawing.Color.Gray;
ResetSmoothingButton.ForeColor = System.Drawing.Color.Gray;
PositionCheckBox.Checked = true;
PairWidthCheckBox.Checked = true;
AmplitudeCheckBox.Checked = true;
DistanceCheckBox.Checked = true;
TransWCoordCheckBox.Enabled = false;
TransWCoordCheckBox.Checked = false;
UnitComboBox.SelectedIndex = 1;
UnitPanel.Enabled = false;
mAssistant.mThresh = 40.0;
mAssistant.mSigma = 1.0;
mAssistant.mRoiWidth = 10;
mAssistant.mRoiHeight = 50;
mAssistant.mInterpolation = "nearest_neighbor";
mAssistant.mSelPair = false;
mAssistant.mTransition = "all";
mAssistant.mPosition = "all";
mAssistant.mDispEdgeLength = 30;
mAssistant.mDispROIWidth = true;
mAssistant.setUnit(UnitComboBox.Text);
mAssistant.mInitThresh = 40.0;
mAssistant.mInitSigma = 1.0;
mAssistant.mInitRoiWidth = 10;
RegionColorComboBox.SelectedIndex = 2;
EdgeColorComboBox.SelectedIndex = 7;
LineWidthDown.Value = 1;
CSScaleComboBox.SelectedIndex = 0;
regionColor = "blue";
edgeColor = "cyan";
lineWidth = 1;
useShadow = false;
}
/********************************************************************/
/* Display Parameters */
/********************************************************************/
///
/// Loads image and passes it to the controller class. Only images of
/// type "byte" are allowed.
///
private void LoadImgButton_Click(object sender, System.EventArgs e)
{
string file,info;
int dispROI = HWndCtrl.MODE_INCLUDE_ROI;
if (openImageFileDialog.ShowDialog() == DialogResult.OK)
{
file = openImageFileDialog.FileName;
roiController.reset();
mView.resetWindow();
if (mAssistant.setImage(file))
{
currImage = mAssistant.getImage();
info = currImage.GetChannelInfo("type", 1);
}
else
{
info = "wrong file type";
}
if (info != "byte")
{
currImage = null;
mAssistant.setImage(currImage);
dispROI = HWndCtrl.MODE_EXCLUDE_ROI;
MessageBox.Show("Problem occured: The Image is of type \"" + info + "\".\nOnly byte images are supported by this Measure Assistant!",
"Measure assistant",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
mView.setDispLevel(dispROI);
UpdateView();
}
}
/* *******************************************************
* Window Interaction
* *******************************************************/
private void NoneButton_CheckedChanged(object sender, System.EventArgs e)
{
mView.setViewState(HWndCtrl.MODE_VIEW_NONE);
}
private void MoveButton_CheckedChanged(object sender, System.EventArgs e)
{
mView.setViewState(HWndCtrl.MODE_VIEW_MOVE);
}
private void ZoomButton_CheckedChanged(object sender, System.EventArgs e)
{
mView.setViewState(HWndCtrl.MODE_VIEW_ZOOM);
}
private void MagnifyButton_CheckedChanged(object sender, System.EventArgs e)
{
mView.setViewState(HWndCtrl.MODE_VIEW_ZOOMWINDOW);
}
private void ResetViewButton_Click(object sender, System.EventArgs e)
{
mView.resetWindow();
UpdateView();
}
/* *******************************************************
* ROI Interaction
* *******************************************************/
///
/// Creates linear ROI.
///
private void LineButton_Click(object sender, System.EventArgs e)
{
if (ShowROIcheckBox.Checked)
roiController.setROIShape(new ROILine());
}
///
/// Creates circular ROI.
///
private void CircArcButton_Click(object sender, System.EventArgs e)
{
if (ShowROIcheckBox.Checked)
roiController.setROIShape(new ROICircularArc());
}
/// Deletes selected ROI.
private void DeleteActRoiButton_Click(object sender, System.EventArgs e)
{
roiController.removeActive();
}
/// Deletes all ROIs.
private void ResetROIButton_Click(object sender, System.EventArgs e)
{
roiController.reset();
UpdateView();
}
/********************************************************************/
/* Edges Tab */
/********************************************************************/
/* Edge Extraction */
private void ROIWidthUpDown_ValueChanged(object sender, System.EventArgs e)
{
int val = (int)ROIWidthUpDown.Value;
ROIWidthTrackBar.Value = val;
setRoiWidth(val);
}
private void ROIWidthTrackBar_Scroll(object sender, System.EventArgs e)
{
ROIWidthUpDown.Value = ROIWidthTrackBar.Value;
ROIWidthUpDown.Refresh();
}
private void ResetROIWidthButton_Click(object sender, System.EventArgs e)
{
ROIWidthUpDown.Value = (int)mAssistant.mInitRoiWidth;
ResetROIWidthButton.ForeColor = System.Drawing.Color.Gray;
}
private void setRoiWidth(int val)
{
ResetROIWidthButton.ForeColor = System.Drawing.Color.Black;
mAssistant.setRoiWidth((double)val);
}
private void setRoiHeight(int val)
{
butRoiHeightReset.ForeColor = System.Drawing.Color.Gray;
mAssistant.setRoiHeight((double)val);
}
/********************************************************************/
private void SmoothingUpDown_ValueChanged(object sender, System.EventArgs e)
{
int val = (int)SmoothingUpDown.Value;
SmoothingTrackBar.Value = val;
setSigma(val);
}
private void SmoothingTrackBar_Scroll(object sender, System.EventArgs e)
{
SmoothingUpDown.Value = SmoothingTrackBar.Value;
SmoothingUpDown.Refresh();
}
private void ResetSmoothingButton_Click(object sender, System.EventArgs e)
{
SmoothingUpDown.Value = (int)mAssistant.mInitSigma * 10;
ResetSmoothingButton.ForeColor = System.Drawing.Color.Gray;
}
private void setSigma(int val)
{
double valD = (double)val / 10.0;
ResetSmoothingButton.ForeColor = System.Drawing.Color.Black;
mAssistant.setSigma(valD);
}
/********************************************************************/
private void MinEdgAmplUpDown_ValueChanged(object sender, System.EventArgs e)
{
int val = (int)MinEdgAmplUpDown.Value;
MinEdgAmplTrackBar.Value = val;
setMinEdgeAmpl(val);
}
private void MinEdgAmplTrackBar_Scroll(object sender, System.EventArgs e)
{
MinEdgAmplUpDown.Value = MinEdgAmplTrackBar.Value;
MinEdgAmplUpDown.Refresh();
}
private void ResetMinEdgAmplButton_Click(object sender, System.EventArgs e)
{
MinEdgAmplUpDown.Value = (int)mAssistant.mInitThresh;
ResetMinEdgAmplButton.ForeColor = System.Drawing.Color.Gray;
}
private void setMinEdgeAmpl(int val)
{
ResetMinEdgAmplButton.ForeColor = System.Drawing.Color.Black;
mAssistant.setMinEdgeAmpl((double)val);
}
/********************************************************************/
private void InterpolationComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
mAssistant.setInterpolation((string)InterpolationComboBox.Text);
}
/********************************************************************/
/********************************************************************/
/* Define Edge Selection */
private void EdgeToPaircheckBox_CheckedChanged(object sender, System.EventArgs e)
{
mAssistant.setSelPair(EdgeToPaircheckBox.Checked);
UpdateMeasureResultComposition();
if (EdgeToPaircheckBox.Checked)
{
PairWidthCheckBox.Enabled = true;
TransitionComboBox.Items.AddRange(new object[] {"all_strongest",
"positive_strongest",
"negative_strongest"});
}
else
{
PairWidthCheckBox.Enabled = false;
TransitionComboBox.Items.Clear();
TransitionComboBox.Items.AddRange(new object[] { "all", "positive", "negative" });
TransitionComboBox.SelectedIndex = 0;
}
}
private void TransitionComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
mAssistant.setTransition((string)TransitionComboBox.Text);
}
private void PositionComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
mAssistant.setPosition((string)PositionComboBox.Text);
}
/********************************************************************/
/********************************************************************/
/* Define Edge Display Parameters */
private void RegionColorComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
regionColor = (string)RegionColorComboBox.SelectedItem;
UpdateView();
}
private void EdgeColorComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
edgeColor = (string)EdgeColorComboBox.SelectedItem;
UpdateView();
}
private void LineWidthDown_ValueChanged(object sender, System.EventArgs e)
{
lineWidth = (int)LineWidthDown.Value;
UpdateView();
}
private void ShowRegionCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
displayRegion = ShowRegionCheckBox.Checked;
UpdateView();
}
private void UseShadowsCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
useShadow = UseShadowsCheckBox.Checked;
UpdateView();
}
/********************************************************************/
/********************************************************************/
/* Definition for Result EdgeXLD Format */
private void EdgeLengthUpDown_ValueChanged(object sender, System.EventArgs e)
{
mAssistant.setDispEdgeLength((int)EdgeLengthUpDown.Value);
}
private void UseROIWidthCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
mAssistant.setFlagDispROIWidth(UseROIWidthCheckBox.Checked);
if (UseROIWidthCheckBox.Checked)
EdgeLengthUpDown.Enabled = false;
else
EdgeLengthUpDown.Enabled = true;
}
private void ShowROIcheckBox_CheckedChanged(object sender, System.EventArgs e)
{
int mode;
if (ShowROIcheckBox.Checked)
mode = HWndCtrl.MODE_INCLUDE_ROI;
else
mode = HWndCtrl.MODE_EXCLUDE_ROI;
mView.setDispLevel(mode);
UpdateView();
}
/********************************************************************/
/* Edges Results */
/********************************************************************/
private void PositionCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
mAssistant.showPosition(PositionCheckBox.Checked);
UpdateMeasureResultComposition();
}
private void PairWidthCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
mAssistant.showPairWidth(PairWidthCheckBox.Checked);
UpdateMeasureResultComposition();
}
private void AmplitudeCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
mAssistant.showAmplitude(AmplitudeCheckBox.Checked);
UpdateMeasureResultComposition();
}
private void DistanceCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
mAssistant.showDistance(DistanceCheckBox.Checked);
UpdateMeasureResultComposition();
}
private void TransWCoordCheckBox_CheckedChanged(object sender, System.EventArgs e)
{
if (TransWCoordCheckBox.Checked)
UnitPanel.Enabled = true;
else
UnitPanel.Enabled = false;
mAssistant.setTransWorldCoord(TransWCoordCheckBox.Checked);
}
private void UnitComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
mAssistant.setUnit((string)UnitComboBox.SelectedItem);
}
/// Loads HALCON calibration data.
private void LoadCamParamButton_Click(object sender, System.EventArgs e)
{
HTuple buttonType, valType;
string file;
string [] val;
bool isCalFile;
StatusLabel.Text = "";
buttonType = new HTuple(sender.ToString());
valType = buttonType.TupleStrrstr(new HTuple("CamPar"));
if (valType[0].I > 0)
openCamparFileDialog.FilterIndex = 1;
else
openCamparFileDialog.FilterIndex = 2;
openCamparFileDialog.FileName = "";
if (openCamparFileDialog.ShowDialog() == DialogResult.OK)
{
file = openCamparFileDialog.FileName;
StatusLabel.Text = "";
if ((isCalFile = file.EndsWith(".cal")) || file.EndsWith(".dat"))
{
try
{
if (valType[0].I > 0)
{
mAssistant.LoadCamParFile(file);
val = file.Split(new Char[] { '\\' });
file = val[val.Length - 1];
CalibCamTextBox.Text = file;
}
else
{
mAssistant.LoadCamPoseFile(file);
val = file.Split(new Char[] { '\\' });
file = val[val.Length - 1];
CalibPoseTextBox.Text = file;
}
}
catch (HOperatorException)
{
if (valType[0].I > 0)
CalibCamTextBox.Text = "*.cal";
else
CalibPoseTextBox.Text = "*.dat";
StatusLabel.Text = mAssistant.exceptionText;
valType = mAssistant.exceptionText.TupleSplit(":");
MessageBox.Show("File is corrupted or has a wrong format:\nPlease check if you chose a valid calibration file (or format)!",
"Measure Assistant",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
}
else
{
MessageBox.Show("Fileformat is wrong: Data is not a calibration file!",
"Measure Assistant",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
if (mAssistant.mIsCalibValid)
{
TransWCoordCheckBox.Enabled = true;
}
else
{
TransWCoordCheckBox.Enabled = false;
TransWCoordCheckBox.Checked = false;
}
}
}
///
/// Changes index of the selected ROI displayed in the listbox.
///
private void ActiveROIListBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
roiController.activeROIidx = ActiveROIListBox.SelectedIndex;
mAssistant.mActRoiIdx = roiController.activeROIidx;
UpdateCodeTable();
UpdateView();
}
/********************************************************************/
/* Update methods invoked by delegates */
/********************************************************************/
///
/// Updates HALCON display and result table according to new measure
/// results.
///
/// Type of measure update
public void UpdateMeasureResults(int mode)
{
StatusLabel.Text = "";
switch (mode)
{
case MeasureAssistant.ERR_READING_FILE:
MessageBox.Show("Problem occured while reading file! \n" + mAssistant.exceptionText,
"Measure assistant",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
mAssistant.exceptionText = "";
break;
case MeasureAssistant.EVENT_UPDATE_MEASUREMENT:
case MeasureAssistant.EVENT_UPDATE_RESULT_XLD:
case MeasureAssistant.EVENT_UPDATE_REMOVE:
UpdateView();
break;
default:
break;
}
if (mAssistant.exceptionText != "")
{
HTuple segment = mAssistant.exceptionText.TupleSplit(":");
StatusLabel.Text = " Measure failed: " + mAssistant.exceptionText;
}
UpdateCodeTable();
}
///
/// Responds to changes in the selected ROI.
///
/// Type of ROI update
public void UpdateROIData(int mode)
{
switch (mode)
{
case ROIController.EVENT_CREATED_ROI:
mAssistant.AddMeasureObject();
UpdateROIClickList("new");
break;
case ROIController.EVENT_ACTIVATED_ROI:
mAssistant.ClickedActiveROI();
UpdateROIClickList("active");
break;
case ROIController.EVENT_MOVING_ROI:
mAssistant.UpdateMeasure(roiController.getActiveROIIdx());
break;
case ROIController.EVENT_DELETED_ACTROI:
mAssistant.RemoveMeasureObjectActIdx();
UpdateROIClickList("removeIdx");
break;
case ROIController.EVENT_DELETED_ALL_ROIS:
mAssistant.RemoveAllMeasureObjects();
UpdateROIClickList("removeAll");
break;
}
if (updateLineProfile)
PaintGraph();
}
///
/// Triggers an update of the HALCON window. Displays all valid iconic
/// objects.
///
public void UpdateView()
{
HObject edges, regions;
if (currImage == null)
{
mView.clearList();
}
else
{
mView.addIconicVar(currImage);
if (roiController.getROIList().Count > 0)
{
edges = mAssistant.getMeasureResults();
if (edges.IsInitialized())
{
if (useShadow)
{
UpdateShadowContours(edges);
mView.changeGraphicSettings(GraphicsContext.GC_COLOR, "black");
mView.addIconicVar(mShadow);
}
mView.changeGraphicSettings(GraphicsContext.GC_COLOR, edgeColor);
mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, lineWidth);
mView.addIconicVar(edges);
}
regions = mAssistant.getMeasureRegions();
if (displayRegion && regions.IsInitialized())
{
mView.changeGraphicSettings(GraphicsContext.GC_COLOR, regionColor);
mView.addIconicVar(regions);
}
}
}
mView.repaint();
}
///
/// Adds visual effects (shadows)
/// to the measure results.
///
///
/// Add shadows along the edges provided
///
public void UpdateShadowContours(HObject edges)
{
double shift;
HXLDCont shadow1, shadow2;
HHomMat2D hom2D = new HHomMat2D();
mShadow.Dispose();
mShadow.GenEmptyObj();
shift = Math.Min(0.5 * lineWidth, 2.0);
hom2D.HomMat2dIdentity();
hom2D = hom2D.HomMat2dTranslate(shift, 1);
shadow1 = ((HXLDCont)edges).AffineTransContourXld(hom2D);
hom2D.HomMat2dIdentity();
hom2D = hom2D.HomMat2dTranslate(1, shift);
shadow2 = ((HXLDCont)edges).AffineTransContourXld(hom2D);
mShadow = mShadow.ConcatObj(shadow1);
mShadow = mShadow.ConcatObj(shadow2);
shadow1.Dispose();
shadow2.Dispose();
}
///
/// Adapts column header for measure result table.
///
public void UpdateMeasureResultComposition()
{
ArrayList composition;
ColumnHeader header;
int length;
int size = -1;
composition = mAssistant.getMeasureResultComposition();
length = composition.Count;
EdgeResultListView.Columns.Clear();
if (length <= 5 && length > 0)
size = (EdgeResultListView.Size.Width / length) - 1;
for (int i=0; i < length; i++)
{
header = new ColumnHeader();
header.Text = (string)composition[i];
header.Width = (size != -1) ? size : 20 + header.Text.Length * 5;
EdgeResultListView.Columns.Add(header);
}
UpdateCodeTable();
}
/// Creates table for measure results.
public void UpdateCodeTable()
{
ArrayList table;
ListViewItem item;
int rowCount,colCount;
string val;
rowCount = 0;
table = mAssistant.getMeasureTableData();
EdgeResultListView.Items.Clear();
if ((colCount = table.Count) == 0 || (table[0] == null))
return;
for (int i=0; i < colCount; i++)
rowCount = Math.Max(rowCount, ((HTuple)table[i]).Length);
for (int i=0; i < rowCount; i++)
{
val = (i >= ((HTuple)table[0]).Length) ? "" : ((HTuple)table[0])[i].D.ToString("f6");
item = new ListViewItem(val);
for (int j=1; j < colCount; j++)
{
val = (i >= ((HTuple)table[j]).Length) ? "" : ((HTuple)table[j])[i].D.ToString("f6");
item.SubItems.Add(val);
}
EdgeResultListView.Items.Add(item);
}
}
///
/// Updates listbox displaying current set of ROIs.
///
public void UpdateROIClickList(string mode)
{
int count = roiController.ROIList.Count;
switch (mode)
{
case "active":
ActiveROIListBox.SelectedIndex = mAssistant.mActRoiIdx;
break;
case "new":
ActiveROIListBox.Items.Add(" InterActive ROI " + (mAssistant.mActRoiIdx + 1).ToString("d2"));
ActiveROIListBox.SelectedIndex = mAssistant.mActRoiIdx;
break;
case "removeIdx":
ActiveROIListBox.Items.Clear();
for (int i=1; i <= count; i++)
ActiveROIListBox.Items.Add(" InterActive ROI " + i.ToString("d2"));
break;
case "removeAll":
ActiveROIListBox.Items.Clear();
break;
}
}
///
/// Updates function plot (line profile) of measure projection for the
/// selected ROI.
///
public void PaintGraph()
{
double [] grayVals;
grayVals = mAssistant.getMeasureProjection();
plotGraphWindow.plotFunction(grayVals);
ComputeStatistics(grayVals);
}
/// Adjusts statistics of measure projection (line profile).
public void ComputeStatistics(double[] grayVals)
{
HTuple tuple, val;
int max =0;
if (grayVals != null)
{
tuple = new HTuple(grayVals);
val = tuple.TupleMean();
labelMean.Text = val[0].D.ToString("f2");
val = tuple.TupleDeviation();
labelDeviation.Text = val[0].D.ToString("f2");
val = tuple.TupleSortIndex();
labelPeakX.Text = val[val.Length - 1].I + "";
max = (int)tuple[val[val.Length - 1].I].D;
labelPeak.Text = max + "";
labelRange.Text = (int)tuple[0].D + " ... " + (int)tuple[tuple.Length - 1].D;
labelRangeX.Text = "0 ... " + (tuple.Length - 1);
}
else
{
labelMean.Text = "0";
labelDeviation.Text = "0";
labelPeakX.Text = "0";
labelPeak.Text = "0";
labelRange.Text = "0 ... 0";
labelRangeX.Text = "0 ... 0";
}
}
/// Activates update for function plot (line profile).
private void tabControl_SelectedIndexChanged(object sender, System.EventArgs e)
{
int tab = tabControl.SelectedIndex;
updateLineProfile = false;
if (tab == 2)
{
updateLineProfile = true;
PaintGraph();
}
else if (tab == 3)
{
//ÏÔʾµ±Ç°É趨µÄ²ÎÊý
labMinEdgeAmplSet.Text = mAssistant.mThresh.ToString();
labSmoothingSet.Text = mAssistant.mSigma.ToString();
labROIWidthSet.Text = mAssistant.mRoiWidth.ToString();
labROIHeightSet.Text = mAssistant.mRoiHeight.ToString();
labInterpolationSet.Text = mAssistant.mInterpolation;
labTransitionSet.Text = mAssistant.mTransition;
labPositionSet.Text = mAssistant.mPosition;
}
}
///
/// Adapts mode for scaling the y-axis in the plot (line profile) window.
///
private void CSScaleComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
{
switch (CSScaleComboBox.SelectedIndex)
{
case 0: // Adaptive
plotGraphWindow.setAxisAdaption(FunctionPlot.AXIS_RANGE_ADAPTING);
break;
case 1: // Increasing
plotGraphWindow.setAxisAdaption(FunctionPlot.AXIS_RANGE_INCREASING);
break;
case 2: // Fixed
plotGraphWindow.setAxisAdaption(FunctionPlot.AXIS_RANGE_FIXED, 255.0f);
break;
}
PaintGraph();
}
private void butRoiHeightReset_Click(object sender, EventArgs e)
{
this.numUDRoiHeight.Value = Convert.ToDecimal(20);
butRoiHeightReset.ForeColor = System.Drawing.Color.Gray;
}
private void numUDRoiHeight_ValueChanged(object sender, EventArgs e)
{
this.tBroiHeight.Value = Convert.ToInt16(this.numUDRoiHeight.Value);
int val = (int)this.numUDRoiHeight.Value;
this.tBroiHeight.Value = val;
setRoiHeight(val);
}
private void tBroiHeight_ValueChanged(object sender, EventArgs e)
{
numUDRoiHeight.Value = this.tBroiHeight.Value;
numUDRoiHeight.Refresh();
}
private void btnSaveConfige_Click(object sender, EventArgs e)
{
HalconTools.MeasureParamSave param = new MeasureParamSave();
param.Save(mAssistant);
}
private void viewPort_HMouseMove(object sender, HMouseEventArgs e)
{
}
}//end of class
}//end of namespace