otsdataconst.cs 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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. _1536_1024 = 4,
  91. _2048_1408 = 5,
  92. _2048_1536 = 6,
  93. _3072_2048 = 7,
  94. _3072_2112 = 8,
  95. _3072_2304 = 9,
  96. _4096_2816 =10,
  97. _4096_3072 = 11,
  98. _1280_960 = 12
  99. }
  100. public static Size[] RESOLUTION_VALUE
  101. {
  102. get
  103. {
  104. var names = Enum.GetNames(typeof(OTS_IMAGE_RESULOTION_OPTIONS));
  105. var rESOLUTION_VALUE = new Size[names.Length];
  106. int i = 0;
  107. foreach (var itm in names)
  108. {
  109. Size s = new Size();
  110. s.Width =Convert.ToInt32( itm.TrimStart('_').Split('_')[0]);
  111. s.Height = Convert.ToInt32(itm.TrimStart('_').Split('_')[1]);
  112. rESOLUTION_VALUE[i] = s;
  113. i++;
  114. }
  115. return rESOLUTION_VALUE;
  116. }
  117. }
  118. public static string[] RESOLUTION_STRINGS
  119. {
  120. get
  121. {
  122. string[] names = Enum.GetNames(typeof(OTS_IMAGE_RESULOTION_OPTIONS));
  123. foreach (var itm in names)
  124. {
  125. itm.TrimStart('_');
  126. itm.Replace('_', 'X');
  127. }
  128. return names;
  129. }
  130. }
  131. public enum OTS_X_AXIS_DIRECTION
  132. {
  133. LEFT_TOWARD = 0,
  134. RIGHT_TOWARD = 1
  135. }
  136. public enum RunMode
  137. {
  138. ProfessionalMode = 0, //专家模式
  139. PlainMode = 1 //普通模式
  140. }
  141. public enum FrameEndMode
  142. {
  143. FieldParticlePercentage = 0, //颗粒百分比
  144. ParticleNumber = 1 //颗粒数量
  145. }
  146. public enum OTS_AUTOBGREMOVETYPE
  147. {
  148. AUTO = 0,
  149. MANUAL = 1
  150. }
  151. public enum OTS_IMAGE_MODE
  152. {
  153. MIDDLE = 0,
  154. DOWNWARD = 1,
  155. UPWARD = 2
  156. }
  157. public enum OTS_SysType_ID
  158. {
  159. IncA = 0,
  160. TCCleannessA = 1,
  161. BatteryCleannessA=2,
  162. SteelMineral=3
  163. }
  164. public enum OTS_CLASSIFY_ENGINE_TYPE
  165. {
  166. InclustionEngine = 0,
  167. ExpressionParse = 1,
  168. InclutionPlusExpressionParse = 2,
  169. SpectrumMatch = 3
  170. }
  171. public enum OTS_CLASSIFY_ENGINE_TYPE_SteelMineral
  172. {
  173. ExpressionParse = 0,
  174. SpectrumMatch = 1
  175. }
  176. public enum OTS_CLASSIFY_ENGINE_TYPE_Cleanness
  177. {
  178. ExpressionParse = 0
  179. }
  180. public enum OTS_Y_AXIS_DIRECTION
  181. {
  182. UP_TOWARD = 0,
  183. DOWN_TOWARD = 1,
  184. }
  185. public enum OTS_MEASURE_STOP_MODE
  186. {
  187. CoverMode = 0,
  188. ParticleMode = 1,
  189. FieldMode = 2,
  190. TimeMode = 3,
  191. AreaMode=4
  192. }
  193. public enum DOMAIN_SHAPE
  194. {
  195. ROUND = 0,
  196. RECTANGLE = 1,
  197. POLYGON=2
  198. }
  199. public enum OTS_MEASURE_FIELD_STOP_MODE
  200. {
  201. ParticlesPercentage = 0,
  202. Particles = 1,
  203. }
  204. public enum OTS_BGREMOVE_TYPE
  205. {
  206. //MIN = 0,
  207. AUTO = 0,
  208. MANUAL = 1,
  209. MATRIX=2,
  210. WaterShed = 3
  211. }
  212. public enum OTS_AUTOBGREMOVE_TYPE
  213. {
  214. MIDDLE = 0,
  215. DOWNWARD = 1,
  216. UPWARD = 2,
  217. }
  218. public enum OTS_GET_IMAGE_MODE
  219. {
  220. Spiral = 0,
  221. Snake = 1,
  222. Zshape = 2
  223. }
  224. public enum OTS_IMAGE_SCANSPEED_OPTIONS
  225. {
  226. low = 0,//低
  227. meddium = 1,//中
  228. high = 2// 高
  229. }
  230. public enum OTS_X_RAY_SCAN_MODE
  231. {
  232. PointMode = 0,
  233. FeatureMode = 1,
  234. ExpandMode=2
  235. }
  236. public enum OTS_X_RAY_QUANTIFY_MODE
  237. {
  238. Standard = 0,
  239. AutoId = 1,
  240. NoQuantify = 2
  241. }
  242. public enum OTS_MSR_THREAD_STATUS
  243. {
  244. READY = 0,
  245. //MIN = 0,
  246. INPROCESS = 1,
  247. PAUSED=2,
  248. STOPPED = 3,
  249. FAILED = 4,
  250. COMPLETED = 5,
  251. //MAX = 4
  252. }
  253. public enum OTS_THREAD_TIME_TYPE
  254. {
  255. //MIN = 0,
  256. START = 1,
  257. STOPPED = 2,
  258. COMPLT = 3,
  259. //MAX = 3
  260. }
  261. public enum STEEL_TECHNOLOGY
  262. {
  263. GeneralProcessMode = 0,
  264. CaProcessMode = 1,
  265. MgProcessMode = 2,
  266. RareEarthMode = 3
  267. }
  268. public enum MEMBRANE_TYPE
  269. {
  270. INVALID = -1,
  271. MIN = 0,
  272. Abrasive = 0,
  273. Metallic_Gold = 1,
  274. Metallic_Silver = 2,
  275. MAX = 2
  276. }
  277. public enum MEASURE_SHAPE
  278. {
  279. CIRCLE = 0,
  280. RECT = 1
  281. }
  282. // particle type
  283. public enum OTS_PARTICLE_TYPE
  284. {
  285. INVALID = -1,
  286. MIN = 0,
  287. UNCLASSIFY = 0,
  288. OVERSIZE = 1,
  289. AVE_GRAY_NOT_INRANRE = 2,
  290. SEARCH_X_RAY = 3,
  291. LOW_COUNT = 4,
  292. NO_INTEREST_ELEMENTS = 5,
  293. NO_ANALYSIS_X_RAY = 6,
  294. ISNOT_INCLUTION = 7,
  295. NOT_USE = 8,
  296. NOT_IDENTIFIED = 9,
  297. IDENTIFIED = 10,//当为可识别类型时,可以被进一步识别为用户类型(1000以上),系统预定义类型(10000以上),所以最终颗粒类型不会为8,但可能为7
  298. MAX = 10,
  299. }
  300. public enum OTS_USING_X_RAY
  301. {
  302. No = 0,
  303. Yes = 1
  304. }
  305. }
  306. }