Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using ImageProcessingTool.Controls;
- namespace ImageProcessingTool
- {
- partial class formMain
- {
- /// <summary>
- /// Erforderliche Designervariable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
- /// <summary>
- /// Verwendete Ressourcen bereinigen.
- /// </summary>
- /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
- protected override void Dispose(bool disposing) {
- if (disposing && (components != null)) {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
- #region Vom Windows Form-Designer generierter Code
- /// <summary>
- /// Erforderliche Methode für die Designerunterstützung.
- /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
- /// </summary>
- private void InitializeComponent() {
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(formMain));
- System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("[Debug]");
- System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("Farben invertieren");
- System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("Farben entfernen");
- System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("Histogramm anzeigen");
- System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("Schwellenwert");
- System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("Punktoperatoren", new System.Windows.Forms.TreeNode[] {
- treeNode12,
- treeNode13,
- treeNode14,
- treeNode15});
- System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("Mittelwert/Box-Filter");
- System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("Median-Filter");
- System.Windows.Forms.TreeNode treeNode19 = new System.Windows.Forms.TreeNode("Glättung", new System.Windows.Forms.TreeNode[] {
- treeNode17,
- treeNode18});
- System.Windows.Forms.TreeNode treeNode20 = new System.Windows.Forms.TreeNode("Lokale Operatoren", new System.Windows.Forms.TreeNode[] {
- treeNode19});
- this.menuMain = new System.Windows.Forms.MenuStrip();
- this.manuitemFile = new System.Windows.Forms.ToolStripMenuItem();
- this.menuitemFileOpen = new System.Windows.Forms.ToolStripMenuItem();
- this.menuitemFileSaveAs = new System.Windows.Forms.ToolStripMenuItem();
- this.menuitemHelp = new System.Windows.Forms.ToolStripMenuItem();
- this.menuitemHelpInfo = new System.Windows.Forms.ToolStripMenuItem();
- this.layoutMain = new ImageProcessingTool.Controls.AdvancedTableLayoutPanel();
- this.panConsole = new ImageProcessingTool.AdvancedPanel();
- this.textConsole = new System.Windows.Forms.RichTextBox();
- this.layoutSettings = new System.Windows.Forms.TableLayoutPanel();
- this.panSettings = new ImageProcessingTool.AdvancedPanel();
- this.panSettings_PixelOperationsThreshold = new System.Windows.Forms.Panel();
- this.numSettings_PixelOperationsThreshold1 = new System.Windows.Forms.NumericUpDown();
- this.numSettings_PixelOperationsThreshold0 = new System.Windows.Forms.NumericUpDown();
- this.labText_LocalOperationsThreshold1 = new System.Windows.Forms.Label();
- this.labText_LocalOperationsThreshold0 = new System.Windows.Forms.Label();
- this.picSettings_PixelOperationsThreshold0 = new System.Windows.Forms.PictureBox();
- this.picSettings_PixelOperationsThreshold1 = new System.Windows.Forms.PictureBox();
- this.panSettings_PixelOperationsHistogram = new System.Windows.Forms.Panel();
- this.picSettings_PixelOperationsHistogram1 = new System.Windows.Forms.PictureBox();
- this.picSettings_PixelOperationsHistogram0 = new System.Windows.Forms.PictureBox();
- this.panSettings_LocalOperationsSmoothing = new System.Windows.Forms.Panel();
- this.numSettings_LocalOperationsSmoothing0 = new System.Windows.Forms.NumericUpDown();
- this.picSettings_LocalOperationsSmoothing1 = new System.Windows.Forms.PictureBox();
- this.picSettings_LocalOperationsSmoothing0 = new System.Windows.Forms.PictureBox();
- this.radiobtnSettings_LocalOperationsSmoothingMedian1 = new System.Windows.Forms.RadioButton();
- this.labText_LocalOperationsSmoothing2 = new System.Windows.Forms.Label();
- this.labText_LocalOperationsSmoothing0 = new System.Windows.Forms.Label();
- this.radiobtnSettings_LocalOperationsSmoothingMedian0 = new System.Windows.Forms.RadioButton();
- this.panSettings_Debug = new System.Windows.Forms.Panel();
- this.DEBUGlabel4 = new System.Windows.Forms.Label();
- this.DEBUGlabel3 = new System.Windows.Forms.Label();
- this.DEBUGlabel2 = new System.Windows.Forms.Label();
- this.DEBUGlabel1 = new System.Windows.Forms.Label();
- this.panSettingsExecutionButton = new System.Windows.Forms.Panel();
- this.btnSettingsExecute = new System.Windows.Forms.Button();
- this.panSettingsTitle = new System.Windows.Forms.Panel();
- this.labSettingsTitle = new System.Windows.Forms.Label();
- this.layoutImage = new ImageProcessingTool.Controls.AdvancedTableLayoutPanel();
- this.panImage = new ImageProcessingTool.AdvancedPanel();
- this.layoutImageZoom = new System.Windows.Forms.TableLayoutPanel();
- this.trackImageZoom = new ImageProcessingTool.Controls.AdvancedTrackBar();
- this.labImageZoom = new System.Windows.Forms.Label();
- this.treeviewOperations = new System.Windows.Forms.TreeView();
- this.progressOperation = new System.Windows.Forms.ProgressBar();
- this.menuMain.SuspendLayout();
- this.layoutMain.SuspendLayout();
- this.panConsole.SuspendLayout();
- this.layoutSettings.SuspendLayout();
- this.panSettings.SuspendLayout();
- this.panSettings_PixelOperationsThreshold.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold0)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold0)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold1)).BeginInit();
- this.panSettings_PixelOperationsHistogram.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram0)).BeginInit();
- this.panSettings_LocalOperationsSmoothing.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numSettings_LocalOperationsSmoothing0)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing0)).BeginInit();
- this.panSettings_Debug.SuspendLayout();
- this.panSettingsExecutionButton.SuspendLayout();
- this.panSettingsTitle.SuspendLayout();
- this.layoutImage.SuspendLayout();
- this.layoutImageZoom.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackImageZoom)).BeginInit();
- this.SuspendLayout();
- //
- // menuMain
- //
- this.menuMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.manuitemFile,
- this.menuitemHelp});
- this.menuMain.Location = new System.Drawing.Point(0, 0);
- this.menuMain.Name = "menuMain";
- this.menuMain.Size = new System.Drawing.Size(784, 24);
- this.menuMain.TabIndex = 1;
- this.menuMain.Text = "Menü";
- //
- // manuitemFile
- //
- this.manuitemFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.menuitemFileOpen,
- this.menuitemFileSaveAs});
- this.manuitemFile.Name = "manuitemFile";
- this.manuitemFile.Size = new System.Drawing.Size(46, 20);
- this.manuitemFile.Text = "Datei";
- //
- // menuitemFileOpen
- //
- this.menuitemFileOpen.Name = "menuitemFileOpen";
- this.menuitemFileOpen.ShortcutKeyDisplayString = "Strg+O";
- this.menuitemFileOpen.Size = new System.Drawing.Size(208, 22);
- this.menuitemFileOpen.Text = "Öffnen";
- this.menuitemFileOpen.Click += new System.EventHandler(this.menuitemFileOpen_Click);
- //
- // menuitemFileSaveAs
- //
- this.menuitemFileSaveAs.Name = "menuitemFileSaveAs";
- this.menuitemFileSaveAs.ShortcutKeyDisplayString = "Strg+S";
- this.menuitemFileSaveAs.Size = new System.Drawing.Size(208, 22);
- this.menuitemFileSaveAs.Text = "Speichern unter...";
- this.menuitemFileSaveAs.Click += new System.EventHandler(this.menuitemFileSaveAs_Click);
- //
- // menuitemHelp
- //
- this.menuitemHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.menuitemHelpInfo});
- this.menuitemHelp.Name = "menuitemHelp";
- this.menuitemHelp.Size = new System.Drawing.Size(44, 20);
- this.menuitemHelp.Text = "Hilfe";
- //
- // menuitemHelpInfo
- //
- this.menuitemHelpInfo.Name = "menuitemHelpInfo";
- this.menuitemHelpInfo.Size = new System.Drawing.Size(239, 22);
- this.menuitemHelpInfo.Text = "Info über ImageProcessionTool";
- this.menuitemHelpInfo.Click += new System.EventHandler(this.menuitemHelpInfo_Click);
- //
- // layoutMain
- //
- this.layoutMain.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
- this.layoutMain.ColumnCount = 3;
- this.layoutMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F));
- this.layoutMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 265F));
- this.layoutMain.Controls.Add(this.panConsole, 1, 1);
- this.layoutMain.Controls.Add(this.layoutSettings, 2, 0);
- this.layoutMain.Controls.Add(this.layoutImage, 1, 0);
- this.layoutMain.Controls.Add(this.treeviewOperations, 0, 0);
- this.layoutMain.Controls.Add(this.progressOperation, 0, 2);
- this.layoutMain.Dock = System.Windows.Forms.DockStyle.Fill;
- this.layoutMain.Location = new System.Drawing.Point(0, 24);
- this.layoutMain.Name = "layoutMain";
- this.layoutMain.RowCount = 3;
- this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 150F));
- this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.layoutMain.Size = new System.Drawing.Size(784, 538);
- this.layoutMain.TabIndex = 0;
- //
- // panConsole
- //
- this.panConsole.Controls.Add(this.textConsole);
- this.panConsole.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panConsole.Location = new System.Drawing.Point(202, 366);
- this.panConsole.Margin = new System.Windows.Forms.Padding(0);
- this.panConsole.Name = "panConsole";
- this.panConsole.Padding = new System.Windows.Forms.Padding(5);
- this.panConsole.Size = new System.Drawing.Size(315, 150);
- this.panConsole.TabIndex = 1;
- //
- // textConsole
- //
- this.textConsole.BackColor = System.Drawing.SystemColors.ControlLightLight;
- this.textConsole.BorderStyle = System.Windows.Forms.BorderStyle.None;
- this.textConsole.Dock = System.Windows.Forms.DockStyle.Fill;
- this.textConsole.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.textConsole.Location = new System.Drawing.Point(5, 5);
- this.textConsole.Name = "textConsole";
- this.textConsole.ReadOnly = true;
- this.textConsole.Size = new System.Drawing.Size(305, 140);
- this.textConsole.TabIndex = 0;
- this.textConsole.Text = "";
- this.textConsole.WordWrap = false;
- //
- // layoutSettings
- //
- this.layoutSettings.ColumnCount = 1;
- this.layoutSettings.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutSettings.Controls.Add(this.panSettings, 0, 1);
- this.layoutSettings.Controls.Add(this.panSettingsExecutionButton, 0, 2);
- this.layoutSettings.Controls.Add(this.panSettingsTitle, 0, 0);
- this.layoutSettings.Dock = System.Windows.Forms.DockStyle.Fill;
- this.layoutSettings.Location = new System.Drawing.Point(518, 1);
- this.layoutSettings.Margin = new System.Windows.Forms.Padding(0);
- this.layoutSettings.Name = "layoutSettings";
- this.layoutSettings.RowCount = 3;
- this.layoutMain.SetRowSpan(this.layoutSettings, 2);
- this.layoutSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
- this.layoutSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
- this.layoutSettings.Size = new System.Drawing.Size(265, 515);
- this.layoutSettings.TabIndex = 0;
- //
- // panSettings
- //
- this.panSettings.Controls.Add(this.panSettings_PixelOperationsThreshold);
- this.panSettings.Controls.Add(this.panSettings_PixelOperationsHistogram);
- this.panSettings.Controls.Add(this.panSettings_LocalOperationsSmoothing);
- this.panSettings.Controls.Add(this.panSettings_Debug);
- this.panSettings.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panSettings.Location = new System.Drawing.Point(0, 40);
- this.panSettings.Margin = new System.Windows.Forms.Padding(0);
- this.panSettings.Name = "panSettings";
- this.panSettings.Size = new System.Drawing.Size(265, 435);
- this.panSettings.TabIndex = 2;
- //
- // panSettings_PixelOperationsThreshold
- //
- this.panSettings_PixelOperationsThreshold.Controls.Add(this.numSettings_PixelOperationsThreshold1);
- this.panSettings_PixelOperationsThreshold.Controls.Add(this.numSettings_PixelOperationsThreshold0);
- this.panSettings_PixelOperationsThreshold.Controls.Add(this.labText_LocalOperationsThreshold1);
- this.panSettings_PixelOperationsThreshold.Controls.Add(this.labText_LocalOperationsThreshold0);
- this.panSettings_PixelOperationsThreshold.Controls.Add(this.picSettings_PixelOperationsThreshold0);
- this.panSettings_PixelOperationsThreshold.Controls.Add(this.picSettings_PixelOperationsThreshold1);
- this.panSettings_PixelOperationsThreshold.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panSettings_PixelOperationsThreshold.Location = new System.Drawing.Point(0, 0);
- this.panSettings_PixelOperationsThreshold.Margin = new System.Windows.Forms.Padding(0);
- this.panSettings_PixelOperationsThreshold.Name = "panSettings_PixelOperationsThreshold";
- this.panSettings_PixelOperationsThreshold.Padding = new System.Windows.Forms.Padding(10);
- this.panSettings_PixelOperationsThreshold.Size = new System.Drawing.Size(265, 435);
- this.panSettings_PixelOperationsThreshold.TabIndex = 12;
- //
- // numSettings_PixelOperationsThreshold1
- //
- this.numSettings_PixelOperationsThreshold1.Location = new System.Drawing.Point(16, 306);
- this.numSettings_PixelOperationsThreshold1.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numSettings_PixelOperationsThreshold1.Name = "numSettings_PixelOperationsThreshold1";
- this.numSettings_PixelOperationsThreshold1.Size = new System.Drawing.Size(120, 22);
- this.numSettings_PixelOperationsThreshold1.TabIndex = 4;
- this.numSettings_PixelOperationsThreshold1.Value = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numSettings_PixelOperationsThreshold1.ValueChanged += new System.EventHandler(this.numSettings_PixelOperationsThreshold_ValueChanged);
- //
- // numSettings_PixelOperationsThreshold0
- //
- this.numSettings_PixelOperationsThreshold0.Location = new System.Drawing.Point(16, 255);
- this.numSettings_PixelOperationsThreshold0.Maximum = new decimal(new int[] {
- 255,
- 0,
- 0,
- 0});
- this.numSettings_PixelOperationsThreshold0.Name = "numSettings_PixelOperationsThreshold0";
- this.numSettings_PixelOperationsThreshold0.Size = new System.Drawing.Size(120, 22);
- this.numSettings_PixelOperationsThreshold0.TabIndex = 3;
- this.numSettings_PixelOperationsThreshold0.ValueChanged += new System.EventHandler(this.numSettings_PixelOperationsThreshold_ValueChanged);
- //
- // labText_LocalOperationsThreshold1
- //
- this.labText_LocalOperationsThreshold1.AutoSize = true;
- this.labText_LocalOperationsThreshold1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labText_LocalOperationsThreshold1.Location = new System.Drawing.Point(13, 290);
- this.labText_LocalOperationsThreshold1.Name = "labText_LocalOperationsThreshold1";
- this.labText_LocalOperationsThreshold1.Size = new System.Drawing.Size(70, 13);
- this.labText_LocalOperationsThreshold1.TabIndex = 2;
- this.labText_LocalOperationsThreshold1.Text = "Obergrenze:";
- //
- // labText_LocalOperationsThreshold0
- //
- this.labText_LocalOperationsThreshold0.AutoSize = true;
- this.labText_LocalOperationsThreshold0.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labText_LocalOperationsThreshold0.Location = new System.Drawing.Point(13, 239);
- this.labText_LocalOperationsThreshold0.Name = "labText_LocalOperationsThreshold0";
- this.labText_LocalOperationsThreshold0.Size = new System.Drawing.Size(74, 13);
- this.labText_LocalOperationsThreshold0.TabIndex = 1;
- this.labText_LocalOperationsThreshold0.Text = "Untergrenze:";
- //
- // picSettings_PixelOperationsThreshold0
- //
- this.picSettings_PixelOperationsThreshold0.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.picSettings_PixelOperationsThreshold0.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.picSettings_PixelOperationsThreshold0.Location = new System.Drawing.Point(13, 13);
- this.picSettings_PixelOperationsThreshold0.Name = "picSettings_PixelOperationsThreshold0";
- this.picSettings_PixelOperationsThreshold0.Size = new System.Drawing.Size(238, 190);
- this.picSettings_PixelOperationsThreshold0.TabIndex = 0;
- this.picSettings_PixelOperationsThreshold0.TabStop = false;
- this.picSettings_PixelOperationsThreshold0.Paint += new System.Windows.Forms.PaintEventHandler(this.picSettings_PixelOperationsThreshold_Paint);
- //
- // picSettings_PixelOperationsThreshold1
- //
- this.picSettings_PixelOperationsThreshold1.BackgroundImage = global::ImageProcessingTool.Properties.Resources.histogramm_legend;
- this.picSettings_PixelOperationsThreshold1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.picSettings_PixelOperationsThreshold1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.picSettings_PixelOperationsThreshold1.Location = new System.Drawing.Point(13, 202);
- this.picSettings_PixelOperationsThreshold1.Name = "picSettings_PixelOperationsThreshold1";
- this.picSettings_PixelOperationsThreshold1.Size = new System.Drawing.Size(238, 15);
- this.picSettings_PixelOperationsThreshold1.TabIndex = 5;
- this.picSettings_PixelOperationsThreshold1.TabStop = false;
- //
- // panSettings_PixelOperationsHistogram
- //
- this.panSettings_PixelOperationsHistogram.Controls.Add(this.picSettings_PixelOperationsHistogram1);
- this.panSettings_PixelOperationsHistogram.Controls.Add(this.picSettings_PixelOperationsHistogram0);
- this.panSettings_PixelOperationsHistogram.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panSettings_PixelOperationsHistogram.Location = new System.Drawing.Point(0, 0);
- this.panSettings_PixelOperationsHistogram.Margin = new System.Windows.Forms.Padding(0);
- this.panSettings_PixelOperationsHistogram.Name = "panSettings_PixelOperationsHistogram";
- this.panSettings_PixelOperationsHistogram.Padding = new System.Windows.Forms.Padding(5);
- this.panSettings_PixelOperationsHistogram.Size = new System.Drawing.Size(265, 435);
- this.panSettings_PixelOperationsHistogram.TabIndex = 11;
- //
- // picSettings_PixelOperationsHistogram1
- //
- this.picSettings_PixelOperationsHistogram1.BackgroundImage = global::ImageProcessingTool.Properties.Resources.histogramm_legend;
- this.picSettings_PixelOperationsHistogram1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.picSettings_PixelOperationsHistogram1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.picSettings_PixelOperationsHistogram1.Location = new System.Drawing.Point(13, 202);
- this.picSettings_PixelOperationsHistogram1.Name = "picSettings_PixelOperationsHistogram1";
- this.picSettings_PixelOperationsHistogram1.Size = new System.Drawing.Size(238, 15);
- this.picSettings_PixelOperationsHistogram1.TabIndex = 6;
- this.picSettings_PixelOperationsHistogram1.TabStop = false;
- //
- // picSettings_PixelOperationsHistogram0
- //
- this.picSettings_PixelOperationsHistogram0.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.picSettings_PixelOperationsHistogram0.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.picSettings_PixelOperationsHistogram0.Location = new System.Drawing.Point(13, 13);
- this.picSettings_PixelOperationsHistogram0.Name = "picSettings_PixelOperationsHistogram0";
- this.picSettings_PixelOperationsHistogram0.Size = new System.Drawing.Size(238, 190);
- this.picSettings_PixelOperationsHistogram0.TabIndex = 0;
- this.picSettings_PixelOperationsHistogram0.TabStop = false;
- //
- // panSettings_LocalOperationsSmoothing
- //
- this.panSettings_LocalOperationsSmoothing.Controls.Add(this.numSettings_LocalOperationsSmoothing0);
- this.panSettings_LocalOperationsSmoothing.Controls.Add(this.picSettings_LocalOperationsSmoothing1);
- this.panSettings_LocalOperationsSmoothing.Controls.Add(this.picSettings_LocalOperationsSmoothing0);
- this.panSettings_LocalOperationsSmoothing.Controls.Add(this.radiobtnSettings_LocalOperationsSmoothingMedian1);
- this.panSettings_LocalOperationsSmoothing.Controls.Add(this.labText_LocalOperationsSmoothing2);
- this.panSettings_LocalOperationsSmoothing.Controls.Add(this.labText_LocalOperationsSmoothing0);
- this.panSettings_LocalOperationsSmoothing.Controls.Add(this.radiobtnSettings_LocalOperationsSmoothingMedian0);
- this.panSettings_LocalOperationsSmoothing.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panSettings_LocalOperationsSmoothing.Location = new System.Drawing.Point(0, 0);
- this.panSettings_LocalOperationsSmoothing.Margin = new System.Windows.Forms.Padding(0);
- this.panSettings_LocalOperationsSmoothing.Name = "panSettings_LocalOperationsSmoothing";
- this.panSettings_LocalOperationsSmoothing.Padding = new System.Windows.Forms.Padding(10);
- this.panSettings_LocalOperationsSmoothing.Size = new System.Drawing.Size(265, 435);
- this.panSettings_LocalOperationsSmoothing.TabIndex = 2;
- //
- // numSettings_LocalOperationsSmoothing0
- //
- this.numSettings_LocalOperationsSmoothing0.Location = new System.Drawing.Point(16, 181);
- this.numSettings_LocalOperationsSmoothing0.Maximum = new decimal(new int[] {
- 5,
- 0,
- 0,
- 0});
- this.numSettings_LocalOperationsSmoothing0.Minimum = new decimal(new int[] {
- 1,
- 0,
- 0,
- 0});
- this.numSettings_LocalOperationsSmoothing0.Name = "numSettings_LocalOperationsSmoothing0";
- this.numSettings_LocalOperationsSmoothing0.Size = new System.Drawing.Size(40, 22);
- this.numSettings_LocalOperationsSmoothing0.TabIndex = 10;
- this.numSettings_LocalOperationsSmoothing0.Value = new decimal(new int[] {
- 1,
- 0,
- 0,
- 0});
- //
- // picSettings_LocalOperationsSmoothing1
- //
- this.picSettings_LocalOperationsSmoothing1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("picSettings_LocalOperationsSmoothing1.BackgroundImage")));
- this.picSettings_LocalOperationsSmoothing1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.picSettings_LocalOperationsSmoothing1.Cursor = System.Windows.Forms.Cursors.Hand;
- this.picSettings_LocalOperationsSmoothing1.Location = new System.Drawing.Point(122, 55);
- this.picSettings_LocalOperationsSmoothing1.Name = "picSettings_LocalOperationsSmoothing1";
- this.picSettings_LocalOperationsSmoothing1.Size = new System.Drawing.Size(80, 80);
- this.picSettings_LocalOperationsSmoothing1.TabIndex = 9;
- this.picSettings_LocalOperationsSmoothing1.TabStop = false;
- this.picSettings_LocalOperationsSmoothing1.Click += new System.EventHandler(this.picSettings_LocalOperationsSmoothing_Click);
- //
- // picSettings_LocalOperationsSmoothing0
- //
- this.picSettings_LocalOperationsSmoothing0.BackgroundImage = global::ImageProcessingTool.Properties.Resources.neighborhood_square;
- this.picSettings_LocalOperationsSmoothing0.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.picSettings_LocalOperationsSmoothing0.Cursor = System.Windows.Forms.Cursors.Hand;
- this.picSettings_LocalOperationsSmoothing0.Location = new System.Drawing.Point(16, 55);
- this.picSettings_LocalOperationsSmoothing0.Name = "picSettings_LocalOperationsSmoothing0";
- this.picSettings_LocalOperationsSmoothing0.Size = new System.Drawing.Size(80, 80);
- this.picSettings_LocalOperationsSmoothing0.TabIndex = 8;
- this.picSettings_LocalOperationsSmoothing0.TabStop = false;
- this.picSettings_LocalOperationsSmoothing0.Click += new System.EventHandler(this.picSettings_LocalOperationsSmoothing_Click);
- //
- // radiobtnSettings_LocalOperationsSmoothingMedian1
- //
- this.radiobtnSettings_LocalOperationsSmoothingMedian1.AutoSize = true;
- this.radiobtnSettings_LocalOperationsSmoothingMedian1.Location = new System.Drawing.Point(122, 35);
- this.radiobtnSettings_LocalOperationsSmoothingMedian1.Name = "radiobtnSettings_LocalOperationsSmoothingMedian1";
- this.radiobtnSettings_LocalOperationsSmoothingMedian1.Size = new System.Drawing.Size(55, 17);
- this.radiobtnSettings_LocalOperationsSmoothingMedian1.TabIndex = 7;
- this.radiobtnSettings_LocalOperationsSmoothingMedian1.Text = "Raute";
- this.radiobtnSettings_LocalOperationsSmoothingMedian1.UseVisualStyleBackColor = true;
- //
- // labText_LocalOperationsSmoothing2
- //
- this.labText_LocalOperationsSmoothing2.AutoSize = true;
- this.labText_LocalOperationsSmoothing2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labText_LocalOperationsSmoothing2.Location = new System.Drawing.Point(13, 160);
- this.labText_LocalOperationsSmoothing2.Name = "labText_LocalOperationsSmoothing2";
- this.labText_LocalOperationsSmoothing2.Size = new System.Drawing.Size(208, 13);
- this.labText_LocalOperationsSmoothing2.TabIndex = 6;
- this.labText_LocalOperationsSmoothing2.Text = "Maximale Entfernung um Mittelpunkt:";
- //
- // labText_LocalOperationsSmoothing0
- //
- this.labText_LocalOperationsSmoothing0.AutoSize = true;
- this.labText_LocalOperationsSmoothing0.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labText_LocalOperationsSmoothing0.Location = new System.Drawing.Point(13, 10);
- this.labText_LocalOperationsSmoothing0.Name = "labText_LocalOperationsSmoothing0";
- this.labText_LocalOperationsSmoothing0.Size = new System.Drawing.Size(127, 13);
- this.labText_LocalOperationsSmoothing0.TabIndex = 2;
- this.labText_LocalOperationsSmoothing0.Text = "Typ der Nachbarschaft:";
- //
- // radiobtnSettings_LocalOperationsSmoothingMedian0
- //
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.AutoSize = true;
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.Checked = true;
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.Location = new System.Drawing.Point(16, 35);
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.Name = "radiobtnSettings_LocalOperationsSmoothingMedian0";
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.Size = new System.Drawing.Size(68, 17);
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.TabIndex = 1;
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.TabStop = true;
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.Text = "Quadrat";
- this.radiobtnSettings_LocalOperationsSmoothingMedian0.UseVisualStyleBackColor = true;
- //
- // panSettings_Debug
- //
- this.panSettings_Debug.Controls.Add(this.DEBUGlabel4);
- this.panSettings_Debug.Controls.Add(this.DEBUGlabel3);
- this.panSettings_Debug.Controls.Add(this.DEBUGlabel2);
- this.panSettings_Debug.Controls.Add(this.DEBUGlabel1);
- this.panSettings_Debug.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panSettings_Debug.Location = new System.Drawing.Point(0, 0);
- this.panSettings_Debug.Margin = new System.Windows.Forms.Padding(0);
- this.panSettings_Debug.Name = "panSettings_Debug";
- this.panSettings_Debug.Size = new System.Drawing.Size(265, 435);
- this.panSettings_Debug.TabIndex = 1;
- //
- // DEBUGlabel4
- //
- this.DEBUGlabel4.AutoSize = true;
- this.DEBUGlabel4.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.DEBUGlabel4.Location = new System.Drawing.Point(18, 69);
- this.DEBUGlabel4.Name = "DEBUGlabel4";
- this.DEBUGlabel4.Size = new System.Drawing.Size(148, 17);
- this.DEBUGlabel4.TabIndex = 3;
- this.DEBUGlabel4.Text = "ImageZoomFactor = 0|0";
- //
- // DEBUGlabel3
- //
- this.DEBUGlabel3.AutoSize = true;
- this.DEBUGlabel3.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.DEBUGlabel3.Location = new System.Drawing.Point(18, 52);
- this.DEBUGlabel3.Name = "DEBUGlabel3";
- this.DEBUGlabel3.Size = new System.Drawing.Size(138, 17);
- this.DEBUGlabel3.TabIndex = 2;
- this.DEBUGlabel3.Text = "ImageZoomFactor = 0";
- //
- // DEBUGlabel2
- //
- this.DEBUGlabel2.AutoSize = true;
- this.DEBUGlabel2.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.DEBUGlabel2.Location = new System.Drawing.Point(18, 35);
- this.DEBUGlabel2.Name = "DEBUGlabel2";
- this.DEBUGlabel2.Size = new System.Drawing.Size(119, 17);
- this.DEBUGlabel2.TabIndex = 1;
- this.DEBUGlabel2.Text = "ImageAnchor = 0|0";
- //
- // DEBUGlabel1
- //
- this.DEBUGlabel1.AutoSize = true;
- this.DEBUGlabel1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.DEBUGlabel1.Location = new System.Drawing.Point(18, 18);
- this.DEBUGlabel1.Name = "DEBUGlabel1";
- this.DEBUGlabel1.Size = new System.Drawing.Size(124, 17);
- this.DEBUGlabel1.TabIndex = 0;
- this.DEBUGlabel1.Text = "ImagePosition = 0|0";
- //
- // panSettingsExecutionButton
- //
- this.panSettingsExecutionButton.Controls.Add(this.btnSettingsExecute);
- this.panSettingsExecutionButton.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panSettingsExecutionButton.Location = new System.Drawing.Point(0, 475);
- this.panSettingsExecutionButton.Margin = new System.Windows.Forms.Padding(0);
- this.panSettingsExecutionButton.Name = "panSettingsExecutionButton";
- this.panSettingsExecutionButton.Size = new System.Drawing.Size(265, 40);
- this.panSettingsExecutionButton.TabIndex = 3;
- //
- // btnSettingsExecute
- //
- this.btnSettingsExecute.Location = new System.Drawing.Point(41, 9);
- this.btnSettingsExecute.Margin = new System.Windows.Forms.Padding(0);
- this.btnSettingsExecute.Name = "btnSettingsExecute";
- this.btnSettingsExecute.Size = new System.Drawing.Size(176, 23);
- this.btnSettingsExecute.TabIndex = 0;
- this.btnSettingsExecute.Text = "Operation ausführen";
- this.btnSettingsExecute.UseVisualStyleBackColor = true;
- this.btnSettingsExecute.Click += new System.EventHandler(this.btnSettingsExecute_Click);
- //
- // panSettingsTitle
- //
- this.panSettingsTitle.Controls.Add(this.labSettingsTitle);
- this.panSettingsTitle.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panSettingsTitle.Location = new System.Drawing.Point(0, 0);
- this.panSettingsTitle.Margin = new System.Windows.Forms.Padding(0);
- this.panSettingsTitle.Name = "panSettingsTitle";
- this.panSettingsTitle.Padding = new System.Windows.Forms.Padding(3);
- this.panSettingsTitle.Size = new System.Drawing.Size(265, 40);
- this.panSettingsTitle.TabIndex = 4;
- //
- // labSettingsTitle
- //
- this.labSettingsTitle.Dock = System.Windows.Forms.DockStyle.Fill;
- this.labSettingsTitle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labSettingsTitle.Location = new System.Drawing.Point(3, 3);
- this.labSettingsTitle.Name = "labSettingsTitle";
- this.labSettingsTitle.Size = new System.Drawing.Size(259, 34);
- this.labSettingsTitle.TabIndex = 0;
- this.labSettingsTitle.Text = "#SettingsTitle";
- this.labSettingsTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // layoutImage
- //
- this.layoutImage.ColumnCount = 1;
- this.layoutImage.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutImage.Controls.Add(this.panImage, 0, 0);
- this.layoutImage.Controls.Add(this.layoutImageZoom, 0, 1);
- this.layoutImage.Dock = System.Windows.Forms.DockStyle.Fill;
- this.layoutImage.Location = new System.Drawing.Point(202, 1);
- this.layoutImage.Margin = new System.Windows.Forms.Padding(0);
- this.layoutImage.Name = "layoutImage";
- this.layoutImage.RowCount = 2;
- this.layoutImage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutImage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
- this.layoutImage.Size = new System.Drawing.Size(315, 364);
- this.layoutImage.TabIndex = 3;
- //
- // panImage
- //
- this.panImage.Cursor = System.Windows.Forms.Cursors.Hand;
- this.panImage.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panImage.Location = new System.Drawing.Point(0, 0);
- this.panImage.Margin = new System.Windows.Forms.Padding(0);
- this.panImage.Name = "panImage";
- this.panImage.Size = new System.Drawing.Size(315, 334);
- this.panImage.TabIndex = 2;
- //
- // layoutImageZoom
- //
- this.layoutImageZoom.ColumnCount = 2;
- this.layoutImageZoom.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutImageZoom.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
- this.layoutImageZoom.Controls.Add(this.trackImageZoom, 0, 0);
- this.layoutImageZoom.Controls.Add(this.labImageZoom, 1, 0);
- this.layoutImageZoom.Dock = System.Windows.Forms.DockStyle.Fill;
- this.layoutImageZoom.Location = new System.Drawing.Point(0, 334);
- this.layoutImageZoom.Margin = new System.Windows.Forms.Padding(0);
- this.layoutImageZoom.Name = "layoutImageZoom";
- this.layoutImageZoom.RowCount = 1;
- this.layoutImageZoom.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.layoutImageZoom.Size = new System.Drawing.Size(315, 30);
- this.layoutImageZoom.TabIndex = 3;
- //
- // trackImageZoom
- //
- this.trackImageZoom.Dock = System.Windows.Forms.DockStyle.Fill;
- this.trackImageZoom.LargeChange = 10;
- this.trackImageZoom.Location = new System.Drawing.Point(0, 0);
- this.trackImageZoom.Margin = new System.Windows.Forms.Padding(0);
- this.trackImageZoom.Maximum = 100;
- this.trackImageZoom.Name = "trackImageZoom";
- this.trackImageZoom.Size = new System.Drawing.Size(215, 30);
- this.trackImageZoom.TabIndex = 0;
- this.trackImageZoom.TabStop = false;
- this.trackImageZoom.TickFrequency = 10;
- this.trackImageZoom.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
- this.trackImageZoom.Value = 30;
- this.trackImageZoom.Scroll += new System.EventHandler(this.trackImageZoom_Scroll);
- //
- // labImageZoom
- //
- this.labImageZoom.Dock = System.Windows.Forms.DockStyle.Fill;
- this.labImageZoom.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.labImageZoom.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.labImageZoom.Location = new System.Drawing.Point(218, 0);
- this.labImageZoom.Name = "labImageZoom";
- this.labImageZoom.Size = new System.Drawing.Size(94, 30);
- this.labImageZoom.TabIndex = 1;
- this.labImageZoom.Text = "Zoom: 100%";
- this.labImageZoom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- //
- // treeviewOperations
- //
- this.treeviewOperations.BorderStyle = System.Windows.Forms.BorderStyle.None;
- this.treeviewOperations.Dock = System.Windows.Forms.DockStyle.Fill;
- this.treeviewOperations.HideSelection = false;
- this.treeviewOperations.Location = new System.Drawing.Point(1, 1);
- this.treeviewOperations.Margin = new System.Windows.Forms.Padding(0);
- this.treeviewOperations.Name = "treeviewOperations";
- treeNode11.Name = "nodeDebug";
- treeNode11.Text = "[Debug]";
- treeNode12.Name = "nodePixelOperationsColorInversion";
- treeNode12.Text = "Farben invertieren";
- treeNode13.Name = "nodePixelOperationsColorToBlackAndWhite";
- treeNode13.Text = "Farben entfernen";
- treeNode14.Name = "nodePixelOperationsHistogram";
- treeNode14.Text = "Histogramm anzeigen";
- treeNode15.Name = "nodePixelOperationsThreshold";
- treeNode15.Text = "Schwellenwert";
- treeNode16.Name = "nodePixelOperations";
- treeNode16.Text = "Punktoperatoren";
- treeNode17.Name = "nodeLocalOperationsSmoothingBoxFilter";
- treeNode17.Text = "Mittelwert/Box-Filter";
- treeNode18.Name = "nodeLocalOperationsSmoothingMedian";
- treeNode18.Text = "Median-Filter";
- treeNode19.Name = "nodeLocalOperationsSmoothing";
- treeNode19.Text = "Glättung";
- treeNode20.Name = "nodeLocalOperations";
- treeNode20.Text = "Lokale Operatoren";
- this.treeviewOperations.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
- treeNode11,
- treeNode16,
- treeNode20});
- this.layoutMain.SetRowSpan(this.treeviewOperations, 2);
- this.treeviewOperations.Size = new System.Drawing.Size(200, 515);
- this.treeviewOperations.TabIndex = 4;
- this.treeviewOperations.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeviewOperations_AfterSelect);
- //
- // progressOperation
- //
- this.layoutMain.SetColumnSpan(this.progressOperation, 3);
- this.progressOperation.Dock = System.Windows.Forms.DockStyle.Fill;
- this.progressOperation.Location = new System.Drawing.Point(1, 517);
- this.progressOperation.Margin = new System.Windows.Forms.Padding(0);
- this.progressOperation.Name = "progressOperation";
- this.progressOperation.Size = new System.Drawing.Size(782, 20);
- this.progressOperation.TabIndex = 5;
- //
- // formMain
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(784, 562);
- this.Controls.Add(this.layoutMain);
- this.Controls.Add(this.menuMain);
- this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.KeyPreview = true;
- this.MinimumSize = new System.Drawing.Size(800, 600);
- this.Name = "formMain";
- this.Text = "ImageProcessingTool v.0.1 (preAlpha)";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formMain_FormClosing);
- this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.formMain_KeyDown);
- this.menuMain.ResumeLayout(false);
- this.menuMain.PerformLayout();
- this.layoutMain.ResumeLayout(false);
- this.panConsole.ResumeLayout(false);
- this.layoutSettings.ResumeLayout(false);
- this.panSettings.ResumeLayout(false);
- this.panSettings_PixelOperationsThreshold.ResumeLayout(false);
- this.panSettings_PixelOperationsThreshold.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold0)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold0)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold1)).EndInit();
- this.panSettings_PixelOperationsHistogram.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram0)).EndInit();
- this.panSettings_LocalOperationsSmoothing.ResumeLayout(false);
- this.panSettings_LocalOperationsSmoothing.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numSettings_LocalOperationsSmoothing0)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing0)).EndInit();
- this.panSettings_Debug.ResumeLayout(false);
- this.panSettings_Debug.PerformLayout();
- this.panSettingsExecutionButton.ResumeLayout(false);
- this.panSettingsTitle.ResumeLayout(false);
- this.layoutImage.ResumeLayout(false);
- this.layoutImageZoom.ResumeLayout(false);
- this.layoutImageZoom.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackImageZoom)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
- }
- #endregion
- private AdvancedTableLayoutPanel layoutMain;
- private AdvancedPanel panConsole;
- private AdvancedPanel panSettings;
- private AdvancedTableLayoutPanel layoutImage;
- private System.Windows.Forms.MenuStrip menuMain;
- private System.Windows.Forms.ToolStripMenuItem menuitemHelp;
- private System.Windows.Forms.ToolStripMenuItem menuitemHelpInfo;
- private AdvancedPanel panImage;
- private AdvancedTrackBar trackImageZoom;
- private System.Windows.Forms.ToolStripMenuItem manuitemFile;
- private System.Windows.Forms.ToolStripMenuItem menuitemFileOpen;
- private System.Windows.Forms.TreeView treeviewOperations;
- private System.Windows.Forms.TableLayoutPanel layoutSettings;
- private System.Windows.Forms.Panel panSettingsExecutionButton;
- private System.Windows.Forms.Panel panSettingsTitle;
- private System.Windows.Forms.Label labSettingsTitle;
- private System.Windows.Forms.RichTextBox textConsole;
- private System.Windows.Forms.TableLayoutPanel layoutImageZoom;
- private System.Windows.Forms.Label labImageZoom;
- private System.Windows.Forms.Panel panSettings_Debug;
- public System.Windows.Forms.Label DEBUGlabel4;
- public System.Windows.Forms.Label DEBUGlabel3;
- public System.Windows.Forms.Label DEBUGlabel2;
- public System.Windows.Forms.Label DEBUGlabel1;
- private System.Windows.Forms.ProgressBar progressOperation;
- private System.Windows.Forms.Button btnSettingsExecute;
- private System.Windows.Forms.ToolStripMenuItem menuitemFileSaveAs;
- private System.Windows.Forms.Panel panSettings_LocalOperationsSmoothing;
- private System.Windows.Forms.PictureBox picSettings_LocalOperationsSmoothing0;
- private System.Windows.Forms.RadioButton radiobtnSettings_LocalOperationsSmoothingMedian1;
- private System.Windows.Forms.Label labText_LocalOperationsSmoothing2;
- private System.Windows.Forms.Label labText_LocalOperationsSmoothing0;
- private System.Windows.Forms.RadioButton radiobtnSettings_LocalOperationsSmoothingMedian0;
- private System.Windows.Forms.PictureBox picSettings_LocalOperationsSmoothing1;
- private System.Windows.Forms.NumericUpDown numSettings_LocalOperationsSmoothing0;
- private System.Windows.Forms.Panel panSettings_PixelOperationsHistogram;
- private System.Windows.Forms.PictureBox picSettings_PixelOperationsHistogram0;
- private System.Windows.Forms.Panel panSettings_PixelOperationsThreshold;
- private System.Windows.Forms.PictureBox picSettings_PixelOperationsThreshold0;
- private System.Windows.Forms.NumericUpDown numSettings_PixelOperationsThreshold1;
- private System.Windows.Forms.NumericUpDown numSettings_PixelOperationsThreshold0;
- private System.Windows.Forms.Label labText_LocalOperationsThreshold1;
- private System.Windows.Forms.Label labText_LocalOperationsThreshold0;
- private System.Windows.Forms.PictureBox picSettings_PixelOperationsThreshold1;
- private System.Windows.Forms.PictureBox picSettings_PixelOperationsHistogram1;
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Drawing;
- using ImageProcessingTool.Imaging;
- using ImageProcessingTool.ImageProcessing.Filters;
- namespace ImageProcessingTool.ImageProcessing
- {
- class Neighborhood
- {
- private struct ColorPosition : IComparable<ColorPosition>
- {
- public ColorPosition(int x, int y, Color color) {
- _X = x;
- _Y = y;
- _Color = color;
- _IsSet = true;
- }
- private int _X;
- public int X {
- get {
- return _X;
- }
- set {
- _X = value;
- }
- }
- private int _Y;
- public int Y {
- get {
- return _Y;
- }
- set {
- _Y = value;
- }
- }
- private Color _Color;
- public Color Color {
- get {
- return _Color;
- }
- set {
- _Color = value;
- }
- }
- public static ColorPosition Empty {
- get {
- return new ColorPosition();
- }
- }
- private bool _IsSet;
- public bool IsSet {
- get {
- return _IsSet;
- }
- }
- public int CompareTo(ColorPosition colorPosition) {
- return PixelOperations.getBlackAndWhiteValue(Color) - PixelOperations.getBlackAndWhiteValue(colorPosition.Color);
- }
- }
- private ColorPosition _CenterColorPosition;
- private ColorPosition[,] _NeighborColorPositions;
- public enum NeighborhoodType
- {
- Square,
- Rhombus
- }
- private NeighborhoodType _Type;
- public NeighborhoodType Type {
- get {
- return _Type;
- }
- }
- private int _MaxRadius;
- public int MaxRadius {
- get {
- return _MaxRadius;
- }
- }
- public Neighborhood(NeighborhoodType type, int maxRadius) {
- _Type = type;
- _MaxRadius = maxRadius;
- _CenterColorPosition = ColorPosition.Empty;
- _NeighborColorPositions = new ColorPosition[maxRadius * 4, maxRadius * 4];
- }
- public void setColor(int x, int y, Color color) {
- if (x == 0 && y == 0) {
- _CenterColorPosition = new ColorPosition(x, y, color);
- return;
- }
- if (Type == NeighborhoodType.Square ||
- Type == NeighborhoodType.Rhombus && Math.Abs(x * y) <= MaxRadius) {
- int posX = (Math.Abs(x) * 2) + (x > 0 ? 0 : 1);
- int posY = (Math.Abs(y) * 2) + (y > 0 ? 0 : 1);
- _NeighborColorPositions[posX, posY] = new ColorPosition(x, y, color);
- }
- }
- public Color getColor(int x, int y) {
- if (x == 0 && y == 0) {
- return _CenterColorPosition.Color;
- }
- int posX = (Math.Abs(x) * 2) + (x > 0 ? 0 : 1);
- int posY = (Math.Abs(y) * 2) + (y > 0 ? 0 : 1);
- return _NeighborColorPositions[posX, posY].Color;
- }
- public Color getAverageColor() {
- double[] RGB = new double[3];
- double count = 0;
- foreach (ColorPosition colorPosition in _NeighborColorPositions) {
- if (colorPosition.IsSet) {
- RGB[0] += colorPosition.Color.R;
- RGB[1] += colorPosition.Color.G;
- RGB[2] += colorPosition.Color.B;
- count++;
- }
- }
- int[] avgRGB = new int[] { (int)Math.Round((RGB[0] + _CenterColorPosition.Color.R) / (count + 1), 0), (int)Math.Round((RGB[1] + _CenterColorPosition.Color.G) / (count + 1), 0), (int)Math.Round((RGB[2] + +_CenterColorPosition.Color.B) / (count + 1), 0) };
- return Color.FromArgb(avgRGB[0], avgRGB[1], avgRGB[2]);
- }
- public Color getMedianColorByBlackAndWhite() {
- ColorPosition[] colorPositions = new ColorPosition[0];
- foreach (ColorPosition colorPosition in _NeighborColorPositions) {
- if (colorPosition.IsSet) {
- ColorPosition[] temp = new ColorPosition[colorPositions.Length + 1];
- colorPositions.CopyTo(temp, 0);
- temp[temp.Length - 1] = colorPosition;
- colorPositions = temp;
- }
- }
- ColorPosition[] temp2 = new ColorPosition[colorPositions.Length + 1];
- colorPositions.CopyTo(temp2, 0);
- temp2[temp2.Length - 1] = _CenterColorPosition;
- colorPositions = temp2;
- if (colorPositions.Length % 2 != 1) {
- return Color.Empty;
- }
- Array.Sort(colorPositions);
- return colorPositions[(colorPositions.Length - 1) / 2].Color;
- }
- public static Neighborhood getFromBitmapPosition(FastBitmap bitmap, NeighborhoodType type, int maxRadius, int x, int y) {
- Neighborhood neighborhood = new Neighborhood(type, maxRadius);
- int width = (maxRadius * 2) + 1;
- for (int yPos = -1 * maxRadius; yPos <= maxRadius; yPos++) {
- for (int xPos = -1 * maxRadius; xPos <= maxRadius; xPos++) {
- if (x + xPos > 0 && x + xPos < bitmap.Width && y + yPos > 0 && y + yPos < bitmap.Height) {
- Color color = bitmap.GetPixel(x + xPos, y + yPos);
- neighborhood.setColor(xPos, yPos, color);
- }
- }
- }
- return neighborhood;
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using ImageProcessingTool.Imaging;
- namespace ImageProcessingTool
- {
- class Log
- {
- private bool _Ready;
- private RichTextBox _TextBox;
- private ProgressBar _ProgressBar;
- private double _Progress;
- private DateTime _TimeLastOperationStart;
- private string _LastOperation;
- private FastBitmap _LastBitmap;
- public Log(RichTextBox textBox, ProgressBar progressBar) {
- _Ready = false;
- _TextBox = textBox;
- _ProgressBar = progressBar;
- _Progress = 0;
- _TimeLastOperationStart = DateTime.MinValue; // NULL-Wert
- _LastOperation = "Unbekannte Operation";
- _LastBitmap = null;
- }
- public enum LogMessageType
- {
- Info,
- Warnung,
- Fehler,
- Operation,
- Datei
- }
- private delegate void _Delegate_addLogMessage(LogMessageType type, string value);
- public void addLogMessage(LogMessageType type, string text) {
- if (_TextBox.InvokeRequired) {
- _TextBox.BeginInvoke(new _Delegate_addLogMessage(addLogMessage), new object[] { type, text });
- return;
- }
- _TextBox.AppendText(DateTime.Now.ToLongTimeString() + " [" + type.ToString() + "] " + text + "\n");
- _TextBox.ScrollToCaret();
- }
- private delegate void _Delegate_clearLog();
- public void clearLog() {
- if (_TextBox.InvokeRequired) {
- _TextBox.BeginInvoke(new _Delegate_clearLog(clearLog));
- return;
- }
- _TextBox.Clear();
- }
- private delegate void _Delegate_setProgress(double progress);
- public void setProgress(double progress) {
- if (_ProgressBar.InvokeRequired) {
- _ProgressBar.BeginInvoke(new _Delegate_setProgress(setProgress), new object[] { progress });
- return;
- }
- _Progress = progress;
- _ProgressBar.Value = (int)Math.Round(progress * 100, 0);
- }
- public void resetProgress() {
- setProgress(0);
- }
- public double getProgressDouble() {
- while (_Ready) ;
- return _Progress;
- }
- public int getProgressInt() {
- return (int)Math.Round(_Progress * 100, 0);
- }
- public void addLogMessage_OperationStart(string operation, FastBitmap bitmap) {
- _TimeLastOperationStart = DateTime.Now;
- _LastOperation = operation;
- _LastBitmap = bitmap;
- addLogMessage(Log.LogMessageType.Operation, operation + " | Berechnungen wurden gestartet. (" + bitmap.Width.ToString() + "x" + bitmap.Height.ToString() + " / " + (bitmap.Height * bitmap.Width).ToString() + " Pixel werden bearbeitet.)");
- }
- public void addLogMessage_OperationStop() {
- TimeSpan span = DateTime.Now - _TimeLastOperationStart;
- string time = (span.TotalMilliseconds != 0 ? span.ToString().Substring(0, 12) : "00:00:00.000");
- double ticks = Math.Round(span.Ticks / (double)(_LastBitmap.Height * _LastBitmap.Width), 3);
- addLogMessage(Log.LogMessageType.Operation, _LastOperation + " | Berechnungen wurden fertiggestellt. (Dauer: " + time + ", Ticks/Pixel: " + ticks.ToString() + ")");
- }
- public void addLogMessage_OperationAbort(bool error) {
- TimeSpan span = DateTime.Now - _TimeLastOperationStart;
- string time = (span.TotalMilliseconds != 0 ? span.ToString().Substring(0, 12) : "00:00:00.000");
- if (error) {
- addLogMessage(Log.LogMessageType.Operation, _LastOperation + " | Ein Fehler ist aufgetreten und die Berechnungen mussten abgebrochen werden. (Bisherige Dauer: " + time + ")");
- }
- else {
- addLogMessage(Log.LogMessageType.Operation, _LastOperation + " | Berechnungen wurden abgebrochen. (Bisherige Dauer: " + time + ")");
- }
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Drawing;
- using ImageProcessingTool.Imaging;
- using System.Threading;
- namespace ImageProcessingTool.ImageProcessing
- {
- class Operation
- {
- public const int THREADCOUNT = 6;
- protected static Thread[] _Threads;
- private static bool _Running;
- private static FastBitmap _Bitmap;
- private static Log _Log;
- public Operation() {
- _Threads = new Thread[0];
- _Running = false;
- _Bitmap = null;
- _Log = null;
- }
- protected delegate void _OperationDelegate(object threadIndex);
- protected static FastBitmap _doOperation(Log log, FastBitmap bitmap, int threadCount, _OperationDelegate operationDelegate) {
- if (!_Running) {
- _Running = true;
- _Bitmap = bitmap;
- _Log = log;
- _Threads = new Thread[threadCount];
- for (int i = 0; i < threadCount; i++) {
- _Threads[i] = new Thread(new ParameterizedThreadStart(operationDelegate));
- _Threads[i].IsBackground = true;
- _Threads[i].Priority = ThreadPriority.BelowNormal;
- _Threads[i].SetApartmentState(ApartmentState.MTA);
- _Threads[i].Start(i);
- }
- for (int i = 0; i < _Threads.Length; i++) {
- _Threads[i].Join();
- }
- _Running = false;
- return _Bitmap;
- }
- return null;
- }
- public static void stopAllOperations() {
- if (_Running) {
- _Running = false;
- for (int i = 0; i < _Threads.Length; i++) {
- _Threads[i].Abort();
- while (_Threads[i].ThreadState != ThreadState.Aborted) ;
- }
- }
- }
- protected static FastBitmap _getOperationBitmap() {
- return _Bitmap;
- }
- protected static Log _getOperationLog() {
- return _Log;
- }
- protected static int[] _getOffsetAndLength(int threadIndex) {
- int offset = (int)Math.Round(threadIndex * (double)_Bitmap.Height / (double)_Threads.Length, 0);
- int limit = (int)Math.Round((threadIndex + 1) * (double)_Bitmap.Height / (double)_Threads.Length, 0) - 1;
- return new int[] { offset, (limit - offset + 1) };
- }
- protected static bool _isRunning() {
- return _Running;
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Drawing;
- using ImageProcessingTool.Imaging;
- using System.Threading;
- namespace ImageProcessingTool.ImageProcessing.Filters
- {
- class PixelOperations : Operation
- {
- public static FastBitmap getInvertedBitmap(Log log, FastBitmap bitmap) {
- if (!_isRunning()) {
- FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _invertBitmap);
- return bmp;
- }
- return null;
- }
- private static void _invertBitmap(object threadIndex) {
- FastBitmap bitmap = _getOperationBitmap();
- int[] offlen = _getOffsetAndLength((int)threadIndex);
- for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
- for (int x = 0; x < bitmap.Width; x++) {
- Color color = bitmap.GetPixel(x, y);
- bitmap.SetPixel(x, y, getInvertedColor(color));
- }
- if ((int)threadIndex == 0) {
- _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
- }
- }
- }
- public static Color getInvertedColor(Color color) {
- return Color.FromArgb((int)(255 - color.R), (int)(255 - color.G), (int)(255 - color.B));
- }
- public static FastBitmap getBlackAndWhiteBitmap(Log log, FastBitmap bitmap) {
- if (!_isRunning()) {
- FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getBlackAndWhiteBitmap);
- return bmp;
- }
- return null;
- }
- private static void _getBlackAndWhiteBitmap(object threadIndex) {
- FastBitmap bitmap = _getOperationBitmap();
- int[] offlen = _getOffsetAndLength((int)threadIndex);
- for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
- for (int x = 0; x < bitmap.Width; x++) {
- Color color = bitmap.GetPixel(x, y);
- bitmap.SetPixel(x, y, getBlackAndWhiteColor(color));
- }
- if ((int)threadIndex == 0) {
- _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
- }
- }
- }
- public static Color getBlackAndWhiteColor(Color color) {
- int c = getBlackAndWhiteValue(color);
- return Color.FromArgb(c, c, c);
- }
- public static int getBlackAndWhiteValue(Color color) {
- return (int)Math.Round(((double)color.R + (double)color.G + (double)color.B) / 3, 0);
- }
- public static FastBitmap getHistogramOfBlackAndWhite(Log log, FastBitmap bitmap, int height) {
- int[] histogramm = new int[256];
- for (int y = 0; y < bitmap.Height; y++) {
- for (int x = 0; x < bitmap.Width; x++) {
- Color color = bitmap.GetPixel(x, y);
- histogramm[getBlackAndWhiteValue(color)] += 1;
- }
- log.setProgress((double)(y + 1) / bitmap.Height);
- }
- double factor = (double)height / (double)histogramm.Max();
- FastBitmap bmp = new FastBitmap(histogramm.Length, height);
- for (int i = 0; i < histogramm.Length; i++) {
- int length = (int)Math.Round(factor * (double)histogramm[i], 0);
- for (int ii = 0; ii < length; ii++) {
- bmp.SetPixel(i, (height - 1) - ii, Color.FromArgb(0, 0, 0));
- }
- }
- return bmp;
- }
- private static int _ThresholdMinimum;
- private static int _ThresholdMaximum;
- public static FastBitmap getThresholdBitmap(Log log, FastBitmap bitmap, int thresholdMinimum, int ThresholdMaximum) {
- if (!_isRunning()) {
- _ThresholdMinimum = thresholdMinimum;
- _ThresholdMaximum = ThresholdMaximum;
- FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getThresholdBitmap);
- return bmp;
- }
- return null;
- }
- private static void _getThresholdBitmap(object threadIndex) {
- FastBitmap bitmap = _getOperationBitmap();
- int[] offlen = _getOffsetAndLength((int)threadIndex);
- for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
- for (int x = 0; x < bitmap.Width; x++) {
- Color color = bitmap.GetPixel(x, y);
- int value = getBlackAndWhiteValue(color);
- if(value >= _ThresholdMinimum && value <= _ThresholdMaximum) {
- bitmap.SetPixel(x, y, Color.FromArgb(255, 255, 255));
- }
- else {
- bitmap.SetPixel(x, y, Color.FromArgb(0, 0, 0));
- }
- }
- if ((int)threadIndex == 0) {
- _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
- }
- }
- }
- }
- }using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Drawing;
- using ImageProcessingTool.Imaging;
- namespace ImageProcessingTool.ImageProcessing.Filters
- {
- class Smoothing : Operation
- {
- private static Neighborhood.NeighborhoodType _NeighborhoodType;
- private static int _NeighborhoodMaxRadius;
- public static FastBitmap getSmoothingByBoxFilterBitmap(Log log, FastBitmap bitmap, Neighborhood.NeighborhoodType neighborhoodType, int neighborhoodMaxRadius) {
- if (!_isRunning()) {
- _NeighborhoodType = neighborhoodType;
- _NeighborhoodMaxRadius = neighborhoodMaxRadius;
- FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getSmoothingByBoxFilterBitmap);
- return bmp;
- }
- return null;
- }
- private static void _getSmoothingByBoxFilterBitmap(object threadIndex) {
- FastBitmap bitmap = _getOperationBitmap();
- int[] offlen = _getOffsetAndLength((int)threadIndex);
- for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
- for (int x = 0; x < bitmap.Width; x++) {
- Neighborhood neighborhood = Neighborhood.getFromBitmapPosition(bitmap, _NeighborhoodType, _NeighborhoodMaxRadius, x, y);
- bitmap.SetPixel(x, y, neighborhood.getAverageColor());
- }
- if ((int)threadIndex == 0) {
- _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
- }
- }
- }
- public static FastBitmap getSmoothingByMedianBitmap(Log log, FastBitmap bitmap, Neighborhood.NeighborhoodType neighborhoodType, int neighborhoodMaxRadius) {
- if (!_isRunning()) {
- _NeighborhoodType = neighborhoodType;
- _NeighborhoodMaxRadius = neighborhoodMaxRadius;
- FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getSmoothingByMedianBitmap);
- return bmp;
- }
- return null;
- }
- private static void _getSmoothingByMedianBitmap(object threadIndex) {
- FastBitmap bitmap = _getOperationBitmap();
- int[] offlen = _getOffsetAndLength((int)threadIndex);
- for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
- for (int x = 0; x < bitmap.Width; x++) {
- Neighborhood neighborhood = Neighborhood.getFromBitmapPosition(bitmap, _NeighborhoodType, _NeighborhoodMaxRadius, x, y);
- bitmap.SetPixel(x, y, neighborhood.getMedianColorByBlackAndWhite());
- }
- if ((int)threadIndex == 0) {
- _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
- }
- }
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Threading;
- using ImageProcessingTool.ImageProcessing;
- using ImageProcessingTool.ImageProcessing.Filters;
- using ImageProcessingTool.Controls;
- using ImageProcessingTool.Imaging;
- namespace ImageProcessingTool
- {
- public partial class formMain : Form
- {
- private Log _Log;
- private ImageViewer _ImageViewer;
- private TreeNode _Operation;
- private Thread _OperationThread;
- bool _MouseOverImageViewer;
- Control _LastControlFocused;
- public formMain() {
- InitializeComponent();
- _Log = new Log(textConsole, progressOperation);
- _Log.clearLog();
- _LastControlFocused = this;
- _MouseOverImageViewer = false;
- _Operation = new TreeNode("");
- _ImageViewer = new ImageViewer(this, panImage);
- _ImageViewer.BitmapChanged += new EventHandler(_ImageViewer_BitmapChanged);
- _setupForm();
- _unloadImage();
- _refreshSettings();
- _setupOperationThread();
- _Log.addLogMessage(Log.LogMessageType.Info, "ImageProcessingTool wurde erfolgreich geladen. (Autor: Maximilian)");
- }
- private void _setupForm() {
- treeviewOperations.ExpandAll();
- panImage.MouseEnter += new EventHandler(panImage_MouseEnter);
- panImage.MouseLeave += new EventHandler(panImage_MouseLeave);
- this.MouseWheel += new MouseEventHandler(panImage_MouseWheel);
- }
- private void _ImageViewer_BitmapChanged(object sender, EventArgs e) {
- _refreshSettings();
- }
- private void formMain_FormClosing(object sender, FormClosingEventArgs e) {
- _stopOperationThread(StopOperationType.UserCancelled);
- }
- private void _setImageZoomFactor(double zoom) {
- zoom = (double)Math.Pow(2, zoom);
- _ImageViewer.ImageZoomFactor = zoom;
- labImageZoom.Text = "Zoom: " + Math.Round(zoom * 100, 0).ToString() + "%";
- }
- private delegate void _Delegate__changeImage(FastBitmap image, bool resetViewer);
- private void _changeImage(FastBitmap image, bool resetViewer) {
- if (_ImageViewer.InvokeRequired) {
- _ImageViewer.BeginInvoke(new _Delegate__changeImage(_changeImage), new object[] { image, resetViewer });
- return;
- }
- if (treeviewOperations.InvokeRequired) {
- treeviewOperations.BeginInvoke(new _Delegate__changeImage(_changeImage), new object[] { image, resetViewer });
- return;
- }
- _ImageViewer.Bitmap = image;
- if (image == null) {
- trackImageZoom.Enabled = false;
- _MouseOverImageViewer = false;
- _focusLastControl();
- _Operation = new TreeNode("");
- treeviewOperations.Enabled = false;
- menuitemFileSaveAs.Enabled = false;
- }
- else {
- trackImageZoom.Enabled = true;
- treeviewOperations.Enabled = true;
- menuitemFileSaveAs.Enabled = true;
- }
- if (resetViewer) {
- _ImageViewer.resetImagePosition();
- _ImageViewer.resetZoom();
- trackImageZoom.Value = 30;
- }
- }
- private void _unloadImage() {
- _changeImage(null, true);
- }
- private void _refreshSettings() {
- foreach (Panel pan in panSettings.Controls) {
- pan.Hide();
- }
- btnSettingsExecute.Hide();
- labSettingsTitle.Text = (_Operation.Name == "" ? "" : _Operation.FullPath.Replace(@"\", " > ").Replace("node", ""));
- if (_Operation.Name.Length > 4) {
- if (_Operation.Nodes.Count == 0) {
- Control[] pans = (Control[])panSettings.Controls.Find("panSettings_" + _Operation.Name.Substring(4), false);
- if (pans.Length > 0) {
- pans[0].Show();
- }
- // Spezielle Panels
- if (_Operation.Name == "nodeDebug") {
- btnSettingsExecute.Hide();
- }
- if (_Operation.Name.Substring(4) == "LocalOperationsSmoothingMedian") {
- panSettings_LocalOperationsSmoothing.Show();
- }
- else if (_Operation.Name.Substring(4) == "LocalOperationsSmoothingBoxFilter") {
- panSettings_LocalOperationsSmoothing.Show();
- }
- btnSettingsExecute.Show();
- // Vorschauberechnungen
- if (_Operation.Name.Substring(4) == "PixelOperationsHistogram") {
- _startOperationThread(treeviewOperations.Nodes.Find("nodePixelOperationsHistogram", true)[0]);
- btnSettingsExecute.Hide();
- }
- else if (_Operation.Name.Substring(4) == "PixelOperationsThreshold") {
- _startOperationThread(treeviewOperations.Nodes.Find("nodePixelOperationsHistogram", true)[0]);
- }
- }
- }
- }
- private void _focusLastControl() {
- if (_LastControlFocused != null) {
- _LastControlFocused.Focus();
- }
- }
- private void _openFile() {
- string path = "";
- OpenFileDialog openFileDialog = new OpenFileDialog();
- openFileDialog.RestoreDirectory = true;
- openFileDialog.Filter = "Bitmapdateien|*.bmp;*.dib|JPEG|*.jpg;*.jpeg;*.jpe;*jfif|GIF|*.gif|TIFF|*.tif;*.tiff|PNG|*.png|ICO|*.ico|Alle Bilddateien|*.bmp;*.dib;*.jpg;*.jpeg;*.jpe;*jfif;*.gif;*.tif;*.tiff;*.png;*.ico|Alle Dateien|*.*";
- openFileDialog.FilterIndex = 7;
- if (openFileDialog.ShowDialog() == DialogResult.OK) {
- path = openFileDialog.FileName;
- try {
- FastBitmap bmp = new FastBitmap(new Bitmap(path));
- _changeImage(bmp, true);
- _Log.addLogMessage(Log.LogMessageType.Datei, "Die Bilddatei '" + path + "' wurde geladen. (Format: " + bmp.ToBitmap().PixelFormat.ToString() + ")");
- }
- catch {
- _unloadImage();
- MessageBox.Show("Die ausgewählte Datei konnte nicht geladen werden. Sie ist evtl. beschädigt oder hat das falsche Dateiformat.", "Fehler: Ungültige Datei", MessageBoxButtons.OK, MessageBoxIcon.Error);
- trackImageZoom.Enabled = false;
- }
- }
- }
- private void _saveAsFile() {
- string path = "";
- FastBitmap bmp = _ImageViewer.Bitmap;
- SaveFileDialog saveFileDialog = new SaveFileDialog();
- saveFileDialog.RestoreDirectory = true;
- saveFileDialog.DefaultExt = ".jpg";
- saveFileDialog.AddExtension = true;
- saveFileDialog.Filter = "Bitmapdateien|*.bmp;*.dib|JPEG|*.jpg;*.jpeg;*.jpe;*jfif|GIF|*.gif|TIFF|*.tif;*.tiff|PNG|*.png|ICO|*.ico";
- saveFileDialog.FileName = "Unbenannt.jpg";
- saveFileDialog.FilterIndex = 2;
- if (saveFileDialog.ShowDialog() == DialogResult.OK) {
- path = saveFileDialog.FileName;
- try {
- string[] pathElements = path.Split('\\');
- string pathElementsLast = pathElements[pathElements.Length - 1];
- pathElements = pathElementsLast.Split('.');
- pathElementsLast = pathElements[pathElements.Length - 1];
- System.Drawing.Imaging.ImageFormat format = null;
- if (pathElementsLast == "bmp" | pathElementsLast == "dib") {
- format = System.Drawing.Imaging.ImageFormat.Bmp;
- }
- else if (pathElementsLast == "jpg" | pathElementsLast == "jpeg" | pathElementsLast == "jpe" | pathElementsLast == "jfif") {
- format = System.Drawing.Imaging.ImageFormat.Jpeg;
- }
- else if (pathElementsLast == "gif") {
- format = System.Drawing.Imaging.ImageFormat.Gif;
- }
- else if (pathElementsLast == "tif" | pathElementsLast == "tiff") {
- format = System.Drawing.Imaging.ImageFormat.Tiff;
- }
- else if (pathElementsLast == "png") {
- format = System.Drawing.Imaging.ImageFormat.Png;
- }
- else if (pathElementsLast == "ico") {
- format = System.Drawing.Imaging.ImageFormat.Icon;
- }
- bmp.ToBitmap().Save(path, format);
- _Log.addLogMessage(Log.LogMessageType.Datei, "Das Bild wurde unter '" + path + "' gespeichert. (Format: " + format.ToString() + ")");
- }
- catch {
- MessageBox.Show("Ein Fehler ist aufgetreten. Das Bild konnte nicht gespeichert werden.", "Fehler: Ungültiger Speichervorgang", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- }
- private void _executeOperation(object operation) {
- try {
- string op = ((TreeNode)operation).Name.Substring(4);
- if (op == "PixelOperationsColorInversion") {
- _changeImage(PixelOperations.getInvertedBitmap(_Log, _ImageViewer.Bitmap), false);
- }
- else if (op == "PixelOperationsColorToBlackAndWhite") {
- _changeImage(PixelOperations.getBlackAndWhiteBitmap(_Log, _ImageViewer.Bitmap), false);
- }
- else if (op == "LocalOperationsSmoothingBoxFilter") {
- Neighborhood.NeighborhoodType type = (radiobtnSettings_LocalOperationsSmoothingMedian1.Checked ? Neighborhood.NeighborhoodType.Rhombus : Neighborhood.NeighborhoodType.Square);
- _changeImage(Smoothing.getSmoothingByBoxFilterBitmap(_Log, _ImageViewer.Bitmap, type, (int)numSettings_LocalOperationsSmoothing0.Value), false);
- }
- else if (op == "LocalOperationsSmoothingMedian") {
- Neighborhood.NeighborhoodType type = (radiobtnSettings_LocalOperationsSmoothingMedian1.Checked ? Neighborhood.NeighborhoodType.Rhombus : Neighborhood.NeighborhoodType.Square);
- _changeImage(Smoothing.getSmoothingByMedianBitmap(_Log, _ImageViewer.Bitmap, type, (int)numSettings_LocalOperationsSmoothing0.Value), false);
- }
- else if (op == "PixelOperationsThreshold") {
- _changeImage(PixelOperations.getThresholdBitmap(_Log, _ImageViewer.Bitmap, (int)numSettings_PixelOperationsThreshold0.Value, (int)numSettings_PixelOperationsThreshold1.Value), false);
- }
- else if (op == "nodePixelOperationsHistogram") {
- picSettings_PixelOperationsThreshold0.BackgroundImage = PixelOperations.getHistogramOfBlackAndWhite(_Log, _ImageViewer.Bitmap, picSettings_PixelOperationsHistogram0.Height).ToBitmap();
- }
- }
- catch {
- if (_OperationThread.ThreadState != ThreadState.AbortRequested) {
- _stopOperationThread(StopOperationType.Error);
- }
- }
- if (_OperationThread.ThreadState != ThreadState.AbortRequested) {
- _stopOperationThread(StopOperationType.OperationFinished);
- }
- }
- private void _startOperationThread(TreeNode operation) {
- if (!_OperationThread.IsAlive) {
- _Log.resetProgress();
- _Log.addLogMessage_OperationStart(_Operation.Text, _ImageViewer.Bitmap);
- _setOperationUI(true);
- _setupOperationThread();
- _OperationThread.Start(operation);
- }
- }
- private enum StopOperationType
- {
- Error,
- UserCancelled,
- OperationFinished
- }
- private void _setupOperationThread() {
- _OperationThread = new Thread(new ParameterizedThreadStart(_executeOperation));
- _OperationThread.IsBackground = true;
- _OperationThread.Priority = ThreadPriority.BelowNormal;
- _OperationThread.SetApartmentState(ApartmentState.MTA);
- }
- private void _stopOperationThread(StopOperationType type) {
- Thread thread = new Thread(new ParameterizedThreadStart(__stopOperationThread));
- thread.IsBackground = true;
- thread.Priority = ThreadPriority.BelowNormal;
- thread.SetApartmentState(ApartmentState.MTA);
- thread.Start(type);
- _OperationThread.Abort();
- }
- private delegate void _Delegate___stopOperationThread(object operationRunning);
- private void __stopOperationThread(object type) {
- if (btnSettingsExecute.InvokeRequired) {
- btnSettingsExecute.BeginInvoke(new _Delegate___stopOperationThread(__stopOperationThread), type);
- return;
- }
- btnSettingsExecute.Enabled = false;
- switch ((StopOperationType)type) {
- case StopOperationType.Error:
- _Log.addLogMessage_OperationAbort(true);
- break;
- case StopOperationType.UserCancelled:
- _Log.addLogMessage_OperationAbort(false);
- break;
- case StopOperationType.OperationFinished:
- _Log.addLogMessage_OperationStop();
- break;
- default:
- break;
- }
- Operation.stopAllOperations();
- _Log.resetProgress();
- _setOperationUI(false);
- }
- private delegate void _Delegate__setOperationUI(bool operationRunning);
- private void _setOperationUI(bool operationRunning) {
- // Wechseln zu Mainthread anhand des Buttons
- if (btnSettingsExecute.InvokeRequired) {
- btnSettingsExecute.BeginInvoke(new _Delegate__setOperationUI(_setOperationUI), operationRunning);
- return;
- }
- btnSettingsExecute.Enabled = true;
- btnSettingsExecute.Text = (operationRunning ? "Operation abbrechen" : "Operation ausführen");
- treeviewOperations.Enabled = !operationRunning;
- menuitemFileSaveAs.Enabled = !operationRunning;
- }
- private void trackImageZoom_Scroll(object sender, EventArgs e) {
- _setImageZoomFactor(((double)((AdvancedTrackBar)sender).Value - 30) / 10);
- }
- private void menuitemFileOpen_Click(object sender, EventArgs e) {
- _openFile();
- }
- private void menuitemFileSaveAs_Click(object sender, EventArgs e) {
- _saveAsFile();
- }
- private void menuitemHelpInfo_Click(object sender, EventArgs e) {
- MessageBox.Show("ImageProcessingTool - Copyright © 2011 Maximilian");
- }
- private void panImage_MouseEnter(object sender, EventArgs e) {
- if (!_ImageViewer.IsEmpty) {
- _MouseOverImageViewer = true;
- _LastControlFocused = this.ActiveControl;
- panImage.Focus();
- }
- }
- private void panImage_MouseLeave(object sender, EventArgs e) {
- _MouseOverImageViewer = false;
- _focusLastControl();
- }
- private void panImage_MouseWheel(object sender, MouseEventArgs e) {
- if (_MouseOverImageViewer && !_ImageViewer.IsEmpty) {
- int scroll = trackImageZoom.Value + (e.Delta / 120) * trackImageZoom.SmallChange;
- scroll = (scroll < trackImageZoom.Minimum ? trackImageZoom.Minimum : scroll);
- scroll = (scroll > trackImageZoom.Maximum ? trackImageZoom.Maximum : scroll);
- trackImageZoom.Value = scroll;
- _setImageZoomFactor(((double)scroll - 30) / 10);
- }
- }
- private void treeviewOperations_AfterSelect(object sender, TreeViewEventArgs e) {
- _Operation = e.Node;
- _refreshSettings();
- }
- private void btnSettingsExecute_Click(object sender, EventArgs e) {
- if (_OperationThread.IsAlive) {
- _stopOperationThread(StopOperationType.UserCancelled);
- }
- else {
- _startOperationThread(_Operation);
- }
- }
- private void formMain_KeyDown(object sender, KeyEventArgs e) {
- switch (e.KeyCode) {
- case Keys.A:
- break;
- case Keys.Add:
- break;
- case Keys.Alt:
- break;
- case Keys.Apps:
- break;
- case Keys.Attn:
- break;
- case Keys.B:
- break;
- case Keys.Back:
- break;
- case Keys.BrowserBack:
- break;
- case Keys.BrowserFavorites:
- break;
- case Keys.BrowserForward:
- break;
- case Keys.BrowserHome:
- break;
- case Keys.BrowserRefresh:
- break;
- case Keys.BrowserSearch:
- break;
- case Keys.BrowserStop:
- break;
- case Keys.C:
- break;
- case Keys.Cancel:
- break;
- case Keys.Capital:
- break;
- case Keys.Clear:
- break;
- case Keys.Control:
- break;
- case Keys.ControlKey:
- break;
- case Keys.Crsel:
- break;
- case Keys.D:
- break;
- case Keys.D0:
- break;
- case Keys.D1:
- break;
- case Keys.D2:
- break;
- case Keys.D3:
- break;
- case Keys.D4:
- break;
- case Keys.D5:
- break;
- case Keys.D6:
- break;
- case Keys.D7:
- break;
- case Keys.D8:
- break;
- case Keys.D9:
- break;
- case Keys.Decimal:
- break;
- case Keys.Delete:
- break;
- case Keys.Divide:
- break;
- case Keys.Down:
- break;
- case Keys.E:
- break;
- case Keys.End:
- break;
- case Keys.Enter:
- break;
- case Keys.EraseEof:
- break;
- case Keys.Escape:
- break;
- case Keys.Execute:
- break;
- case Keys.Exsel:
- break;
- case Keys.F:
- break;
- case Keys.F1:
- break;
- case Keys.F10:
- break;
- case Keys.F11:
- break;
- case Keys.F12:
- break;
- case Keys.F13:
- break;
- case Keys.F14:
- break;
- case Keys.F15:
- break;
- case Keys.F16:
- break;
- case Keys.F17:
- break;
- case Keys.F18:
- break;
- case Keys.F19:
- break;
- case Keys.F2:
- break;
- case Keys.F20:
- break;
- case Keys.F21:
- break;
- case Keys.F22:
- break;
- case Keys.F23:
- break;
- case Keys.F24:
- break;
- case Keys.F3:
- break;
- case Keys.F4:
- break;
- case Keys.F5:
- break;
- case Keys.F6:
- break;
- case Keys.F7:
- break;
- case Keys.F8:
- break;
- case Keys.F9:
- break;
- case Keys.FinalMode:
- break;
- case Keys.G:
- break;
- case Keys.H:
- break;
- case Keys.HanguelMode:
- break;
- case Keys.HanjaMode:
- break;
- case Keys.Help:
- break;
- case Keys.Home:
- break;
- case Keys.I:
- break;
- case Keys.IMEAccept:
- break;
- case Keys.IMEConvert:
- break;
- case Keys.IMEModeChange:
- break;
- case Keys.IMENonconvert:
- break;
- case Keys.Insert:
- break;
- case Keys.J:
- break;
- case Keys.JunjaMode:
- break;
- case Keys.K:
- break;
- case Keys.KeyCode:
- break;
- case Keys.L:
- break;
- case Keys.LButton:
- break;
- case Keys.LControlKey:
- break;
- case Keys.LMenu:
- break;
- case Keys.LShiftKey:
- break;
- case Keys.LWin:
- break;
- case Keys.LaunchApplication1:
- break;
- case Keys.LaunchApplication2:
- break;
- case Keys.LaunchMail:
- break;
- case Keys.Left:
- break;
- case Keys.LineFeed:
- break;
- case Keys.M:
- break;
- case Keys.MButton:
- break;
- case Keys.MediaNextTrack:
- break;
- case Keys.MediaPlayPause:
- break;
- case Keys.MediaPreviousTrack:
- break;
- case Keys.MediaStop:
- break;
- case Keys.Menu:
- break;
- case Keys.Modifiers:
- break;
- case Keys.Multiply:
- break;
- case Keys.N:
- break;
- case Keys.Next:
- break;
- case Keys.NoName:
- break;
- case Keys.None:
- break;
- case Keys.NumLock:
- break;
- case Keys.NumPad0:
- break;
- case Keys.NumPad1:
- break;
- case Keys.NumPad2:
- break;
- case Keys.NumPad3:
- break;
- case Keys.NumPad4:
- break;
- case Keys.NumPad5:
- break;
- case Keys.NumPad6:
- break;
- case Keys.NumPad7:
- break;
- case Keys.NumPad8:
- break;
- case Keys.NumPad9:
- break;
- case Keys.O:
- if (e.Control) {
- if (menuitemFileOpen.Enabled) {
- _openFile();
- }
- }
- break;
- case Keys.Oem1:
- break;
- case Keys.Oem102:
- break;
- case Keys.Oem2:
- break;
- case Keys.Oem3:
- break;
- case Keys.Oem4:
- break;
- case Keys.Oem5:
- break;
- case Keys.Oem6:
- break;
- case Keys.Oem7:
- break;
- case Keys.Oem8:
- break;
- case Keys.OemClear:
- break;
- case Keys.OemMinus:
- break;
- case Keys.OemPeriod:
- break;
- case Keys.Oemcomma:
- break;
- case Keys.Oemplus:
- break;
- case Keys.P:
- break;
- case Keys.Pa1:
- break;
- case Keys.Packet:
- break;
- case Keys.PageUp:
- break;
- case Keys.Pause:
- break;
- case Keys.Play:
- break;
- case Keys.Print:
- break;
- case Keys.PrintScreen:
- break;
- case Keys.ProcessKey:
- break;
- case Keys.Q:
- break;
- case Keys.R:
- break;
- case Keys.RButton:
- break;
- case Keys.RControlKey:
- break;
- case Keys.RMenu:
- break;
- case Keys.RShiftKey:
- break;
- case Keys.RWin:
- break;
- case Keys.Right:
- break;
- case Keys.S:
- if (e.Control) {
- if (menuitemFileSaveAs.Enabled) {
- _saveAsFile();
- }
- }
- break;
- case Keys.Scroll:
- break;
- case Keys.Select:
- break;
- case Keys.SelectMedia:
- break;
- case Keys.Separator:
- break;
- case Keys.Shift:
- break;
- case Keys.ShiftKey:
- break;
- case Keys.Sleep:
- break;
- case Keys.Space:
- break;
- case Keys.Subtract:
- break;
- case Keys.T:
- break;
- case Keys.Tab:
- break;
- case Keys.U:
- break;
- case Keys.Up:
- break;
- case Keys.V:
- break;
- case Keys.VolumeDown:
- break;
- case Keys.VolumeMute:
- break;
- case Keys.VolumeUp:
- break;
- case Keys.W:
- break;
- case Keys.X:
- break;
- case Keys.XButton1:
- break;
- case Keys.XButton2:
- break;
- case Keys.Y:
- break;
- case Keys.Z:
- break;
- case Keys.Zoom:
- break;
- default:
- break;
- }
- }
- // Settings
- private void picSettings_LocalOperationsSmoothing_Click(object sender, EventArgs e) {
- string name = ((Control)sender).Name;
- RadioButton[] radiobuttons = new RadioButton[] { radiobtnSettings_LocalOperationsSmoothingMedian0, radiobtnSettings_LocalOperationsSmoothingMedian1 };
- radiobuttons[int.Parse(name.Substring(name.Length - 1, 1))].Checked = true;
- }
- private void numSettings_PixelOperationsThreshold_ValueChanged(object sender, EventArgs e) {
- picSettings_PixelOperationsThreshold0.Invalidate(false);
- }
- private void picSettings_PixelOperationsThreshold_Paint(object sender, PaintEventArgs e) {
- Graphics g = e.Graphics;
- RectangleF rect = new RectangleF((float)(((double)picSettings_PixelOperationsThreshold0.BackgroundImage.Width / 256) * (double)numSettings_PixelOperationsThreshold0.Value), 0, (float)(((double)picSettings_PixelOperationsThreshold0.BackgroundImage.Width / 256) * (double)(numSettings_PixelOperationsThreshold1.Value - numSettings_PixelOperationsThreshold0.Value)), picSettings_PixelOperationsThreshold0.BackgroundImage.Height);
- g.FillRectangle(new Pen(Color.FromArgb(127, 127, 127, 127)).Brush, Rectangle.Round(rect));
- }
- }
- }
Add Comment
Please, Sign In to add comment