Guest User

Untitled

a guest
Jan 23rd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 101.45 KB | None | 0 0
  1. using ImageProcessingTool.Controls;
  2.  
  3. namespace ImageProcessingTool
  4. {
  5. partial class formMain
  6. {
  7. /// <summary>
  8. /// Erforderliche Designervariable.
  9. /// </summary>
  10. private System.ComponentModel.IContainer components = null;
  11.  
  12. /// <summary>
  13. /// Verwendete Ressourcen bereinigen.
  14. /// </summary>
  15. /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
  16. protected override void Dispose(bool disposing) {
  17. if (disposing && (components != null)) {
  18. components.Dispose();
  19. }
  20. base.Dispose(disposing);
  21. }
  22.  
  23. #region Vom Windows Form-Designer generierter Code
  24.  
  25. /// <summary>
  26. /// Erforderliche Methode für die Designerunterstützung.
  27. /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
  28. /// </summary>
  29. private void InitializeComponent() {
  30. System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(formMain));
  31. System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("[Debug]");
  32. System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("Farben invertieren");
  33. System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("Farben entfernen");
  34. System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("Histogramm anzeigen");
  35. System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("Schwellenwert");
  36. System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("Punktoperatoren", new System.Windows.Forms.TreeNode[] {
  37. treeNode12,
  38. treeNode13,
  39. treeNode14,
  40. treeNode15});
  41. System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("Mittelwert/Box-Filter");
  42. System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("Median-Filter");
  43. System.Windows.Forms.TreeNode treeNode19 = new System.Windows.Forms.TreeNode("Glättung", new System.Windows.Forms.TreeNode[] {
  44. treeNode17,
  45. treeNode18});
  46. System.Windows.Forms.TreeNode treeNode20 = new System.Windows.Forms.TreeNode("Lokale Operatoren", new System.Windows.Forms.TreeNode[] {
  47. treeNode19});
  48. this.menuMain = new System.Windows.Forms.MenuStrip();
  49. this.manuitemFile = new System.Windows.Forms.ToolStripMenuItem();
  50. this.menuitemFileOpen = new System.Windows.Forms.ToolStripMenuItem();
  51. this.menuitemFileSaveAs = new System.Windows.Forms.ToolStripMenuItem();
  52. this.menuitemHelp = new System.Windows.Forms.ToolStripMenuItem();
  53. this.menuitemHelpInfo = new System.Windows.Forms.ToolStripMenuItem();
  54. this.layoutMain = new ImageProcessingTool.Controls.AdvancedTableLayoutPanel();
  55. this.panConsole = new ImageProcessingTool.AdvancedPanel();
  56. this.textConsole = new System.Windows.Forms.RichTextBox();
  57. this.layoutSettings = new System.Windows.Forms.TableLayoutPanel();
  58. this.panSettings = new ImageProcessingTool.AdvancedPanel();
  59. this.panSettings_PixelOperationsThreshold = new System.Windows.Forms.Panel();
  60. this.numSettings_PixelOperationsThreshold1 = new System.Windows.Forms.NumericUpDown();
  61. this.numSettings_PixelOperationsThreshold0 = new System.Windows.Forms.NumericUpDown();
  62. this.labText_LocalOperationsThreshold1 = new System.Windows.Forms.Label();
  63. this.labText_LocalOperationsThreshold0 = new System.Windows.Forms.Label();
  64. this.picSettings_PixelOperationsThreshold0 = new System.Windows.Forms.PictureBox();
  65. this.picSettings_PixelOperationsThreshold1 = new System.Windows.Forms.PictureBox();
  66. this.panSettings_PixelOperationsHistogram = new System.Windows.Forms.Panel();
  67. this.picSettings_PixelOperationsHistogram1 = new System.Windows.Forms.PictureBox();
  68. this.picSettings_PixelOperationsHistogram0 = new System.Windows.Forms.PictureBox();
  69. this.panSettings_LocalOperationsSmoothing = new System.Windows.Forms.Panel();
  70. this.numSettings_LocalOperationsSmoothing0 = new System.Windows.Forms.NumericUpDown();
  71. this.picSettings_LocalOperationsSmoothing1 = new System.Windows.Forms.PictureBox();
  72. this.picSettings_LocalOperationsSmoothing0 = new System.Windows.Forms.PictureBox();
  73. this.radiobtnSettings_LocalOperationsSmoothingMedian1 = new System.Windows.Forms.RadioButton();
  74. this.labText_LocalOperationsSmoothing2 = new System.Windows.Forms.Label();
  75. this.labText_LocalOperationsSmoothing0 = new System.Windows.Forms.Label();
  76. this.radiobtnSettings_LocalOperationsSmoothingMedian0 = new System.Windows.Forms.RadioButton();
  77. this.panSettings_Debug = new System.Windows.Forms.Panel();
  78. this.DEBUGlabel4 = new System.Windows.Forms.Label();
  79. this.DEBUGlabel3 = new System.Windows.Forms.Label();
  80. this.DEBUGlabel2 = new System.Windows.Forms.Label();
  81. this.DEBUGlabel1 = new System.Windows.Forms.Label();
  82. this.panSettingsExecutionButton = new System.Windows.Forms.Panel();
  83. this.btnSettingsExecute = new System.Windows.Forms.Button();
  84. this.panSettingsTitle = new System.Windows.Forms.Panel();
  85. this.labSettingsTitle = new System.Windows.Forms.Label();
  86. this.layoutImage = new ImageProcessingTool.Controls.AdvancedTableLayoutPanel();
  87. this.panImage = new ImageProcessingTool.AdvancedPanel();
  88. this.layoutImageZoom = new System.Windows.Forms.TableLayoutPanel();
  89. this.trackImageZoom = new ImageProcessingTool.Controls.AdvancedTrackBar();
  90. this.labImageZoom = new System.Windows.Forms.Label();
  91. this.treeviewOperations = new System.Windows.Forms.TreeView();
  92. this.progressOperation = new System.Windows.Forms.ProgressBar();
  93. this.menuMain.SuspendLayout();
  94. this.layoutMain.SuspendLayout();
  95. this.panConsole.SuspendLayout();
  96. this.layoutSettings.SuspendLayout();
  97. this.panSettings.SuspendLayout();
  98. this.panSettings_PixelOperationsThreshold.SuspendLayout();
  99. ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold1)).BeginInit();
  100. ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold0)).BeginInit();
  101. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold0)).BeginInit();
  102. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold1)).BeginInit();
  103. this.panSettings_PixelOperationsHistogram.SuspendLayout();
  104. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram1)).BeginInit();
  105. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram0)).BeginInit();
  106. this.panSettings_LocalOperationsSmoothing.SuspendLayout();
  107. ((System.ComponentModel.ISupportInitialize)(this.numSettings_LocalOperationsSmoothing0)).BeginInit();
  108. ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing1)).BeginInit();
  109. ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing0)).BeginInit();
  110. this.panSettings_Debug.SuspendLayout();
  111. this.panSettingsExecutionButton.SuspendLayout();
  112. this.panSettingsTitle.SuspendLayout();
  113. this.layoutImage.SuspendLayout();
  114. this.layoutImageZoom.SuspendLayout();
  115. ((System.ComponentModel.ISupportInitialize)(this.trackImageZoom)).BeginInit();
  116. this.SuspendLayout();
  117. //
  118. // menuMain
  119. //
  120. this.menuMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
  121. this.manuitemFile,
  122. this.menuitemHelp});
  123. this.menuMain.Location = new System.Drawing.Point(0, 0);
  124. this.menuMain.Name = "menuMain";
  125. this.menuMain.Size = new System.Drawing.Size(784, 24);
  126. this.menuMain.TabIndex = 1;
  127. this.menuMain.Text = "Menü";
  128. //
  129. // manuitemFile
  130. //
  131. this.manuitemFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
  132. this.menuitemFileOpen,
  133. this.menuitemFileSaveAs});
  134. this.manuitemFile.Name = "manuitemFile";
  135. this.manuitemFile.Size = new System.Drawing.Size(46, 20);
  136. this.manuitemFile.Text = "Datei";
  137. //
  138. // menuitemFileOpen
  139. //
  140. this.menuitemFileOpen.Name = "menuitemFileOpen";
  141. this.menuitemFileOpen.ShortcutKeyDisplayString = "Strg+O";
  142. this.menuitemFileOpen.Size = new System.Drawing.Size(208, 22);
  143. this.menuitemFileOpen.Text = "Öffnen";
  144. this.menuitemFileOpen.Click += new System.EventHandler(this.menuitemFileOpen_Click);
  145. //
  146. // menuitemFileSaveAs
  147. //
  148. this.menuitemFileSaveAs.Name = "menuitemFileSaveAs";
  149. this.menuitemFileSaveAs.ShortcutKeyDisplayString = "Strg+S";
  150. this.menuitemFileSaveAs.Size = new System.Drawing.Size(208, 22);
  151. this.menuitemFileSaveAs.Text = "Speichern unter...";
  152. this.menuitemFileSaveAs.Click += new System.EventHandler(this.menuitemFileSaveAs_Click);
  153. //
  154. // menuitemHelp
  155. //
  156. this.menuitemHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
  157. this.menuitemHelpInfo});
  158. this.menuitemHelp.Name = "menuitemHelp";
  159. this.menuitemHelp.Size = new System.Drawing.Size(44, 20);
  160. this.menuitemHelp.Text = "Hilfe";
  161. //
  162. // menuitemHelpInfo
  163. //
  164. this.menuitemHelpInfo.Name = "menuitemHelpInfo";
  165. this.menuitemHelpInfo.Size = new System.Drawing.Size(239, 22);
  166. this.menuitemHelpInfo.Text = "Info über ImageProcessionTool";
  167. this.menuitemHelpInfo.Click += new System.EventHandler(this.menuitemHelpInfo_Click);
  168. //
  169. // layoutMain
  170. //
  171. this.layoutMain.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
  172. this.layoutMain.ColumnCount = 3;
  173. this.layoutMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 200F));
  174. this.layoutMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
  175. this.layoutMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 265F));
  176. this.layoutMain.Controls.Add(this.panConsole, 1, 1);
  177. this.layoutMain.Controls.Add(this.layoutSettings, 2, 0);
  178. this.layoutMain.Controls.Add(this.layoutImage, 1, 0);
  179. this.layoutMain.Controls.Add(this.treeviewOperations, 0, 0);
  180. this.layoutMain.Controls.Add(this.progressOperation, 0, 2);
  181. this.layoutMain.Dock = System.Windows.Forms.DockStyle.Fill;
  182. this.layoutMain.Location = new System.Drawing.Point(0, 24);
  183. this.layoutMain.Name = "layoutMain";
  184. this.layoutMain.RowCount = 3;
  185. this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
  186. this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 150F));
  187. this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
  188. this.layoutMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
  189. this.layoutMain.Size = new System.Drawing.Size(784, 538);
  190. this.layoutMain.TabIndex = 0;
  191. //
  192. // panConsole
  193. //
  194. this.panConsole.Controls.Add(this.textConsole);
  195. this.panConsole.Dock = System.Windows.Forms.DockStyle.Fill;
  196. this.panConsole.Location = new System.Drawing.Point(202, 366);
  197. this.panConsole.Margin = new System.Windows.Forms.Padding(0);
  198. this.panConsole.Name = "panConsole";
  199. this.panConsole.Padding = new System.Windows.Forms.Padding(5);
  200. this.panConsole.Size = new System.Drawing.Size(315, 150);
  201. this.panConsole.TabIndex = 1;
  202. //
  203. // textConsole
  204. //
  205. this.textConsole.BackColor = System.Drawing.SystemColors.ControlLightLight;
  206. this.textConsole.BorderStyle = System.Windows.Forms.BorderStyle.None;
  207. this.textConsole.Dock = System.Windows.Forms.DockStyle.Fill;
  208. this.textConsole.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  209. this.textConsole.Location = new System.Drawing.Point(5, 5);
  210. this.textConsole.Name = "textConsole";
  211. this.textConsole.ReadOnly = true;
  212. this.textConsole.Size = new System.Drawing.Size(305, 140);
  213. this.textConsole.TabIndex = 0;
  214. this.textConsole.Text = "";
  215. this.textConsole.WordWrap = false;
  216. //
  217. // layoutSettings
  218. //
  219. this.layoutSettings.ColumnCount = 1;
  220. this.layoutSettings.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
  221. this.layoutSettings.Controls.Add(this.panSettings, 0, 1);
  222. this.layoutSettings.Controls.Add(this.panSettingsExecutionButton, 0, 2);
  223. this.layoutSettings.Controls.Add(this.panSettingsTitle, 0, 0);
  224. this.layoutSettings.Dock = System.Windows.Forms.DockStyle.Fill;
  225. this.layoutSettings.Location = new System.Drawing.Point(518, 1);
  226. this.layoutSettings.Margin = new System.Windows.Forms.Padding(0);
  227. this.layoutSettings.Name = "layoutSettings";
  228. this.layoutSettings.RowCount = 3;
  229. this.layoutMain.SetRowSpan(this.layoutSettings, 2);
  230. this.layoutSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
  231. this.layoutSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
  232. this.layoutSettings.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
  233. this.layoutSettings.Size = new System.Drawing.Size(265, 515);
  234. this.layoutSettings.TabIndex = 0;
  235. //
  236. // panSettings
  237. //
  238. this.panSettings.Controls.Add(this.panSettings_PixelOperationsThreshold);
  239. this.panSettings.Controls.Add(this.panSettings_PixelOperationsHistogram);
  240. this.panSettings.Controls.Add(this.panSettings_LocalOperationsSmoothing);
  241. this.panSettings.Controls.Add(this.panSettings_Debug);
  242. this.panSettings.Dock = System.Windows.Forms.DockStyle.Fill;
  243. this.panSettings.Location = new System.Drawing.Point(0, 40);
  244. this.panSettings.Margin = new System.Windows.Forms.Padding(0);
  245. this.panSettings.Name = "panSettings";
  246. this.panSettings.Size = new System.Drawing.Size(265, 435);
  247. this.panSettings.TabIndex = 2;
  248. //
  249. // panSettings_PixelOperationsThreshold
  250. //
  251. this.panSettings_PixelOperationsThreshold.Controls.Add(this.numSettings_PixelOperationsThreshold1);
  252. this.panSettings_PixelOperationsThreshold.Controls.Add(this.numSettings_PixelOperationsThreshold0);
  253. this.panSettings_PixelOperationsThreshold.Controls.Add(this.labText_LocalOperationsThreshold1);
  254. this.panSettings_PixelOperationsThreshold.Controls.Add(this.labText_LocalOperationsThreshold0);
  255. this.panSettings_PixelOperationsThreshold.Controls.Add(this.picSettings_PixelOperationsThreshold0);
  256. this.panSettings_PixelOperationsThreshold.Controls.Add(this.picSettings_PixelOperationsThreshold1);
  257. this.panSettings_PixelOperationsThreshold.Dock = System.Windows.Forms.DockStyle.Fill;
  258. this.panSettings_PixelOperationsThreshold.Location = new System.Drawing.Point(0, 0);
  259. this.panSettings_PixelOperationsThreshold.Margin = new System.Windows.Forms.Padding(0);
  260. this.panSettings_PixelOperationsThreshold.Name = "panSettings_PixelOperationsThreshold";
  261. this.panSettings_PixelOperationsThreshold.Padding = new System.Windows.Forms.Padding(10);
  262. this.panSettings_PixelOperationsThreshold.Size = new System.Drawing.Size(265, 435);
  263. this.panSettings_PixelOperationsThreshold.TabIndex = 12;
  264. //
  265. // numSettings_PixelOperationsThreshold1
  266. //
  267. this.numSettings_PixelOperationsThreshold1.Location = new System.Drawing.Point(16, 306);
  268. this.numSettings_PixelOperationsThreshold1.Maximum = new decimal(new int[] {
  269. 255,
  270. 0,
  271. 0,
  272. 0});
  273. this.numSettings_PixelOperationsThreshold1.Name = "numSettings_PixelOperationsThreshold1";
  274. this.numSettings_PixelOperationsThreshold1.Size = new System.Drawing.Size(120, 22);
  275. this.numSettings_PixelOperationsThreshold1.TabIndex = 4;
  276. this.numSettings_PixelOperationsThreshold1.Value = new decimal(new int[] {
  277. 255,
  278. 0,
  279. 0,
  280. 0});
  281. this.numSettings_PixelOperationsThreshold1.ValueChanged += new System.EventHandler(this.numSettings_PixelOperationsThreshold_ValueChanged);
  282. //
  283. // numSettings_PixelOperationsThreshold0
  284. //
  285. this.numSettings_PixelOperationsThreshold0.Location = new System.Drawing.Point(16, 255);
  286. this.numSettings_PixelOperationsThreshold0.Maximum = new decimal(new int[] {
  287. 255,
  288. 0,
  289. 0,
  290. 0});
  291. this.numSettings_PixelOperationsThreshold0.Name = "numSettings_PixelOperationsThreshold0";
  292. this.numSettings_PixelOperationsThreshold0.Size = new System.Drawing.Size(120, 22);
  293. this.numSettings_PixelOperationsThreshold0.TabIndex = 3;
  294. this.numSettings_PixelOperationsThreshold0.ValueChanged += new System.EventHandler(this.numSettings_PixelOperationsThreshold_ValueChanged);
  295. //
  296. // labText_LocalOperationsThreshold1
  297. //
  298. this.labText_LocalOperationsThreshold1.AutoSize = true;
  299. this.labText_LocalOperationsThreshold1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  300. this.labText_LocalOperationsThreshold1.Location = new System.Drawing.Point(13, 290);
  301. this.labText_LocalOperationsThreshold1.Name = "labText_LocalOperationsThreshold1";
  302. this.labText_LocalOperationsThreshold1.Size = new System.Drawing.Size(70, 13);
  303. this.labText_LocalOperationsThreshold1.TabIndex = 2;
  304. this.labText_LocalOperationsThreshold1.Text = "Obergrenze:";
  305. //
  306. // labText_LocalOperationsThreshold0
  307. //
  308. this.labText_LocalOperationsThreshold0.AutoSize = true;
  309. this.labText_LocalOperationsThreshold0.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  310. this.labText_LocalOperationsThreshold0.Location = new System.Drawing.Point(13, 239);
  311. this.labText_LocalOperationsThreshold0.Name = "labText_LocalOperationsThreshold0";
  312. this.labText_LocalOperationsThreshold0.Size = new System.Drawing.Size(74, 13);
  313. this.labText_LocalOperationsThreshold0.TabIndex = 1;
  314. this.labText_LocalOperationsThreshold0.Text = "Untergrenze:";
  315. //
  316. // picSettings_PixelOperationsThreshold0
  317. //
  318. this.picSettings_PixelOperationsThreshold0.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  319. this.picSettings_PixelOperationsThreshold0.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  320. this.picSettings_PixelOperationsThreshold0.Location = new System.Drawing.Point(13, 13);
  321. this.picSettings_PixelOperationsThreshold0.Name = "picSettings_PixelOperationsThreshold0";
  322. this.picSettings_PixelOperationsThreshold0.Size = new System.Drawing.Size(238, 190);
  323. this.picSettings_PixelOperationsThreshold0.TabIndex = 0;
  324. this.picSettings_PixelOperationsThreshold0.TabStop = false;
  325. this.picSettings_PixelOperationsThreshold0.Paint += new System.Windows.Forms.PaintEventHandler(this.picSettings_PixelOperationsThreshold_Paint);
  326. //
  327. // picSettings_PixelOperationsThreshold1
  328. //
  329. this.picSettings_PixelOperationsThreshold1.BackgroundImage = global::ImageProcessingTool.Properties.Resources.histogramm_legend;
  330. this.picSettings_PixelOperationsThreshold1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  331. this.picSettings_PixelOperationsThreshold1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  332. this.picSettings_PixelOperationsThreshold1.Location = new System.Drawing.Point(13, 202);
  333. this.picSettings_PixelOperationsThreshold1.Name = "picSettings_PixelOperationsThreshold1";
  334. this.picSettings_PixelOperationsThreshold1.Size = new System.Drawing.Size(238, 15);
  335. this.picSettings_PixelOperationsThreshold1.TabIndex = 5;
  336. this.picSettings_PixelOperationsThreshold1.TabStop = false;
  337. //
  338. // panSettings_PixelOperationsHistogram
  339. //
  340. this.panSettings_PixelOperationsHistogram.Controls.Add(this.picSettings_PixelOperationsHistogram1);
  341. this.panSettings_PixelOperationsHistogram.Controls.Add(this.picSettings_PixelOperationsHistogram0);
  342. this.panSettings_PixelOperationsHistogram.Dock = System.Windows.Forms.DockStyle.Fill;
  343. this.panSettings_PixelOperationsHistogram.Location = new System.Drawing.Point(0, 0);
  344. this.panSettings_PixelOperationsHistogram.Margin = new System.Windows.Forms.Padding(0);
  345. this.panSettings_PixelOperationsHistogram.Name = "panSettings_PixelOperationsHistogram";
  346. this.panSettings_PixelOperationsHistogram.Padding = new System.Windows.Forms.Padding(5);
  347. this.panSettings_PixelOperationsHistogram.Size = new System.Drawing.Size(265, 435);
  348. this.panSettings_PixelOperationsHistogram.TabIndex = 11;
  349. //
  350. // picSettings_PixelOperationsHistogram1
  351. //
  352. this.picSettings_PixelOperationsHistogram1.BackgroundImage = global::ImageProcessingTool.Properties.Resources.histogramm_legend;
  353. this.picSettings_PixelOperationsHistogram1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  354. this.picSettings_PixelOperationsHistogram1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  355. this.picSettings_PixelOperationsHistogram1.Location = new System.Drawing.Point(13, 202);
  356. this.picSettings_PixelOperationsHistogram1.Name = "picSettings_PixelOperationsHistogram1";
  357. this.picSettings_PixelOperationsHistogram1.Size = new System.Drawing.Size(238, 15);
  358. this.picSettings_PixelOperationsHistogram1.TabIndex = 6;
  359. this.picSettings_PixelOperationsHistogram1.TabStop = false;
  360. //
  361. // picSettings_PixelOperationsHistogram0
  362. //
  363. this.picSettings_PixelOperationsHistogram0.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  364. this.picSettings_PixelOperationsHistogram0.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  365. this.picSettings_PixelOperationsHistogram0.Location = new System.Drawing.Point(13, 13);
  366. this.picSettings_PixelOperationsHistogram0.Name = "picSettings_PixelOperationsHistogram0";
  367. this.picSettings_PixelOperationsHistogram0.Size = new System.Drawing.Size(238, 190);
  368. this.picSettings_PixelOperationsHistogram0.TabIndex = 0;
  369. this.picSettings_PixelOperationsHistogram0.TabStop = false;
  370. //
  371. // panSettings_LocalOperationsSmoothing
  372. //
  373. this.panSettings_LocalOperationsSmoothing.Controls.Add(this.numSettings_LocalOperationsSmoothing0);
  374. this.panSettings_LocalOperationsSmoothing.Controls.Add(this.picSettings_LocalOperationsSmoothing1);
  375. this.panSettings_LocalOperationsSmoothing.Controls.Add(this.picSettings_LocalOperationsSmoothing0);
  376. this.panSettings_LocalOperationsSmoothing.Controls.Add(this.radiobtnSettings_LocalOperationsSmoothingMedian1);
  377. this.panSettings_LocalOperationsSmoothing.Controls.Add(this.labText_LocalOperationsSmoothing2);
  378. this.panSettings_LocalOperationsSmoothing.Controls.Add(this.labText_LocalOperationsSmoothing0);
  379. this.panSettings_LocalOperationsSmoothing.Controls.Add(this.radiobtnSettings_LocalOperationsSmoothingMedian0);
  380. this.panSettings_LocalOperationsSmoothing.Dock = System.Windows.Forms.DockStyle.Fill;
  381. this.panSettings_LocalOperationsSmoothing.Location = new System.Drawing.Point(0, 0);
  382. this.panSettings_LocalOperationsSmoothing.Margin = new System.Windows.Forms.Padding(0);
  383. this.panSettings_LocalOperationsSmoothing.Name = "panSettings_LocalOperationsSmoothing";
  384. this.panSettings_LocalOperationsSmoothing.Padding = new System.Windows.Forms.Padding(10);
  385. this.panSettings_LocalOperationsSmoothing.Size = new System.Drawing.Size(265, 435);
  386. this.panSettings_LocalOperationsSmoothing.TabIndex = 2;
  387. //
  388. // numSettings_LocalOperationsSmoothing0
  389. //
  390. this.numSettings_LocalOperationsSmoothing0.Location = new System.Drawing.Point(16, 181);
  391. this.numSettings_LocalOperationsSmoothing0.Maximum = new decimal(new int[] {
  392. 5,
  393. 0,
  394. 0,
  395. 0});
  396. this.numSettings_LocalOperationsSmoothing0.Minimum = new decimal(new int[] {
  397. 1,
  398. 0,
  399. 0,
  400. 0});
  401. this.numSettings_LocalOperationsSmoothing0.Name = "numSettings_LocalOperationsSmoothing0";
  402. this.numSettings_LocalOperationsSmoothing0.Size = new System.Drawing.Size(40, 22);
  403. this.numSettings_LocalOperationsSmoothing0.TabIndex = 10;
  404. this.numSettings_LocalOperationsSmoothing0.Value = new decimal(new int[] {
  405. 1,
  406. 0,
  407. 0,
  408. 0});
  409. //
  410. // picSettings_LocalOperationsSmoothing1
  411. //
  412. this.picSettings_LocalOperationsSmoothing1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("picSettings_LocalOperationsSmoothing1.BackgroundImage")));
  413. this.picSettings_LocalOperationsSmoothing1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  414. this.picSettings_LocalOperationsSmoothing1.Cursor = System.Windows.Forms.Cursors.Hand;
  415. this.picSettings_LocalOperationsSmoothing1.Location = new System.Drawing.Point(122, 55);
  416. this.picSettings_LocalOperationsSmoothing1.Name = "picSettings_LocalOperationsSmoothing1";
  417. this.picSettings_LocalOperationsSmoothing1.Size = new System.Drawing.Size(80, 80);
  418. this.picSettings_LocalOperationsSmoothing1.TabIndex = 9;
  419. this.picSettings_LocalOperationsSmoothing1.TabStop = false;
  420. this.picSettings_LocalOperationsSmoothing1.Click += new System.EventHandler(this.picSettings_LocalOperationsSmoothing_Click);
  421. //
  422. // picSettings_LocalOperationsSmoothing0
  423. //
  424. this.picSettings_LocalOperationsSmoothing0.BackgroundImage = global::ImageProcessingTool.Properties.Resources.neighborhood_square;
  425. this.picSettings_LocalOperationsSmoothing0.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  426. this.picSettings_LocalOperationsSmoothing0.Cursor = System.Windows.Forms.Cursors.Hand;
  427. this.picSettings_LocalOperationsSmoothing0.Location = new System.Drawing.Point(16, 55);
  428. this.picSettings_LocalOperationsSmoothing0.Name = "picSettings_LocalOperationsSmoothing0";
  429. this.picSettings_LocalOperationsSmoothing0.Size = new System.Drawing.Size(80, 80);
  430. this.picSettings_LocalOperationsSmoothing0.TabIndex = 8;
  431. this.picSettings_LocalOperationsSmoothing0.TabStop = false;
  432. this.picSettings_LocalOperationsSmoothing0.Click += new System.EventHandler(this.picSettings_LocalOperationsSmoothing_Click);
  433. //
  434. // radiobtnSettings_LocalOperationsSmoothingMedian1
  435. //
  436. this.radiobtnSettings_LocalOperationsSmoothingMedian1.AutoSize = true;
  437. this.radiobtnSettings_LocalOperationsSmoothingMedian1.Location = new System.Drawing.Point(122, 35);
  438. this.radiobtnSettings_LocalOperationsSmoothingMedian1.Name = "radiobtnSettings_LocalOperationsSmoothingMedian1";
  439. this.radiobtnSettings_LocalOperationsSmoothingMedian1.Size = new System.Drawing.Size(55, 17);
  440. this.radiobtnSettings_LocalOperationsSmoothingMedian1.TabIndex = 7;
  441. this.radiobtnSettings_LocalOperationsSmoothingMedian1.Text = "Raute";
  442. this.radiobtnSettings_LocalOperationsSmoothingMedian1.UseVisualStyleBackColor = true;
  443. //
  444. // labText_LocalOperationsSmoothing2
  445. //
  446. this.labText_LocalOperationsSmoothing2.AutoSize = true;
  447. this.labText_LocalOperationsSmoothing2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  448. this.labText_LocalOperationsSmoothing2.Location = new System.Drawing.Point(13, 160);
  449. this.labText_LocalOperationsSmoothing2.Name = "labText_LocalOperationsSmoothing2";
  450. this.labText_LocalOperationsSmoothing2.Size = new System.Drawing.Size(208, 13);
  451. this.labText_LocalOperationsSmoothing2.TabIndex = 6;
  452. this.labText_LocalOperationsSmoothing2.Text = "Maximale Entfernung um Mittelpunkt:";
  453. //
  454. // labText_LocalOperationsSmoothing0
  455. //
  456. this.labText_LocalOperationsSmoothing0.AutoSize = true;
  457. this.labText_LocalOperationsSmoothing0.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  458. this.labText_LocalOperationsSmoothing0.Location = new System.Drawing.Point(13, 10);
  459. this.labText_LocalOperationsSmoothing0.Name = "labText_LocalOperationsSmoothing0";
  460. this.labText_LocalOperationsSmoothing0.Size = new System.Drawing.Size(127, 13);
  461. this.labText_LocalOperationsSmoothing0.TabIndex = 2;
  462. this.labText_LocalOperationsSmoothing0.Text = "Typ der Nachbarschaft:";
  463. //
  464. // radiobtnSettings_LocalOperationsSmoothingMedian0
  465. //
  466. this.radiobtnSettings_LocalOperationsSmoothingMedian0.AutoSize = true;
  467. this.radiobtnSettings_LocalOperationsSmoothingMedian0.Checked = true;
  468. this.radiobtnSettings_LocalOperationsSmoothingMedian0.Location = new System.Drawing.Point(16, 35);
  469. this.radiobtnSettings_LocalOperationsSmoothingMedian0.Name = "radiobtnSettings_LocalOperationsSmoothingMedian0";
  470. this.radiobtnSettings_LocalOperationsSmoothingMedian0.Size = new System.Drawing.Size(68, 17);
  471. this.radiobtnSettings_LocalOperationsSmoothingMedian0.TabIndex = 1;
  472. this.radiobtnSettings_LocalOperationsSmoothingMedian0.TabStop = true;
  473. this.radiobtnSettings_LocalOperationsSmoothingMedian0.Text = "Quadrat";
  474. this.radiobtnSettings_LocalOperationsSmoothingMedian0.UseVisualStyleBackColor = true;
  475. //
  476. // panSettings_Debug
  477. //
  478. this.panSettings_Debug.Controls.Add(this.DEBUGlabel4);
  479. this.panSettings_Debug.Controls.Add(this.DEBUGlabel3);
  480. this.panSettings_Debug.Controls.Add(this.DEBUGlabel2);
  481. this.panSettings_Debug.Controls.Add(this.DEBUGlabel1);
  482. this.panSettings_Debug.Dock = System.Windows.Forms.DockStyle.Fill;
  483. this.panSettings_Debug.Location = new System.Drawing.Point(0, 0);
  484. this.panSettings_Debug.Margin = new System.Windows.Forms.Padding(0);
  485. this.panSettings_Debug.Name = "panSettings_Debug";
  486. this.panSettings_Debug.Size = new System.Drawing.Size(265, 435);
  487. this.panSettings_Debug.TabIndex = 1;
  488. //
  489. // DEBUGlabel4
  490. //
  491. this.DEBUGlabel4.AutoSize = true;
  492. this.DEBUGlabel4.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  493. this.DEBUGlabel4.Location = new System.Drawing.Point(18, 69);
  494. this.DEBUGlabel4.Name = "DEBUGlabel4";
  495. this.DEBUGlabel4.Size = new System.Drawing.Size(148, 17);
  496. this.DEBUGlabel4.TabIndex = 3;
  497. this.DEBUGlabel4.Text = "ImageZoomFactor = 0|0";
  498. //
  499. // DEBUGlabel3
  500. //
  501. this.DEBUGlabel3.AutoSize = true;
  502. this.DEBUGlabel3.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  503. this.DEBUGlabel3.Location = new System.Drawing.Point(18, 52);
  504. this.DEBUGlabel3.Name = "DEBUGlabel3";
  505. this.DEBUGlabel3.Size = new System.Drawing.Size(138, 17);
  506. this.DEBUGlabel3.TabIndex = 2;
  507. this.DEBUGlabel3.Text = "ImageZoomFactor = 0";
  508. //
  509. // DEBUGlabel2
  510. //
  511. this.DEBUGlabel2.AutoSize = true;
  512. this.DEBUGlabel2.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  513. this.DEBUGlabel2.Location = new System.Drawing.Point(18, 35);
  514. this.DEBUGlabel2.Name = "DEBUGlabel2";
  515. this.DEBUGlabel2.Size = new System.Drawing.Size(119, 17);
  516. this.DEBUGlabel2.TabIndex = 1;
  517. this.DEBUGlabel2.Text = "ImageAnchor = 0|0";
  518. //
  519. // DEBUGlabel1
  520. //
  521. this.DEBUGlabel1.AutoSize = true;
  522. this.DEBUGlabel1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  523. this.DEBUGlabel1.Location = new System.Drawing.Point(18, 18);
  524. this.DEBUGlabel1.Name = "DEBUGlabel1";
  525. this.DEBUGlabel1.Size = new System.Drawing.Size(124, 17);
  526. this.DEBUGlabel1.TabIndex = 0;
  527. this.DEBUGlabel1.Text = "ImagePosition = 0|0";
  528. //
  529. // panSettingsExecutionButton
  530. //
  531. this.panSettingsExecutionButton.Controls.Add(this.btnSettingsExecute);
  532. this.panSettingsExecutionButton.Dock = System.Windows.Forms.DockStyle.Fill;
  533. this.panSettingsExecutionButton.Location = new System.Drawing.Point(0, 475);
  534. this.panSettingsExecutionButton.Margin = new System.Windows.Forms.Padding(0);
  535. this.panSettingsExecutionButton.Name = "panSettingsExecutionButton";
  536. this.panSettingsExecutionButton.Size = new System.Drawing.Size(265, 40);
  537. this.panSettingsExecutionButton.TabIndex = 3;
  538. //
  539. // btnSettingsExecute
  540. //
  541. this.btnSettingsExecute.Location = new System.Drawing.Point(41, 9);
  542. this.btnSettingsExecute.Margin = new System.Windows.Forms.Padding(0);
  543. this.btnSettingsExecute.Name = "btnSettingsExecute";
  544. this.btnSettingsExecute.Size = new System.Drawing.Size(176, 23);
  545. this.btnSettingsExecute.TabIndex = 0;
  546. this.btnSettingsExecute.Text = "Operation ausführen";
  547. this.btnSettingsExecute.UseVisualStyleBackColor = true;
  548. this.btnSettingsExecute.Click += new System.EventHandler(this.btnSettingsExecute_Click);
  549. //
  550. // panSettingsTitle
  551. //
  552. this.panSettingsTitle.Controls.Add(this.labSettingsTitle);
  553. this.panSettingsTitle.Dock = System.Windows.Forms.DockStyle.Fill;
  554. this.panSettingsTitle.Location = new System.Drawing.Point(0, 0);
  555. this.panSettingsTitle.Margin = new System.Windows.Forms.Padding(0);
  556. this.panSettingsTitle.Name = "panSettingsTitle";
  557. this.panSettingsTitle.Padding = new System.Windows.Forms.Padding(3);
  558. this.panSettingsTitle.Size = new System.Drawing.Size(265, 40);
  559. this.panSettingsTitle.TabIndex = 4;
  560. //
  561. // labSettingsTitle
  562. //
  563. this.labSettingsTitle.Dock = System.Windows.Forms.DockStyle.Fill;
  564. this.labSettingsTitle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  565. this.labSettingsTitle.Location = new System.Drawing.Point(3, 3);
  566. this.labSettingsTitle.Name = "labSettingsTitle";
  567. this.labSettingsTitle.Size = new System.Drawing.Size(259, 34);
  568. this.labSettingsTitle.TabIndex = 0;
  569. this.labSettingsTitle.Text = "#SettingsTitle";
  570. this.labSettingsTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  571. //
  572. // layoutImage
  573. //
  574. this.layoutImage.ColumnCount = 1;
  575. this.layoutImage.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
  576. this.layoutImage.Controls.Add(this.panImage, 0, 0);
  577. this.layoutImage.Controls.Add(this.layoutImageZoom, 0, 1);
  578. this.layoutImage.Dock = System.Windows.Forms.DockStyle.Fill;
  579. this.layoutImage.Location = new System.Drawing.Point(202, 1);
  580. this.layoutImage.Margin = new System.Windows.Forms.Padding(0);
  581. this.layoutImage.Name = "layoutImage";
  582. this.layoutImage.RowCount = 2;
  583. this.layoutImage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
  584. this.layoutImage.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
  585. this.layoutImage.Size = new System.Drawing.Size(315, 364);
  586. this.layoutImage.TabIndex = 3;
  587. //
  588. // panImage
  589. //
  590. this.panImage.Cursor = System.Windows.Forms.Cursors.Hand;
  591. this.panImage.Dock = System.Windows.Forms.DockStyle.Fill;
  592. this.panImage.Location = new System.Drawing.Point(0, 0);
  593. this.panImage.Margin = new System.Windows.Forms.Padding(0);
  594. this.panImage.Name = "panImage";
  595. this.panImage.Size = new System.Drawing.Size(315, 334);
  596. this.panImage.TabIndex = 2;
  597. //
  598. // layoutImageZoom
  599. //
  600. this.layoutImageZoom.ColumnCount = 2;
  601. this.layoutImageZoom.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
  602. this.layoutImageZoom.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
  603. this.layoutImageZoom.Controls.Add(this.trackImageZoom, 0, 0);
  604. this.layoutImageZoom.Controls.Add(this.labImageZoom, 1, 0);
  605. this.layoutImageZoom.Dock = System.Windows.Forms.DockStyle.Fill;
  606. this.layoutImageZoom.Location = new System.Drawing.Point(0, 334);
  607. this.layoutImageZoom.Margin = new System.Windows.Forms.Padding(0);
  608. this.layoutImageZoom.Name = "layoutImageZoom";
  609. this.layoutImageZoom.RowCount = 1;
  610. this.layoutImageZoom.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
  611. this.layoutImageZoom.Size = new System.Drawing.Size(315, 30);
  612. this.layoutImageZoom.TabIndex = 3;
  613. //
  614. // trackImageZoom
  615. //
  616. this.trackImageZoom.Dock = System.Windows.Forms.DockStyle.Fill;
  617. this.trackImageZoom.LargeChange = 10;
  618. this.trackImageZoom.Location = new System.Drawing.Point(0, 0);
  619. this.trackImageZoom.Margin = new System.Windows.Forms.Padding(0);
  620. this.trackImageZoom.Maximum = 100;
  621. this.trackImageZoom.Name = "trackImageZoom";
  622. this.trackImageZoom.Size = new System.Drawing.Size(215, 30);
  623. this.trackImageZoom.TabIndex = 0;
  624. this.trackImageZoom.TabStop = false;
  625. this.trackImageZoom.TickFrequency = 10;
  626. this.trackImageZoom.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
  627. this.trackImageZoom.Value = 30;
  628. this.trackImageZoom.Scroll += new System.EventHandler(this.trackImageZoom_Scroll);
  629. //
  630. // labImageZoom
  631. //
  632. this.labImageZoom.Dock = System.Windows.Forms.DockStyle.Fill;
  633. this.labImageZoom.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  634. this.labImageZoom.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
  635. this.labImageZoom.Location = new System.Drawing.Point(218, 0);
  636. this.labImageZoom.Name = "labImageZoom";
  637. this.labImageZoom.Size = new System.Drawing.Size(94, 30);
  638. this.labImageZoom.TabIndex = 1;
  639. this.labImageZoom.Text = "Zoom: 100%";
  640. this.labImageZoom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  641. //
  642. // treeviewOperations
  643. //
  644. this.treeviewOperations.BorderStyle = System.Windows.Forms.BorderStyle.None;
  645. this.treeviewOperations.Dock = System.Windows.Forms.DockStyle.Fill;
  646. this.treeviewOperations.HideSelection = false;
  647. this.treeviewOperations.Location = new System.Drawing.Point(1, 1);
  648. this.treeviewOperations.Margin = new System.Windows.Forms.Padding(0);
  649. this.treeviewOperations.Name = "treeviewOperations";
  650. treeNode11.Name = "nodeDebug";
  651. treeNode11.Text = "[Debug]";
  652. treeNode12.Name = "nodePixelOperationsColorInversion";
  653. treeNode12.Text = "Farben invertieren";
  654. treeNode13.Name = "nodePixelOperationsColorToBlackAndWhite";
  655. treeNode13.Text = "Farben entfernen";
  656. treeNode14.Name = "nodePixelOperationsHistogram";
  657. treeNode14.Text = "Histogramm anzeigen";
  658. treeNode15.Name = "nodePixelOperationsThreshold";
  659. treeNode15.Text = "Schwellenwert";
  660. treeNode16.Name = "nodePixelOperations";
  661. treeNode16.Text = "Punktoperatoren";
  662. treeNode17.Name = "nodeLocalOperationsSmoothingBoxFilter";
  663. treeNode17.Text = "Mittelwert/Box-Filter";
  664. treeNode18.Name = "nodeLocalOperationsSmoothingMedian";
  665. treeNode18.Text = "Median-Filter";
  666. treeNode19.Name = "nodeLocalOperationsSmoothing";
  667. treeNode19.Text = "Glättung";
  668. treeNode20.Name = "nodeLocalOperations";
  669. treeNode20.Text = "Lokale Operatoren";
  670. this.treeviewOperations.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
  671. treeNode11,
  672. treeNode16,
  673. treeNode20});
  674. this.layoutMain.SetRowSpan(this.treeviewOperations, 2);
  675. this.treeviewOperations.Size = new System.Drawing.Size(200, 515);
  676. this.treeviewOperations.TabIndex = 4;
  677. this.treeviewOperations.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeviewOperations_AfterSelect);
  678. //
  679. // progressOperation
  680. //
  681. this.layoutMain.SetColumnSpan(this.progressOperation, 3);
  682. this.progressOperation.Dock = System.Windows.Forms.DockStyle.Fill;
  683. this.progressOperation.Location = new System.Drawing.Point(1, 517);
  684. this.progressOperation.Margin = new System.Windows.Forms.Padding(0);
  685. this.progressOperation.Name = "progressOperation";
  686. this.progressOperation.Size = new System.Drawing.Size(782, 20);
  687. this.progressOperation.TabIndex = 5;
  688. //
  689. // formMain
  690. //
  691. this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  692. this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  693. this.ClientSize = new System.Drawing.Size(784, 562);
  694. this.Controls.Add(this.layoutMain);
  695. this.Controls.Add(this.menuMain);
  696. this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  697. this.KeyPreview = true;
  698. this.MinimumSize = new System.Drawing.Size(800, 600);
  699. this.Name = "formMain";
  700. this.Text = "ImageProcessingTool v.0.1 (preAlpha)";
  701. this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formMain_FormClosing);
  702. this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.formMain_KeyDown);
  703. this.menuMain.ResumeLayout(false);
  704. this.menuMain.PerformLayout();
  705. this.layoutMain.ResumeLayout(false);
  706. this.panConsole.ResumeLayout(false);
  707. this.layoutSettings.ResumeLayout(false);
  708. this.panSettings.ResumeLayout(false);
  709. this.panSettings_PixelOperationsThreshold.ResumeLayout(false);
  710. this.panSettings_PixelOperationsThreshold.PerformLayout();
  711. ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold1)).EndInit();
  712. ((System.ComponentModel.ISupportInitialize)(this.numSettings_PixelOperationsThreshold0)).EndInit();
  713. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold0)).EndInit();
  714. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsThreshold1)).EndInit();
  715. this.panSettings_PixelOperationsHistogram.ResumeLayout(false);
  716. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram1)).EndInit();
  717. ((System.ComponentModel.ISupportInitialize)(this.picSettings_PixelOperationsHistogram0)).EndInit();
  718. this.panSettings_LocalOperationsSmoothing.ResumeLayout(false);
  719. this.panSettings_LocalOperationsSmoothing.PerformLayout();
  720. ((System.ComponentModel.ISupportInitialize)(this.numSettings_LocalOperationsSmoothing0)).EndInit();
  721. ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing1)).EndInit();
  722. ((System.ComponentModel.ISupportInitialize)(this.picSettings_LocalOperationsSmoothing0)).EndInit();
  723. this.panSettings_Debug.ResumeLayout(false);
  724. this.panSettings_Debug.PerformLayout();
  725. this.panSettingsExecutionButton.ResumeLayout(false);
  726. this.panSettingsTitle.ResumeLayout(false);
  727. this.layoutImage.ResumeLayout(false);
  728. this.layoutImageZoom.ResumeLayout(false);
  729. this.layoutImageZoom.PerformLayout();
  730. ((System.ComponentModel.ISupportInitialize)(this.trackImageZoom)).EndInit();
  731. this.ResumeLayout(false);
  732. this.PerformLayout();
  733.  
  734. }
  735.  
  736. #endregion
  737.  
  738. private AdvancedTableLayoutPanel layoutMain;
  739. private AdvancedPanel panConsole;
  740. private AdvancedPanel panSettings;
  741. private AdvancedTableLayoutPanel layoutImage;
  742. private System.Windows.Forms.MenuStrip menuMain;
  743. private System.Windows.Forms.ToolStripMenuItem menuitemHelp;
  744. private System.Windows.Forms.ToolStripMenuItem menuitemHelpInfo;
  745. private AdvancedPanel panImage;
  746. private AdvancedTrackBar trackImageZoom;
  747. private System.Windows.Forms.ToolStripMenuItem manuitemFile;
  748. private System.Windows.Forms.ToolStripMenuItem menuitemFileOpen;
  749. private System.Windows.Forms.TreeView treeviewOperations;
  750. private System.Windows.Forms.TableLayoutPanel layoutSettings;
  751. private System.Windows.Forms.Panel panSettingsExecutionButton;
  752. private System.Windows.Forms.Panel panSettingsTitle;
  753. private System.Windows.Forms.Label labSettingsTitle;
  754. private System.Windows.Forms.RichTextBox textConsole;
  755. private System.Windows.Forms.TableLayoutPanel layoutImageZoom;
  756. private System.Windows.Forms.Label labImageZoom;
  757. private System.Windows.Forms.Panel panSettings_Debug;
  758. public System.Windows.Forms.Label DEBUGlabel4;
  759. public System.Windows.Forms.Label DEBUGlabel3;
  760. public System.Windows.Forms.Label DEBUGlabel2;
  761. public System.Windows.Forms.Label DEBUGlabel1;
  762. private System.Windows.Forms.ProgressBar progressOperation;
  763. private System.Windows.Forms.Button btnSettingsExecute;
  764. private System.Windows.Forms.ToolStripMenuItem menuitemFileSaveAs;
  765. private System.Windows.Forms.Panel panSettings_LocalOperationsSmoothing;
  766. private System.Windows.Forms.PictureBox picSettings_LocalOperationsSmoothing0;
  767. private System.Windows.Forms.RadioButton radiobtnSettings_LocalOperationsSmoothingMedian1;
  768. private System.Windows.Forms.Label labText_LocalOperationsSmoothing2;
  769. private System.Windows.Forms.Label labText_LocalOperationsSmoothing0;
  770. private System.Windows.Forms.RadioButton radiobtnSettings_LocalOperationsSmoothingMedian0;
  771. private System.Windows.Forms.PictureBox picSettings_LocalOperationsSmoothing1;
  772. private System.Windows.Forms.NumericUpDown numSettings_LocalOperationsSmoothing0;
  773. private System.Windows.Forms.Panel panSettings_PixelOperationsHistogram;
  774. private System.Windows.Forms.PictureBox picSettings_PixelOperationsHistogram0;
  775. private System.Windows.Forms.Panel panSettings_PixelOperationsThreshold;
  776. private System.Windows.Forms.PictureBox picSettings_PixelOperationsThreshold0;
  777. private System.Windows.Forms.NumericUpDown numSettings_PixelOperationsThreshold1;
  778. private System.Windows.Forms.NumericUpDown numSettings_PixelOperationsThreshold0;
  779. private System.Windows.Forms.Label labText_LocalOperationsThreshold1;
  780. private System.Windows.Forms.Label labText_LocalOperationsThreshold0;
  781. private System.Windows.Forms.PictureBox picSettings_PixelOperationsThreshold1;
  782. private System.Windows.Forms.PictureBox picSettings_PixelOperationsHistogram1;
  783. }
  784. }
  785.  
  786. using System;
  787. using System.Collections.Generic;
  788. using System.Linq;
  789. using System.Text;
  790. using System.Drawing;
  791. using ImageProcessingTool.Imaging;
  792. using ImageProcessingTool.ImageProcessing.Filters;
  793.  
  794. namespace ImageProcessingTool.ImageProcessing
  795. {
  796. class Neighborhood
  797. {
  798. private struct ColorPosition : IComparable<ColorPosition>
  799. {
  800. public ColorPosition(int x, int y, Color color) {
  801. _X = x;
  802. _Y = y;
  803. _Color = color;
  804. _IsSet = true;
  805. }
  806.  
  807. private int _X;
  808. public int X {
  809. get {
  810. return _X;
  811. }
  812. set {
  813. _X = value;
  814. }
  815. }
  816. private int _Y;
  817. public int Y {
  818. get {
  819. return _Y;
  820. }
  821. set {
  822. _Y = value;
  823. }
  824. }
  825. private Color _Color;
  826. public Color Color {
  827. get {
  828. return _Color;
  829. }
  830. set {
  831. _Color = value;
  832. }
  833. }
  834. public static ColorPosition Empty {
  835. get {
  836. return new ColorPosition();
  837. }
  838. }
  839. private bool _IsSet;
  840. public bool IsSet {
  841. get {
  842. return _IsSet;
  843. }
  844. }
  845.  
  846. public int CompareTo(ColorPosition colorPosition) {
  847. return PixelOperations.getBlackAndWhiteValue(Color) - PixelOperations.getBlackAndWhiteValue(colorPosition.Color);
  848. }
  849. }
  850.  
  851. private ColorPosition _CenterColorPosition;
  852. private ColorPosition[,] _NeighborColorPositions;
  853.  
  854. public enum NeighborhoodType
  855. {
  856. Square,
  857. Rhombus
  858. }
  859. private NeighborhoodType _Type;
  860. public NeighborhoodType Type {
  861. get {
  862. return _Type;
  863. }
  864. }
  865. private int _MaxRadius;
  866. public int MaxRadius {
  867. get {
  868. return _MaxRadius;
  869. }
  870. }
  871.  
  872. public Neighborhood(NeighborhoodType type, int maxRadius) {
  873. _Type = type;
  874. _MaxRadius = maxRadius;
  875. _CenterColorPosition = ColorPosition.Empty;
  876. _NeighborColorPositions = new ColorPosition[maxRadius * 4, maxRadius * 4];
  877. }
  878.  
  879. public void setColor(int x, int y, Color color) {
  880. if (x == 0 && y == 0) {
  881. _CenterColorPosition = new ColorPosition(x, y, color);
  882. return;
  883. }
  884. if (Type == NeighborhoodType.Square ||
  885. Type == NeighborhoodType.Rhombus && Math.Abs(x * y) <= MaxRadius) {
  886. int posX = (Math.Abs(x) * 2) + (x > 0 ? 0 : 1);
  887. int posY = (Math.Abs(y) * 2) + (y > 0 ? 0 : 1);
  888. _NeighborColorPositions[posX, posY] = new ColorPosition(x, y, color);
  889. }
  890. }
  891. public Color getColor(int x, int y) {
  892. if (x == 0 && y == 0) {
  893. return _CenterColorPosition.Color;
  894. }
  895. int posX = (Math.Abs(x) * 2) + (x > 0 ? 0 : 1);
  896. int posY = (Math.Abs(y) * 2) + (y > 0 ? 0 : 1);
  897. return _NeighborColorPositions[posX, posY].Color;
  898. }
  899.  
  900. public Color getAverageColor() {
  901. double[] RGB = new double[3];
  902. double count = 0;
  903. foreach (ColorPosition colorPosition in _NeighborColorPositions) {
  904. if (colorPosition.IsSet) {
  905. RGB[0] += colorPosition.Color.R;
  906. RGB[1] += colorPosition.Color.G;
  907. RGB[2] += colorPosition.Color.B;
  908. count++;
  909. }
  910. }
  911. 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) };
  912. return Color.FromArgb(avgRGB[0], avgRGB[1], avgRGB[2]);
  913. }
  914. public Color getMedianColorByBlackAndWhite() {
  915. ColorPosition[] colorPositions = new ColorPosition[0];
  916. foreach (ColorPosition colorPosition in _NeighborColorPositions) {
  917. if (colorPosition.IsSet) {
  918. ColorPosition[] temp = new ColorPosition[colorPositions.Length + 1];
  919. colorPositions.CopyTo(temp, 0);
  920. temp[temp.Length - 1] = colorPosition;
  921. colorPositions = temp;
  922. }
  923. }
  924. ColorPosition[] temp2 = new ColorPosition[colorPositions.Length + 1];
  925. colorPositions.CopyTo(temp2, 0);
  926. temp2[temp2.Length - 1] = _CenterColorPosition;
  927. colorPositions = temp2;
  928.  
  929. if (colorPositions.Length % 2 != 1) {
  930. return Color.Empty;
  931. }
  932. Array.Sort(colorPositions);
  933. return colorPositions[(colorPositions.Length - 1) / 2].Color;
  934. }
  935.  
  936. public static Neighborhood getFromBitmapPosition(FastBitmap bitmap, NeighborhoodType type, int maxRadius, int x, int y) {
  937. Neighborhood neighborhood = new Neighborhood(type, maxRadius);
  938. int width = (maxRadius * 2) + 1;
  939. for (int yPos = -1 * maxRadius; yPos <= maxRadius; yPos++) {
  940. for (int xPos = -1 * maxRadius; xPos <= maxRadius; xPos++) {
  941. if (x + xPos > 0 && x + xPos < bitmap.Width && y + yPos > 0 && y + yPos < bitmap.Height) {
  942. Color color = bitmap.GetPixel(x + xPos, y + yPos);
  943. neighborhood.setColor(xPos, yPos, color);
  944. }
  945. }
  946. }
  947. return neighborhood;
  948. }
  949. }
  950. }
  951.  
  952. using System;
  953. using System.Collections.Generic;
  954. using System.Linq;
  955. using System.Text;
  956. using System.Windows.Forms;
  957. using ImageProcessingTool.Imaging;
  958.  
  959. namespace ImageProcessingTool
  960. {
  961. class Log
  962. {
  963. private bool _Ready;
  964. private RichTextBox _TextBox;
  965. private ProgressBar _ProgressBar;
  966. private double _Progress;
  967. private DateTime _TimeLastOperationStart;
  968. private string _LastOperation;
  969. private FastBitmap _LastBitmap;
  970.  
  971. public Log(RichTextBox textBox, ProgressBar progressBar) {
  972. _Ready = false;
  973. _TextBox = textBox;
  974. _ProgressBar = progressBar;
  975. _Progress = 0;
  976. _TimeLastOperationStart = DateTime.MinValue; // NULL-Wert
  977. _LastOperation = "Unbekannte Operation";
  978. _LastBitmap = null;
  979. }
  980.  
  981. public enum LogMessageType
  982. {
  983. Info,
  984. Warnung,
  985. Fehler,
  986. Operation,
  987. Datei
  988. }
  989.  
  990. private delegate void _Delegate_addLogMessage(LogMessageType type, string value);
  991. public void addLogMessage(LogMessageType type, string text) {
  992. if (_TextBox.InvokeRequired) {
  993. _TextBox.BeginInvoke(new _Delegate_addLogMessage(addLogMessage), new object[] { type, text });
  994. return;
  995. }
  996. _TextBox.AppendText(DateTime.Now.ToLongTimeString() + " [" + type.ToString() + "] " + text + "\n");
  997. _TextBox.ScrollToCaret();
  998. }
  999. private delegate void _Delegate_clearLog();
  1000. public void clearLog() {
  1001. if (_TextBox.InvokeRequired) {
  1002. _TextBox.BeginInvoke(new _Delegate_clearLog(clearLog));
  1003. return;
  1004. }
  1005. _TextBox.Clear();
  1006. }
  1007.  
  1008. private delegate void _Delegate_setProgress(double progress);
  1009. public void setProgress(double progress) {
  1010. if (_ProgressBar.InvokeRequired) {
  1011. _ProgressBar.BeginInvoke(new _Delegate_setProgress(setProgress), new object[] { progress });
  1012. return;
  1013. }
  1014. _Progress = progress;
  1015. _ProgressBar.Value = (int)Math.Round(progress * 100, 0);
  1016. }
  1017. public void resetProgress() {
  1018. setProgress(0);
  1019. }
  1020.  
  1021. public double getProgressDouble() {
  1022. while (_Ready) ;
  1023. return _Progress;
  1024. }
  1025. public int getProgressInt() {
  1026. return (int)Math.Round(_Progress * 100, 0);
  1027. }
  1028.  
  1029. public void addLogMessage_OperationStart(string operation, FastBitmap bitmap) {
  1030. _TimeLastOperationStart = DateTime.Now;
  1031. _LastOperation = operation;
  1032. _LastBitmap = bitmap;
  1033. addLogMessage(Log.LogMessageType.Operation, operation + " | Berechnungen wurden gestartet. (" + bitmap.Width.ToString() + "x" + bitmap.Height.ToString() + " / " + (bitmap.Height * bitmap.Width).ToString() + " Pixel werden bearbeitet.)");
  1034. }
  1035. public void addLogMessage_OperationStop() {
  1036. TimeSpan span = DateTime.Now - _TimeLastOperationStart;
  1037. string time = (span.TotalMilliseconds != 0 ? span.ToString().Substring(0, 12) : "00:00:00.000");
  1038. double ticks = Math.Round(span.Ticks / (double)(_LastBitmap.Height * _LastBitmap.Width), 3);
  1039. addLogMessage(Log.LogMessageType.Operation, _LastOperation + " | Berechnungen wurden fertiggestellt. (Dauer: " + time + ", Ticks/Pixel: " + ticks.ToString() + ")");
  1040. }
  1041. public void addLogMessage_OperationAbort(bool error) {
  1042. TimeSpan span = DateTime.Now - _TimeLastOperationStart;
  1043. string time = (span.TotalMilliseconds != 0 ? span.ToString().Substring(0, 12) : "00:00:00.000");
  1044. if (error) {
  1045. addLogMessage(Log.LogMessageType.Operation, _LastOperation + " | Ein Fehler ist aufgetreten und die Berechnungen mussten abgebrochen werden. (Bisherige Dauer: " + time + ")");
  1046. }
  1047. else {
  1048. addLogMessage(Log.LogMessageType.Operation, _LastOperation + " | Berechnungen wurden abgebrochen. (Bisherige Dauer: " + time + ")");
  1049. }
  1050. }
  1051. }
  1052. }
  1053.  
  1054. using System;
  1055. using System.Collections.Generic;
  1056. using System.Linq;
  1057. using System.Text;
  1058. using System.Drawing;
  1059. using ImageProcessingTool.Imaging;
  1060. using System.Threading;
  1061.  
  1062. namespace ImageProcessingTool.ImageProcessing
  1063. {
  1064. class Operation
  1065. {
  1066. public const int THREADCOUNT = 6;
  1067.  
  1068. protected static Thread[] _Threads;
  1069. private static bool _Running;
  1070. private static FastBitmap _Bitmap;
  1071. private static Log _Log;
  1072.  
  1073. public Operation() {
  1074. _Threads = new Thread[0];
  1075. _Running = false;
  1076. _Bitmap = null;
  1077. _Log = null;
  1078. }
  1079.  
  1080. protected delegate void _OperationDelegate(object threadIndex);
  1081. protected static FastBitmap _doOperation(Log log, FastBitmap bitmap, int threadCount, _OperationDelegate operationDelegate) {
  1082. if (!_Running) {
  1083. _Running = true;
  1084. _Bitmap = bitmap;
  1085. _Log = log;
  1086. _Threads = new Thread[threadCount];
  1087. for (int i = 0; i < threadCount; i++) {
  1088. _Threads[i] = new Thread(new ParameterizedThreadStart(operationDelegate));
  1089. _Threads[i].IsBackground = true;
  1090. _Threads[i].Priority = ThreadPriority.BelowNormal;
  1091. _Threads[i].SetApartmentState(ApartmentState.MTA);
  1092. _Threads[i].Start(i);
  1093. }
  1094. for (int i = 0; i < _Threads.Length; i++) {
  1095. _Threads[i].Join();
  1096. }
  1097.  
  1098. _Running = false;
  1099. return _Bitmap;
  1100. }
  1101. return null;
  1102. }
  1103. public static void stopAllOperations() {
  1104. if (_Running) {
  1105. _Running = false;
  1106. for (int i = 0; i < _Threads.Length; i++) {
  1107. _Threads[i].Abort();
  1108. while (_Threads[i].ThreadState != ThreadState.Aborted) ;
  1109. }
  1110. }
  1111. }
  1112. protected static FastBitmap _getOperationBitmap() {
  1113. return _Bitmap;
  1114. }
  1115. protected static Log _getOperationLog() {
  1116. return _Log;
  1117. }
  1118. protected static int[] _getOffsetAndLength(int threadIndex) {
  1119. int offset = (int)Math.Round(threadIndex * (double)_Bitmap.Height / (double)_Threads.Length, 0);
  1120. int limit = (int)Math.Round((threadIndex + 1) * (double)_Bitmap.Height / (double)_Threads.Length, 0) - 1;
  1121. return new int[] { offset, (limit - offset + 1) };
  1122. }
  1123. protected static bool _isRunning() {
  1124. return _Running;
  1125. }
  1126. }
  1127. }
  1128. using System;
  1129. using System.Collections.Generic;
  1130. using System.Linq;
  1131. using System.Text;
  1132. using System.Drawing;
  1133. using ImageProcessingTool.Imaging;
  1134. using System.Threading;
  1135.  
  1136. namespace ImageProcessingTool.ImageProcessing.Filters
  1137. {
  1138. class PixelOperations : Operation
  1139. {
  1140. public static FastBitmap getInvertedBitmap(Log log, FastBitmap bitmap) {
  1141. if (!_isRunning()) {
  1142. FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _invertBitmap);
  1143. return bmp;
  1144. }
  1145. return null;
  1146. }
  1147. private static void _invertBitmap(object threadIndex) {
  1148. FastBitmap bitmap = _getOperationBitmap();
  1149. int[] offlen = _getOffsetAndLength((int)threadIndex);
  1150. for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
  1151. for (int x = 0; x < bitmap.Width; x++) {
  1152. Color color = bitmap.GetPixel(x, y);
  1153. bitmap.SetPixel(x, y, getInvertedColor(color));
  1154. }
  1155. if ((int)threadIndex == 0) {
  1156. _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
  1157. }
  1158. }
  1159. }
  1160. public static Color getInvertedColor(Color color) {
  1161. return Color.FromArgb((int)(255 - color.R), (int)(255 - color.G), (int)(255 - color.B));
  1162. }
  1163.  
  1164. public static FastBitmap getBlackAndWhiteBitmap(Log log, FastBitmap bitmap) {
  1165. if (!_isRunning()) {
  1166. FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getBlackAndWhiteBitmap);
  1167. return bmp;
  1168. }
  1169. return null;
  1170. }
  1171. private static void _getBlackAndWhiteBitmap(object threadIndex) {
  1172. FastBitmap bitmap = _getOperationBitmap();
  1173. int[] offlen = _getOffsetAndLength((int)threadIndex);
  1174. for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
  1175. for (int x = 0; x < bitmap.Width; x++) {
  1176. Color color = bitmap.GetPixel(x, y);
  1177. bitmap.SetPixel(x, y, getBlackAndWhiteColor(color));
  1178. }
  1179. if ((int)threadIndex == 0) {
  1180. _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
  1181. }
  1182. }
  1183. }
  1184. public static Color getBlackAndWhiteColor(Color color) {
  1185. int c = getBlackAndWhiteValue(color);
  1186. return Color.FromArgb(c, c, c);
  1187. }
  1188. public static int getBlackAndWhiteValue(Color color) {
  1189. return (int)Math.Round(((double)color.R + (double)color.G + (double)color.B) / 3, 0);
  1190. }
  1191.  
  1192. public static FastBitmap getHistogramOfBlackAndWhite(Log log, FastBitmap bitmap, int height) {
  1193. int[] histogramm = new int[256];
  1194. for (int y = 0; y < bitmap.Height; y++) {
  1195. for (int x = 0; x < bitmap.Width; x++) {
  1196. Color color = bitmap.GetPixel(x, y);
  1197. histogramm[getBlackAndWhiteValue(color)] += 1;
  1198. }
  1199. log.setProgress((double)(y + 1) / bitmap.Height);
  1200. }
  1201. double factor = (double)height / (double)histogramm.Max();
  1202. FastBitmap bmp = new FastBitmap(histogramm.Length, height);
  1203. for (int i = 0; i < histogramm.Length; i++) {
  1204. int length = (int)Math.Round(factor * (double)histogramm[i], 0);
  1205. for (int ii = 0; ii < length; ii++) {
  1206. bmp.SetPixel(i, (height - 1) - ii, Color.FromArgb(0, 0, 0));
  1207. }
  1208. }
  1209. return bmp;
  1210. }
  1211. private static int _ThresholdMinimum;
  1212. private static int _ThresholdMaximum;
  1213. public static FastBitmap getThresholdBitmap(Log log, FastBitmap bitmap, int thresholdMinimum, int ThresholdMaximum) {
  1214. if (!_isRunning()) {
  1215. _ThresholdMinimum = thresholdMinimum;
  1216. _ThresholdMaximum = ThresholdMaximum;
  1217. FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getThresholdBitmap);
  1218. return bmp;
  1219. }
  1220. return null;
  1221. }
  1222. private static void _getThresholdBitmap(object threadIndex) {
  1223. FastBitmap bitmap = _getOperationBitmap();
  1224. int[] offlen = _getOffsetAndLength((int)threadIndex);
  1225. for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
  1226. for (int x = 0; x < bitmap.Width; x++) {
  1227. Color color = bitmap.GetPixel(x, y);
  1228. int value = getBlackAndWhiteValue(color);
  1229. if(value >= _ThresholdMinimum && value <= _ThresholdMaximum) {
  1230. bitmap.SetPixel(x, y, Color.FromArgb(255, 255, 255));
  1231. }
  1232. else {
  1233. bitmap.SetPixel(x, y, Color.FromArgb(0, 0, 0));
  1234. }
  1235. }
  1236. if ((int)threadIndex == 0) {
  1237. _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
  1238. }
  1239. }
  1240. }
  1241. }
  1242. }using System;
  1243. using System.Collections.Generic;
  1244. using System.Linq;
  1245. using System.Text;
  1246. using System.Drawing;
  1247. using ImageProcessingTool.Imaging;
  1248.  
  1249. namespace ImageProcessingTool.ImageProcessing.Filters
  1250. {
  1251. class Smoothing : Operation
  1252. {
  1253. private static Neighborhood.NeighborhoodType _NeighborhoodType;
  1254. private static int _NeighborhoodMaxRadius;
  1255.  
  1256. public static FastBitmap getSmoothingByBoxFilterBitmap(Log log, FastBitmap bitmap, Neighborhood.NeighborhoodType neighborhoodType, int neighborhoodMaxRadius) {
  1257. if (!_isRunning()) {
  1258. _NeighborhoodType = neighborhoodType;
  1259. _NeighborhoodMaxRadius = neighborhoodMaxRadius;
  1260. FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getSmoothingByBoxFilterBitmap);
  1261. return bmp;
  1262. }
  1263. return null;
  1264. }
  1265. private static void _getSmoothingByBoxFilterBitmap(object threadIndex) {
  1266. FastBitmap bitmap = _getOperationBitmap();
  1267. int[] offlen = _getOffsetAndLength((int)threadIndex);
  1268. for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
  1269. for (int x = 0; x < bitmap.Width; x++) {
  1270. Neighborhood neighborhood = Neighborhood.getFromBitmapPosition(bitmap, _NeighborhoodType, _NeighborhoodMaxRadius, x, y);
  1271. bitmap.SetPixel(x, y, neighborhood.getAverageColor());
  1272. }
  1273. if ((int)threadIndex == 0) {
  1274. _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
  1275. }
  1276. }
  1277. }
  1278.  
  1279. public static FastBitmap getSmoothingByMedianBitmap(Log log, FastBitmap bitmap, Neighborhood.NeighborhoodType neighborhoodType, int neighborhoodMaxRadius) {
  1280. if (!_isRunning()) {
  1281. _NeighborhoodType = neighborhoodType;
  1282. _NeighborhoodMaxRadius = neighborhoodMaxRadius;
  1283. FastBitmap bmp = _doOperation(log, bitmap, THREADCOUNT, _getSmoothingByMedianBitmap);
  1284. return bmp;
  1285. }
  1286. return null;
  1287. }
  1288. private static void _getSmoothingByMedianBitmap(object threadIndex) {
  1289. FastBitmap bitmap = _getOperationBitmap();
  1290. int[] offlen = _getOffsetAndLength((int)threadIndex);
  1291. for (int y = offlen[0]; y < offlen[0] + offlen[1]; y++) {
  1292. for (int x = 0; x < bitmap.Width; x++) {
  1293. Neighborhood neighborhood = Neighborhood.getFromBitmapPosition(bitmap, _NeighborhoodType, _NeighborhoodMaxRadius, x, y);
  1294. bitmap.SetPixel(x, y, neighborhood.getMedianColorByBlackAndWhite());
  1295. }
  1296. if ((int)threadIndex == 0) {
  1297. _getOperationLog().setProgress((double)(y + 1) / (double)offlen[1]);
  1298. }
  1299. }
  1300. }
  1301. }
  1302. }
  1303.  
  1304. using System;
  1305. using System.Collections.Generic;
  1306. using System.ComponentModel;
  1307. using System.Data;
  1308. using System.Drawing;
  1309. using System.Linq;
  1310. using System.Text;
  1311. using System.Windows.Forms;
  1312. using System.Threading;
  1313. using ImageProcessingTool.ImageProcessing;
  1314. using ImageProcessingTool.ImageProcessing.Filters;
  1315. using ImageProcessingTool.Controls;
  1316. using ImageProcessingTool.Imaging;
  1317.  
  1318. namespace ImageProcessingTool
  1319. {
  1320. public partial class formMain : Form
  1321. {
  1322. private Log _Log;
  1323. private ImageViewer _ImageViewer;
  1324. private TreeNode _Operation;
  1325. private Thread _OperationThread;
  1326. bool _MouseOverImageViewer;
  1327. Control _LastControlFocused;
  1328.  
  1329. public formMain() {
  1330. InitializeComponent();
  1331.  
  1332. _Log = new Log(textConsole, progressOperation);
  1333. _Log.clearLog();
  1334. _LastControlFocused = this;
  1335. _MouseOverImageViewer = false;
  1336. _Operation = new TreeNode("");
  1337.  
  1338. _ImageViewer = new ImageViewer(this, panImage);
  1339. _ImageViewer.BitmapChanged += new EventHandler(_ImageViewer_BitmapChanged);
  1340.  
  1341. _setupForm();
  1342. _unloadImage();
  1343. _refreshSettings();
  1344. _setupOperationThread();
  1345.  
  1346. _Log.addLogMessage(Log.LogMessageType.Info, "ImageProcessingTool wurde erfolgreich geladen. (Autor: Maximilian)");
  1347. }
  1348. private void _setupForm() {
  1349. treeviewOperations.ExpandAll();
  1350. panImage.MouseEnter += new EventHandler(panImage_MouseEnter);
  1351. panImage.MouseLeave += new EventHandler(panImage_MouseLeave);
  1352. this.MouseWheel += new MouseEventHandler(panImage_MouseWheel);
  1353. }
  1354. private void _ImageViewer_BitmapChanged(object sender, EventArgs e) {
  1355. _refreshSettings();
  1356. }
  1357.  
  1358. private void formMain_FormClosing(object sender, FormClosingEventArgs e) {
  1359. _stopOperationThread(StopOperationType.UserCancelled);
  1360. }
  1361.  
  1362. private void _setImageZoomFactor(double zoom) {
  1363. zoom = (double)Math.Pow(2, zoom);
  1364. _ImageViewer.ImageZoomFactor = zoom;
  1365. labImageZoom.Text = "Zoom: " + Math.Round(zoom * 100, 0).ToString() + "%";
  1366. }
  1367. private delegate void _Delegate__changeImage(FastBitmap image, bool resetViewer);
  1368. private void _changeImage(FastBitmap image, bool resetViewer) {
  1369. if (_ImageViewer.InvokeRequired) {
  1370. _ImageViewer.BeginInvoke(new _Delegate__changeImage(_changeImage), new object[] { image, resetViewer });
  1371. return;
  1372. }
  1373. if (treeviewOperations.InvokeRequired) {
  1374. treeviewOperations.BeginInvoke(new _Delegate__changeImage(_changeImage), new object[] { image, resetViewer });
  1375. return;
  1376. }
  1377.  
  1378. _ImageViewer.Bitmap = image;
  1379. if (image == null) {
  1380. trackImageZoom.Enabled = false;
  1381. _MouseOverImageViewer = false;
  1382. _focusLastControl();
  1383. _Operation = new TreeNode("");
  1384. treeviewOperations.Enabled = false;
  1385. menuitemFileSaveAs.Enabled = false;
  1386. }
  1387. else {
  1388. trackImageZoom.Enabled = true;
  1389. treeviewOperations.Enabled = true;
  1390. menuitemFileSaveAs.Enabled = true;
  1391. }
  1392. if (resetViewer) {
  1393. _ImageViewer.resetImagePosition();
  1394. _ImageViewer.resetZoom();
  1395. trackImageZoom.Value = 30;
  1396. }
  1397. }
  1398. private void _unloadImage() {
  1399. _changeImage(null, true);
  1400. }
  1401. private void _refreshSettings() {
  1402. foreach (Panel pan in panSettings.Controls) {
  1403. pan.Hide();
  1404. }
  1405. btnSettingsExecute.Hide();
  1406. labSettingsTitle.Text = (_Operation.Name == "" ? "" : _Operation.FullPath.Replace(@"\", " > ").Replace("node", ""));
  1407. if (_Operation.Name.Length > 4) {
  1408. if (_Operation.Nodes.Count == 0) {
  1409. Control[] pans = (Control[])panSettings.Controls.Find("panSettings_" + _Operation.Name.Substring(4), false);
  1410. if (pans.Length > 0) {
  1411. pans[0].Show();
  1412. }
  1413.  
  1414. // Spezielle Panels
  1415.  
  1416. if (_Operation.Name == "nodeDebug") {
  1417. btnSettingsExecute.Hide();
  1418. }
  1419. if (_Operation.Name.Substring(4) == "LocalOperationsSmoothingMedian") {
  1420. panSettings_LocalOperationsSmoothing.Show();
  1421. }
  1422. else if (_Operation.Name.Substring(4) == "LocalOperationsSmoothingBoxFilter") {
  1423. panSettings_LocalOperationsSmoothing.Show();
  1424. }
  1425. btnSettingsExecute.Show();
  1426.  
  1427. // Vorschauberechnungen
  1428.  
  1429. if (_Operation.Name.Substring(4) == "PixelOperationsHistogram") {
  1430. _startOperationThread(treeviewOperations.Nodes.Find("nodePixelOperationsHistogram", true)[0]);
  1431. btnSettingsExecute.Hide();
  1432. }
  1433. else if (_Operation.Name.Substring(4) == "PixelOperationsThreshold") {
  1434. _startOperationThread(treeviewOperations.Nodes.Find("nodePixelOperationsHistogram", true)[0]);
  1435. }
  1436. }
  1437. }
  1438. }
  1439. private void _focusLastControl() {
  1440. if (_LastControlFocused != null) {
  1441. _LastControlFocused.Focus();
  1442. }
  1443. }
  1444. private void _openFile() {
  1445. string path = "";
  1446. OpenFileDialog openFileDialog = new OpenFileDialog();
  1447. openFileDialog.RestoreDirectory = true;
  1448. 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|*.*";
  1449. openFileDialog.FilterIndex = 7;
  1450. if (openFileDialog.ShowDialog() == DialogResult.OK) {
  1451. path = openFileDialog.FileName;
  1452. try {
  1453. FastBitmap bmp = new FastBitmap(new Bitmap(path));
  1454. _changeImage(bmp, true);
  1455. _Log.addLogMessage(Log.LogMessageType.Datei, "Die Bilddatei '" + path + "' wurde geladen. (Format: " + bmp.ToBitmap().PixelFormat.ToString() + ")");
  1456. }
  1457. catch {
  1458. _unloadImage();
  1459. 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);
  1460. trackImageZoom.Enabled = false;
  1461. }
  1462. }
  1463. }
  1464. private void _saveAsFile() {
  1465. string path = "";
  1466. FastBitmap bmp = _ImageViewer.Bitmap;
  1467. SaveFileDialog saveFileDialog = new SaveFileDialog();
  1468. saveFileDialog.RestoreDirectory = true;
  1469. saveFileDialog.DefaultExt = ".jpg";
  1470. saveFileDialog.AddExtension = true;
  1471. saveFileDialog.Filter = "Bitmapdateien|*.bmp;*.dib|JPEG|*.jpg;*.jpeg;*.jpe;*jfif|GIF|*.gif|TIFF|*.tif;*.tiff|PNG|*.png|ICO|*.ico";
  1472. saveFileDialog.FileName = "Unbenannt.jpg";
  1473. saveFileDialog.FilterIndex = 2;
  1474.  
  1475. if (saveFileDialog.ShowDialog() == DialogResult.OK) {
  1476. path = saveFileDialog.FileName;
  1477. try {
  1478. string[] pathElements = path.Split('\\');
  1479. string pathElementsLast = pathElements[pathElements.Length - 1];
  1480. pathElements = pathElementsLast.Split('.');
  1481. pathElementsLast = pathElements[pathElements.Length - 1];
  1482. System.Drawing.Imaging.ImageFormat format = null;
  1483. if (pathElementsLast == "bmp" | pathElementsLast == "dib") {
  1484. format = System.Drawing.Imaging.ImageFormat.Bmp;
  1485. }
  1486. else if (pathElementsLast == "jpg" | pathElementsLast == "jpeg" | pathElementsLast == "jpe" | pathElementsLast == "jfif") {
  1487. format = System.Drawing.Imaging.ImageFormat.Jpeg;
  1488. }
  1489. else if (pathElementsLast == "gif") {
  1490. format = System.Drawing.Imaging.ImageFormat.Gif;
  1491. }
  1492. else if (pathElementsLast == "tif" | pathElementsLast == "tiff") {
  1493. format = System.Drawing.Imaging.ImageFormat.Tiff;
  1494. }
  1495. else if (pathElementsLast == "png") {
  1496. format = System.Drawing.Imaging.ImageFormat.Png;
  1497. }
  1498. else if (pathElementsLast == "ico") {
  1499. format = System.Drawing.Imaging.ImageFormat.Icon;
  1500. }
  1501. bmp.ToBitmap().Save(path, format);
  1502. _Log.addLogMessage(Log.LogMessageType.Datei, "Das Bild wurde unter '" + path + "' gespeichert. (Format: " + format.ToString() + ")");
  1503. }
  1504. catch {
  1505. MessageBox.Show("Ein Fehler ist aufgetreten. Das Bild konnte nicht gespeichert werden.", "Fehler: Ungültiger Speichervorgang", MessageBoxButtons.OK, MessageBoxIcon.Error);
  1506. }
  1507. }
  1508. }
  1509. private void _executeOperation(object operation) {
  1510. try {
  1511. string op = ((TreeNode)operation).Name.Substring(4);
  1512. if (op == "PixelOperationsColorInversion") {
  1513. _changeImage(PixelOperations.getInvertedBitmap(_Log, _ImageViewer.Bitmap), false);
  1514. }
  1515. else if (op == "PixelOperationsColorToBlackAndWhite") {
  1516. _changeImage(PixelOperations.getBlackAndWhiteBitmap(_Log, _ImageViewer.Bitmap), false);
  1517. }
  1518. else if (op == "LocalOperationsSmoothingBoxFilter") {
  1519. Neighborhood.NeighborhoodType type = (radiobtnSettings_LocalOperationsSmoothingMedian1.Checked ? Neighborhood.NeighborhoodType.Rhombus : Neighborhood.NeighborhoodType.Square);
  1520. _changeImage(Smoothing.getSmoothingByBoxFilterBitmap(_Log, _ImageViewer.Bitmap, type, (int)numSettings_LocalOperationsSmoothing0.Value), false);
  1521. }
  1522. else if (op == "LocalOperationsSmoothingMedian") {
  1523. Neighborhood.NeighborhoodType type = (radiobtnSettings_LocalOperationsSmoothingMedian1.Checked ? Neighborhood.NeighborhoodType.Rhombus : Neighborhood.NeighborhoodType.Square);
  1524. _changeImage(Smoothing.getSmoothingByMedianBitmap(_Log, _ImageViewer.Bitmap, type, (int)numSettings_LocalOperationsSmoothing0.Value), false);
  1525. }
  1526. else if (op == "PixelOperationsThreshold") {
  1527. _changeImage(PixelOperations.getThresholdBitmap(_Log, _ImageViewer.Bitmap, (int)numSettings_PixelOperationsThreshold0.Value, (int)numSettings_PixelOperationsThreshold1.Value), false);
  1528. }
  1529. else if (op == "nodePixelOperationsHistogram") {
  1530. picSettings_PixelOperationsThreshold0.BackgroundImage = PixelOperations.getHistogramOfBlackAndWhite(_Log, _ImageViewer.Bitmap, picSettings_PixelOperationsHistogram0.Height).ToBitmap();
  1531. }
  1532. }
  1533. catch {
  1534. if (_OperationThread.ThreadState != ThreadState.AbortRequested) {
  1535. _stopOperationThread(StopOperationType.Error);
  1536. }
  1537. }
  1538. if (_OperationThread.ThreadState != ThreadState.AbortRequested) {
  1539. _stopOperationThread(StopOperationType.OperationFinished);
  1540. }
  1541. }
  1542. private void _startOperationThread(TreeNode operation) {
  1543. if (!_OperationThread.IsAlive) {
  1544. _Log.resetProgress();
  1545. _Log.addLogMessage_OperationStart(_Operation.Text, _ImageViewer.Bitmap);
  1546. _setOperationUI(true);
  1547. _setupOperationThread();
  1548. _OperationThread.Start(operation);
  1549. }
  1550. }
  1551. private enum StopOperationType
  1552. {
  1553. Error,
  1554. UserCancelled,
  1555. OperationFinished
  1556. }
  1557. private void _setupOperationThread() {
  1558. _OperationThread = new Thread(new ParameterizedThreadStart(_executeOperation));
  1559. _OperationThread.IsBackground = true;
  1560. _OperationThread.Priority = ThreadPriority.BelowNormal;
  1561. _OperationThread.SetApartmentState(ApartmentState.MTA);
  1562. }
  1563. private void _stopOperationThread(StopOperationType type) {
  1564. Thread thread = new Thread(new ParameterizedThreadStart(__stopOperationThread));
  1565. thread.IsBackground = true;
  1566. thread.Priority = ThreadPriority.BelowNormal;
  1567. thread.SetApartmentState(ApartmentState.MTA);
  1568. thread.Start(type);
  1569. _OperationThread.Abort();
  1570. }
  1571. private delegate void _Delegate___stopOperationThread(object operationRunning);
  1572. private void __stopOperationThread(object type) {
  1573. if (btnSettingsExecute.InvokeRequired) {
  1574. btnSettingsExecute.BeginInvoke(new _Delegate___stopOperationThread(__stopOperationThread), type);
  1575. return;
  1576. }
  1577. btnSettingsExecute.Enabled = false;
  1578. switch ((StopOperationType)type) {
  1579. case StopOperationType.Error:
  1580. _Log.addLogMessage_OperationAbort(true);
  1581. break;
  1582. case StopOperationType.UserCancelled:
  1583. _Log.addLogMessage_OperationAbort(false);
  1584. break;
  1585. case StopOperationType.OperationFinished:
  1586. _Log.addLogMessage_OperationStop();
  1587. break;
  1588. default:
  1589. break;
  1590. }
  1591. Operation.stopAllOperations();
  1592. _Log.resetProgress();
  1593. _setOperationUI(false);
  1594. }
  1595. private delegate void _Delegate__setOperationUI(bool operationRunning);
  1596. private void _setOperationUI(bool operationRunning) {
  1597. // Wechseln zu Mainthread anhand des Buttons
  1598. if (btnSettingsExecute.InvokeRequired) {
  1599. btnSettingsExecute.BeginInvoke(new _Delegate__setOperationUI(_setOperationUI), operationRunning);
  1600. return;
  1601. }
  1602. btnSettingsExecute.Enabled = true;
  1603. btnSettingsExecute.Text = (operationRunning ? "Operation abbrechen" : "Operation ausführen");
  1604. treeviewOperations.Enabled = !operationRunning;
  1605. menuitemFileSaveAs.Enabled = !operationRunning;
  1606. }
  1607.  
  1608. private void trackImageZoom_Scroll(object sender, EventArgs e) {
  1609. _setImageZoomFactor(((double)((AdvancedTrackBar)sender).Value - 30) / 10);
  1610. }
  1611. private void menuitemFileOpen_Click(object sender, EventArgs e) {
  1612. _openFile();
  1613. }
  1614. private void menuitemFileSaveAs_Click(object sender, EventArgs e) {
  1615. _saveAsFile();
  1616. }
  1617. private void menuitemHelpInfo_Click(object sender, EventArgs e) {
  1618. MessageBox.Show("ImageProcessingTool - Copyright © 2011 Maximilian");
  1619. }
  1620.  
  1621. private void panImage_MouseEnter(object sender, EventArgs e) {
  1622. if (!_ImageViewer.IsEmpty) {
  1623. _MouseOverImageViewer = true;
  1624. _LastControlFocused = this.ActiveControl;
  1625. panImage.Focus();
  1626. }
  1627. }
  1628. private void panImage_MouseLeave(object sender, EventArgs e) {
  1629. _MouseOverImageViewer = false;
  1630. _focusLastControl();
  1631. }
  1632. private void panImage_MouseWheel(object sender, MouseEventArgs e) {
  1633. if (_MouseOverImageViewer && !_ImageViewer.IsEmpty) {
  1634. int scroll = trackImageZoom.Value + (e.Delta / 120) * trackImageZoom.SmallChange;
  1635. scroll = (scroll < trackImageZoom.Minimum ? trackImageZoom.Minimum : scroll);
  1636. scroll = (scroll > trackImageZoom.Maximum ? trackImageZoom.Maximum : scroll);
  1637. trackImageZoom.Value = scroll;
  1638. _setImageZoomFactor(((double)scroll - 30) / 10);
  1639. }
  1640. }
  1641.  
  1642. private void treeviewOperations_AfterSelect(object sender, TreeViewEventArgs e) {
  1643. _Operation = e.Node;
  1644. _refreshSettings();
  1645. }
  1646. private void btnSettingsExecute_Click(object sender, EventArgs e) {
  1647. if (_OperationThread.IsAlive) {
  1648. _stopOperationThread(StopOperationType.UserCancelled);
  1649. }
  1650. else {
  1651. _startOperationThread(_Operation);
  1652. }
  1653. }
  1654. private void formMain_KeyDown(object sender, KeyEventArgs e) {
  1655. switch (e.KeyCode) {
  1656. case Keys.A:
  1657. break;
  1658. case Keys.Add:
  1659. break;
  1660. case Keys.Alt:
  1661. break;
  1662. case Keys.Apps:
  1663. break;
  1664. case Keys.Attn:
  1665. break;
  1666. case Keys.B:
  1667. break;
  1668. case Keys.Back:
  1669. break;
  1670. case Keys.BrowserBack:
  1671. break;
  1672. case Keys.BrowserFavorites:
  1673. break;
  1674. case Keys.BrowserForward:
  1675. break;
  1676. case Keys.BrowserHome:
  1677. break;
  1678. case Keys.BrowserRefresh:
  1679. break;
  1680. case Keys.BrowserSearch:
  1681. break;
  1682. case Keys.BrowserStop:
  1683. break;
  1684. case Keys.C:
  1685. break;
  1686. case Keys.Cancel:
  1687. break;
  1688. case Keys.Capital:
  1689. break;
  1690. case Keys.Clear:
  1691. break;
  1692. case Keys.Control:
  1693. break;
  1694. case Keys.ControlKey:
  1695. break;
  1696. case Keys.Crsel:
  1697. break;
  1698. case Keys.D:
  1699. break;
  1700. case Keys.D0:
  1701. break;
  1702. case Keys.D1:
  1703. break;
  1704. case Keys.D2:
  1705. break;
  1706. case Keys.D3:
  1707. break;
  1708. case Keys.D4:
  1709. break;
  1710. case Keys.D5:
  1711. break;
  1712. case Keys.D6:
  1713. break;
  1714. case Keys.D7:
  1715. break;
  1716. case Keys.D8:
  1717. break;
  1718. case Keys.D9:
  1719. break;
  1720. case Keys.Decimal:
  1721. break;
  1722. case Keys.Delete:
  1723. break;
  1724. case Keys.Divide:
  1725. break;
  1726. case Keys.Down:
  1727. break;
  1728. case Keys.E:
  1729. break;
  1730. case Keys.End:
  1731. break;
  1732. case Keys.Enter:
  1733. break;
  1734. case Keys.EraseEof:
  1735. break;
  1736. case Keys.Escape:
  1737. break;
  1738. case Keys.Execute:
  1739. break;
  1740. case Keys.Exsel:
  1741. break;
  1742. case Keys.F:
  1743. break;
  1744. case Keys.F1:
  1745. break;
  1746. case Keys.F10:
  1747. break;
  1748. case Keys.F11:
  1749. break;
  1750. case Keys.F12:
  1751. break;
  1752. case Keys.F13:
  1753. break;
  1754. case Keys.F14:
  1755. break;
  1756. case Keys.F15:
  1757. break;
  1758. case Keys.F16:
  1759. break;
  1760. case Keys.F17:
  1761. break;
  1762. case Keys.F18:
  1763. break;
  1764. case Keys.F19:
  1765. break;
  1766. case Keys.F2:
  1767. break;
  1768. case Keys.F20:
  1769. break;
  1770. case Keys.F21:
  1771. break;
  1772. case Keys.F22:
  1773. break;
  1774. case Keys.F23:
  1775. break;
  1776. case Keys.F24:
  1777. break;
  1778. case Keys.F3:
  1779. break;
  1780. case Keys.F4:
  1781. break;
  1782. case Keys.F5:
  1783. break;
  1784. case Keys.F6:
  1785. break;
  1786. case Keys.F7:
  1787. break;
  1788. case Keys.F8:
  1789. break;
  1790. case Keys.F9:
  1791. break;
  1792. case Keys.FinalMode:
  1793. break;
  1794. case Keys.G:
  1795. break;
  1796. case Keys.H:
  1797. break;
  1798. case Keys.HanguelMode:
  1799. break;
  1800. case Keys.HanjaMode:
  1801. break;
  1802. case Keys.Help:
  1803. break;
  1804. case Keys.Home:
  1805. break;
  1806. case Keys.I:
  1807. break;
  1808. case Keys.IMEAccept:
  1809. break;
  1810. case Keys.IMEConvert:
  1811. break;
  1812. case Keys.IMEModeChange:
  1813. break;
  1814. case Keys.IMENonconvert:
  1815. break;
  1816. case Keys.Insert:
  1817. break;
  1818. case Keys.J:
  1819. break;
  1820. case Keys.JunjaMode:
  1821. break;
  1822. case Keys.K:
  1823. break;
  1824. case Keys.KeyCode:
  1825. break;
  1826. case Keys.L:
  1827. break;
  1828. case Keys.LButton:
  1829. break;
  1830. case Keys.LControlKey:
  1831. break;
  1832. case Keys.LMenu:
  1833. break;
  1834. case Keys.LShiftKey:
  1835. break;
  1836. case Keys.LWin:
  1837. break;
  1838. case Keys.LaunchApplication1:
  1839. break;
  1840. case Keys.LaunchApplication2:
  1841. break;
  1842. case Keys.LaunchMail:
  1843. break;
  1844. case Keys.Left:
  1845. break;
  1846. case Keys.LineFeed:
  1847. break;
  1848. case Keys.M:
  1849. break;
  1850. case Keys.MButton:
  1851. break;
  1852. case Keys.MediaNextTrack:
  1853. break;
  1854. case Keys.MediaPlayPause:
  1855. break;
  1856. case Keys.MediaPreviousTrack:
  1857. break;
  1858. case Keys.MediaStop:
  1859. break;
  1860. case Keys.Menu:
  1861. break;
  1862. case Keys.Modifiers:
  1863. break;
  1864. case Keys.Multiply:
  1865. break;
  1866. case Keys.N:
  1867. break;
  1868. case Keys.Next:
  1869. break;
  1870. case Keys.NoName:
  1871. break;
  1872. case Keys.None:
  1873. break;
  1874. case Keys.NumLock:
  1875. break;
  1876. case Keys.NumPad0:
  1877. break;
  1878. case Keys.NumPad1:
  1879. break;
  1880. case Keys.NumPad2:
  1881. break;
  1882. case Keys.NumPad3:
  1883. break;
  1884. case Keys.NumPad4:
  1885. break;
  1886. case Keys.NumPad5:
  1887. break;
  1888. case Keys.NumPad6:
  1889. break;
  1890. case Keys.NumPad7:
  1891. break;
  1892. case Keys.NumPad8:
  1893. break;
  1894. case Keys.NumPad9:
  1895. break;
  1896. case Keys.O:
  1897. if (e.Control) {
  1898. if (menuitemFileOpen.Enabled) {
  1899. _openFile();
  1900. }
  1901. }
  1902. break;
  1903. case Keys.Oem1:
  1904. break;
  1905. case Keys.Oem102:
  1906. break;
  1907. case Keys.Oem2:
  1908. break;
  1909. case Keys.Oem3:
  1910. break;
  1911. case Keys.Oem4:
  1912. break;
  1913. case Keys.Oem5:
  1914. break;
  1915. case Keys.Oem6:
  1916. break;
  1917. case Keys.Oem7:
  1918. break;
  1919. case Keys.Oem8:
  1920. break;
  1921. case Keys.OemClear:
  1922. break;
  1923. case Keys.OemMinus:
  1924. break;
  1925. case Keys.OemPeriod:
  1926. break;
  1927. case Keys.Oemcomma:
  1928. break;
  1929. case Keys.Oemplus:
  1930. break;
  1931. case Keys.P:
  1932. break;
  1933. case Keys.Pa1:
  1934. break;
  1935. case Keys.Packet:
  1936. break;
  1937. case Keys.PageUp:
  1938. break;
  1939. case Keys.Pause:
  1940. break;
  1941. case Keys.Play:
  1942. break;
  1943. case Keys.Print:
  1944. break;
  1945. case Keys.PrintScreen:
  1946. break;
  1947. case Keys.ProcessKey:
  1948. break;
  1949. case Keys.Q:
  1950. break;
  1951. case Keys.R:
  1952. break;
  1953. case Keys.RButton:
  1954. break;
  1955. case Keys.RControlKey:
  1956. break;
  1957. case Keys.RMenu:
  1958. break;
  1959. case Keys.RShiftKey:
  1960. break;
  1961. case Keys.RWin:
  1962. break;
  1963. case Keys.Right:
  1964. break;
  1965. case Keys.S:
  1966. if (e.Control) {
  1967. if (menuitemFileSaveAs.Enabled) {
  1968. _saveAsFile();
  1969. }
  1970. }
  1971. break;
  1972. case Keys.Scroll:
  1973. break;
  1974. case Keys.Select:
  1975. break;
  1976. case Keys.SelectMedia:
  1977. break;
  1978. case Keys.Separator:
  1979. break;
  1980. case Keys.Shift:
  1981. break;
  1982. case Keys.ShiftKey:
  1983. break;
  1984. case Keys.Sleep:
  1985. break;
  1986. case Keys.Space:
  1987. break;
  1988. case Keys.Subtract:
  1989. break;
  1990. case Keys.T:
  1991. break;
  1992. case Keys.Tab:
  1993. break;
  1994. case Keys.U:
  1995. break;
  1996. case Keys.Up:
  1997. break;
  1998. case Keys.V:
  1999. break;
  2000. case Keys.VolumeDown:
  2001. break;
  2002. case Keys.VolumeMute:
  2003. break;
  2004. case Keys.VolumeUp:
  2005. break;
  2006. case Keys.W:
  2007. break;
  2008. case Keys.X:
  2009. break;
  2010. case Keys.XButton1:
  2011. break;
  2012. case Keys.XButton2:
  2013. break;
  2014. case Keys.Y:
  2015. break;
  2016. case Keys.Z:
  2017. break;
  2018. case Keys.Zoom:
  2019. break;
  2020. default:
  2021. break;
  2022. }
  2023. }
  2024.  
  2025. // Settings
  2026.  
  2027. private void picSettings_LocalOperationsSmoothing_Click(object sender, EventArgs e) {
  2028. string name = ((Control)sender).Name;
  2029. RadioButton[] radiobuttons = new RadioButton[] { radiobtnSettings_LocalOperationsSmoothingMedian0, radiobtnSettings_LocalOperationsSmoothingMedian1 };
  2030. radiobuttons[int.Parse(name.Substring(name.Length - 1, 1))].Checked = true;
  2031. }
  2032. private void numSettings_PixelOperationsThreshold_ValueChanged(object sender, EventArgs e) {
  2033. picSettings_PixelOperationsThreshold0.Invalidate(false);
  2034. }
  2035. private void picSettings_PixelOperationsThreshold_Paint(object sender, PaintEventArgs e) {
  2036. Graphics g = e.Graphics;
  2037. 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);
  2038. g.FillRectangle(new Pen(Color.FromArgb(127, 127, 127, 127)).Brush, Rectangle.Round(rect));
  2039. }
  2040. }
  2041. }
Add Comment
Please, Sign In to add comment