otsdataconst.cs 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Drawing;
  7. namespace OTSDataType
  8. {
  9. public class otsdataconst
  10. {
  11. // minimum double enter
  12. public const double MIN_ENTER_VALUE = 0.000001;
  13. // minimum double value
  14. public const double MIN_DOUBLE_VALUE = 0.00000000001;
  15. // MolarRatio
  16. public const double MOLARRATIO_DEFAULT = 0.0;
  17. public const double MOLARRATIO_MIN = 0.0;
  18. public const double MOLARRATIO_MAX = 100.0;
  19. // percentage
  20. public const double PERCENTAGE_DEFAULT = 0.0;
  21. public const double PERCENTAGE_MIN = 0.0;
  22. public const double PERCENTAGE_MAX = 100.0;
  23. // atomic number
  24. public const long ATOMIC_NUMBER_INVALID = -1;
  25. public const long ATOMIC_NUMBER_MIN = 1;
  26. public const long ATOMIC_NUMBER_MAX = 103;
  27. // atomic weight
  28. public const double ATOMIC_WEIGHT_INVALID = -1.0;
  29. public const double ATOMIC_WEIGHT_MIN = 1.008;
  30. public const double ATOMIC_WEIGHT_MAX = 260.00;
  31. // energy value
  32. public const double ENERGY_VALUE_INVALID = -1.0;
  33. // density
  34. public const double DENSITY_DEFAULT = 0.0;
  35. // x-ray channel
  36. public const long GENERALXRAYCHANNELS = 2000;
  37. //invalid sample hole id
  38. public const int INVALID_HOLE_ID = -1;
  39. public const int MAX_PATH = 260;
  40. public const int IDS_OPEN_STAGE_FILE = 12404;
  41. public const int IDC_PIC_STAGE = 12018;
  42. public const String TEXTFILE_FILTER = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||";
  43. public const char FILE_VALUE_SPLIT = ',';
  44. public const String FILE_TITLE_SPLIT = ":";
  45. public const String LINE_END = "\r\n";
  46. public static int[] DWELLTIME_BRUKER_VALUES = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };
  47. // IMAGE_RESOLUTION of BRUKER
  48. public const int RESOLUTION_ID_MIN = 0;
  49. public const int RESOLUTION_ID_MAX = 7;
  50. public const int RESOLUTION_ID_DEFAULT = 4;
  51. public const int RESOLUTION_ID_FIRST_TIE = 0;
  52. // image parameter
  53. public const int STOP_PARAM_PARTICLE_MIN = 0;
  54. public const int STOP_PARAM_PARTICLE_MAX = 100000;
  55. public const int STOP_PARAM_FIELD_MIN = 0;
  56. public const int STOP_PARAM_FIELD_MAX = 10000;
  57. public const int STOP_PARAM_MSR_TINE_MIN = 0;
  58. public const int STOP_PARAM_MSR_TINE_MAX = 10000;
  59. // image process
  60. public const int PARTICLE_AREA_MIN = 0;
  61. public const int PARTICLE_AREA_MAX = 500000;
  62. public const int GRAY_LEVEL_MIN = 0;
  63. public const int GRAY_LEVEL_MAX = 255;
  64. // x-ray parameters
  65. public const int COUNTS_MIN = 0;
  66. // magnification
  67. public const double MAGNIFICATION_MIN = 20.0;
  68. public const double MAGNIFICATION_MAX = 10000.0;
  69. // scan field
  70. public const double SCANFIELDSIZE_MIN = 0.00000001;
  71. // max pixel size
  72. public const double RESOLUTION_MIN = 0.1;
  73. public const double RESOLUTION_MAX = 100.0;
  74. // avaltomicweight(min avaz)
  75. public const double AVALTOMICWEIGHT_MIN = 1.0;
  76. // avaltomicweight(max avaz)
  77. public const double AVALTOMICWEIGHT_MAX = 272;
  78. // bulkmod
  79. public const double BULKMOD_DEFAULT = 1.0;
  80. // rigiditymod
  81. public const double RIGIDITYMOD_DEFAULT = 1.0;
  82. public const int INVALIDPART_GROUPID = -1;
  83. public const int USR_MODIFY_CLASSIFYID_BASE = 50000;//user modify classify id base, when user manually modify classify id of particles.
  84. public enum OTS_IMAGE_RESULOTION_OPTIONS
  85. {
  86. _512_384 = 0,
  87. _1024_684 = 1,
  88. _1024_704 = 2,
  89. _1024_768 = 3,
  90. _768_512 = 4,
  91. _1536_1024 = 5,
  92. _2048_1408 = 6,
  93. _2048_1536 = 7,
  94. _3072_2048 = 8,
  95. _3072_2112 = 9,
  96. _3072_2304 = 10,
  97. _4096_2816 =11,
  98. _4096_3072 = 12,
  99. _1280_960 = 13
  100. }
  101. public static Size[] RESOLUTION_VALUE
  102. {
  103. get
  104. {
  105. var names = Enum.GetNames(typeof(OTS_IMAGE_RESULOTION_OPTIONS));
  106. var rESOLUTION_VALUE = new Size[names.Length];
  107. int i = 0;
  108. foreach (var itm in names)
  109. {
  110. Size s = new Size();
  111. s.Width =Convert.ToInt32( itm.TrimStart('_').Split('_')[0]);
  112. s.Height = Convert.ToInt32(itm.TrimStart('_').Split('_')[1]);
  113. rESOLUTION_VALUE[i] = s;
  114. i++;
  115. }
  116. return rESOLUTION_VALUE;
  117. }
  118. }
  119. public static string[] RESOLUTION_STRINGS
  120. {
  121. get
  122. {
  123. string[] names = Enum.GetNames(typeof(OTS_IMAGE_RESULOTION_OPTIONS));
  124. foreach (var itm in names)
  125. {
  126. itm.TrimStart('_');
  127. itm.Replace('_', 'X');
  128. }
  129. return names;
  130. }
  131. }
  132. public enum OTS_X_AXIS_DIRECTION
  133. {
  134. LEFT_TOWARD = 0,
  135. RIGHT_TOWARD = 1
  136. }
  137. public enum RunMode
  138. {
  139. ProfessionalMode = 0, //专家模式
  140. PlainMode = 1 //普通模式
  141. }
  142. public enum FrameEndMode
  143. {
  144. FieldParticlePercentage = 0, //颗粒百分比
  145. ParticleNumber = 1 //颗粒数量
  146. }
  147. public enum OTS_AUTOBGREMOVETYPE
  148. {
  149. AUTO = 0,
  150. MANUAL = 1
  151. }
  152. public enum OTS_IMAGE_MODE
  153. {
  154. MIDDLE = 0,
  155. DOWNWARD = 1,
  156. UPWARD = 2
  157. }
  158. public enum OTS_SysType_ID
  159. {
  160. IncA = 0,
  161. TCCleannessA = 1,
  162. BatteryCleannessA=2,
  163. SteelMineral=3
  164. }
  165. public enum OTS_CLASSIFY_ENGINE_TYPE
  166. {
  167. InclustionEngine = 0,
  168. ExpressionParse = 1,
  169. InclutionPlusExpressionParse = 2,
  170. SpectrumMatch = 3
  171. }
  172. public enum OTS_CLASSIFY_ENGINE_TYPE_SteelMineral
  173. {
  174. ExpressionParse = 0,
  175. SpectrumMatch = 1
  176. }
  177. public enum OTS_CLASSIFY_ENGINE_TYPE_Cleanness
  178. {
  179. ExpressionParse = 0
  180. }
  181. public enum OTS_Y_AXIS_DIRECTION
  182. {
  183. UP_TOWARD = 0,
  184. DOWN_TOWARD = 1,
  185. }
  186. public enum OTS_MEASURE_STOP_MODE
  187. {
  188. CoverMode = 0,
  189. ParticleMode = 1,
  190. FieldMode = 2,
  191. TimeMode = 3,
  192. AreaMode=4
  193. }
  194. public enum DOMAIN_SHAPE
  195. {
  196. ROUND = 0,
  197. RECTANGLE = 1,
  198. POLYGON=2
  199. }
  200. public enum OTS_MEASURE_FIELD_STOP_MODE
  201. {
  202. ParticlesPercentage = 0,
  203. Particles = 1,
  204. }
  205. public enum OTS_BGREMOVE_TYPE
  206. {
  207. //MIN = 0,
  208. AUTO = 0,
  209. MANUAL = 1,
  210. MATRIX=2,
  211. WaterShed = 3
  212. }
  213. public enum OTS_AUTOBGREMOVE_TYPE
  214. {
  215. MIDDLE = 0,
  216. DOWNWARD = 1,
  217. UPWARD = 2,
  218. }
  219. public enum OTS_GET_IMAGE_MODE
  220. {
  221. Spiral = 0,
  222. Snake = 1,
  223. Zshape = 2
  224. }
  225. public enum OTS_FIELD_DISTRIBUTION_MODE
  226. {
  227. Normal = 0,
  228. Cover = 1,
  229. Internal = 2
  230. }
  231. public enum OTS_IMAGE_SCANSPEED_OPTIONS
  232. {
  233. low = 0,//低
  234. meddium = 1,//中
  235. high = 2// 高
  236. }
  237. public enum OTS_X_RAY_SCAN_MODE
  238. {
  239. PointMode = 0,
  240. FeatureMode = 1,
  241. ExpandMode=2,
  242. SubRegionMode= 3
  243. }
  244. public enum OTS_X_RAY_QUANTIFY_MODE
  245. {
  246. Standard = 0,
  247. AutoId = 1,
  248. NoQuantify = 2
  249. }
  250. public enum OTS_MSR_THREAD_STATUS
  251. {
  252. READY = 0,
  253. //MIN = 0,
  254. INPROCESS = 1,
  255. PAUSED=2,
  256. STOPPED = 3,
  257. FAILED = 4,
  258. COMPLETED = 5,
  259. //MAX = 4
  260. }
  261. public enum OTS_THREAD_TIME_TYPE
  262. {
  263. //MIN = 0,
  264. START = 1,
  265. STOPPED = 2,
  266. COMPLT = 3,
  267. //MAX = 3
  268. }
  269. public enum STEEL_TECHNOLOGY
  270. {
  271. GeneralProcessMode = 0,
  272. CaProcessMode = 1,
  273. MgProcessMode = 2,
  274. RareEarthMode = 3
  275. }
  276. public enum MEMBRANE_TYPE
  277. {
  278. INVALID = -1,
  279. MIN = 0,
  280. Abrasive = 0,
  281. Metallic_Gold = 1,
  282. Metallic_Silver = 2,
  283. MAX = 2
  284. }
  285. public enum MEASURE_SHAPE
  286. {
  287. CIRCLE = 0,
  288. RECT = 1
  289. }
  290. // particle type
  291. public enum OTS_PARTICLE_TYPE
  292. {
  293. INVALID = -1,
  294. MIN = 0,
  295. UNCLASSIFY = 0,
  296. OVERSIZE = 1,
  297. AVE_GRAY_NOT_INRANRE = 2,
  298. SEARCH_X_RAY = 3,
  299. LOW_COUNT = 4,
  300. NO_INTEREST_ELEMENTS = 5,
  301. NO_ANALYSIS_X_RAY = 6,
  302. ISNOT_INCLUTION = 7,
  303. NOT_USE = 8,
  304. NOT_IDENTIFIED = 9,
  305. IDENTIFIED = 10,//当为可识别类型时,可以被进一步识别为用户类型(1000以上),系统预定义类型(10000以上),所以最终颗粒类型不会为8,但可能为7
  306. MAX = 10,
  307. }
  308. public enum OTS_USING_X_RAY
  309. {
  310. No = 0,
  311. Yes = 1
  312. }
  313. }
  314. }