
> imageBatchProcessor 這個是2015a版本才有的影像批次處理工具 (Image Batch Processor) 應用如MRI影像資料, 適合批次處理多張影像(image sequence)來源, 可以省去相關UI開發瑣事 使用者可以指定所要載入的影像序列需要經過哪些影像處理函式


1: using System.Windows.Forms;
2: using System.Runtime.InteropServices;

1: using System;
2: using System.Collections.Generic;
3: using System.Linq;
4: using System.Text;
5: 6: using System.Runtime.InteropServices;
7: namespace MyToolkit
8: { 9: 10: public class IniFileTool
11: {12: public string path;
13: [DllImport("kernel32")]
14: private static extern long WritePrivateProfileString(string section,
15: string key, string val, string filePath);
16: [DllImport("kernel32")]
17: private static extern int GetPrivateProfileString(string section,
18: string key, string def, StringBuilder retVal,
19: int size, string filePath);
20: /// <summary>
21: /// INIFile Constructor.
22: /// </summary>
23: /// <PARAM name="INIPath"></PARAM>
24: public IniFileTool(string INIPath)
25: { 26: path = INIPath; 27: }28: /// <summary>
29: /// Write Data to the INI File
30: /// </summary>
31: /// <PARAM name="Section"></PARAM>
32: /// Section name
33: /// <PARAM name="Key"></PARAM>
34: /// Key Name
35: /// <PARAM name="Value"></PARAM>
36: /// Value Name
37: public void IniWriteValue(string Section, string Key, string Value)
38: {39: WritePrivateProfileString(Section, Key, Value, this.path);
40: } 41: 42: /// <summary>
43: /// Read Data Value From the Ini File
44: /// </summary>
45: /// <PARAM name="Section"></PARAM>
46: /// <PARAM name="Key"></PARAM>
47: /// <PARAM name="Path"></PARAM>
48: /// <returns></returns>
49: public string IniReadValue(string Section, string Key)
50: {51: StringBuilder temp = new StringBuilder(255);
52: int i = GetPrivateProfileString(Section, Key, "", temp,
53: 255, this.path);
54: return temp.ToString();
55: 56: } 57: } 58: }



1: using Microsoft.Win32;


1: delegate int multiply(int x, int y);
2: delegate int timestwo(int x); // [1] 新增一個叫做timestwo的delegate,其輸入個數 = 1, 輸出個數=1
3: 4: timestwo t = delegate(int x) { return 2 * x; }; // 定義一個timestwo變數t, 利用匿名方法初始化之
5: multiply m = delegate(int x, int y) { return x * y; };
6: private void button2_Click(object sender, EventArgs e)
7: { 8: MessageBox.Show(t(5).ToString()); 9: MessageBox.Show( m(5, 6).ToString()); 10: }