otsdataconst.cs 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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. public static readonly Size[] RESOLUTION_VALUE = { new Size(512, 384), new Size(1024, 684), new Size(1024, 704), new Size(1024, 768), new Size(1536, 1024), new Size(2048, 1408),new Size(2048,1416), new Size(2048, 1536), new Size(3072, 2048),new Size(4096, 3072) };
  53. public static readonly string[] RESOLUTION_STRINGS = { "512 X 384", "1024 X 684", "1024 X 704", "1024 X 768", "1536 X 1024", "2048 X 1408", "2048 X 1416" , "2048 X 1536", "3072 X 2048", "4096 X 3072" };
  54. // image parameter
  55. public const int STOP_PARAM_PARTICLE_MIN = 0;
  56. public const int STOP_PARAM_PARTICLE_MAX = 100000;
  57. public const int STOP_PARAM_FIELD_MIN = 0;
  58. public const int STOP_PARAM_FIELD_MAX = 10000;
  59. public const int STOP_PARAM_MSR_TINE_MIN = 0;
  60. public const int STOP_PARAM_MSR_TINE_MAX = 10000;
  61. // image process
  62. public const int PARTICLE_AREA_MIN = 0;
  63. public const int PARTICLE_AREA_MAX = 500000;
  64. public const int GRAY_LEVEL_MIN = 0;
  65. public const int GRAY_LEVEL_MAX = 255;
  66. // x-ray parameters
  67. public const int COUNTS_MIN = 0;
  68. // magnification
  69. public const double MAGNIFICATION_MIN = 20.0;
  70. public const double MAGNIFICATION_MAX = 10000.0;
  71. // scan field
  72. public const double SCANFIELDSIZE_MIN = 0.00000001;
  73. // max pixel size
  74. public const double RESOLUTION_MIN = 0.1;
  75. public const double RESOLUTION_MAX = 100.0;
  76. // avaltomicweight(min avaz)
  77. public const double AVALTOMICWEIGHT_MIN = 1.0;
  78. // avaltomicweight(max avaz)
  79. public const double AVALTOMICWEIGHT_MAX = 272;
  80. // bulkmod
  81. public const double BULKMOD_DEFAULT = 1.0;
  82. // rigiditymod
  83. public const double RIGIDITYMOD_DEFAULT = 1.0;
  84. public const int INVALIDPART_GROUPID = -1;
  85. public enum OTS_X_AXIS_DIRECTION
  86. {
  87. LEFT_TOWARD = 0,
  88. RIGHT_TOWARD = 1
  89. }
  90. public enum RunMode
  91. {
  92. ProfessionalMode = 0, //专家模式
  93. PlainMode = 1 //普通模式
  94. }
  95. public enum FrameEndMode
  96. {
  97. FieldParticlePercentage = 0, //颗粒百分比
  98. ParticleNumber = 1 //颗粒数量
  99. }
  100. public enum OTS_AUTOBGREMOVETYPE
  101. {
  102. AUTO = 0,
  103. MANUAL = 1
  104. }
  105. public enum OTS_IMAGE_MODE
  106. {
  107. MIDDLE = 0,
  108. DOWNWARD = 1,
  109. UPWARD = 2
  110. }
  111. public enum OTS_SysType_ID
  112. {
  113. IncA = 0,
  114. CleannessA = 1,
  115. //MiningA=2
  116. }
  117. public enum OTS_Y_AXIS_DIRECTION
  118. {
  119. UP_TOWARD = 0,
  120. DOWN_TOWARD = 1,
  121. }
  122. public enum OTS_MEASURE_STOP_MODE
  123. {
  124. CoverMode = 0,
  125. ParticleMode = 1,
  126. FieldMode = 2,
  127. TimeMode = 3,
  128. AreaMode=4
  129. }
  130. public enum DOMAIN_SHAPE
  131. {
  132. ROUND = 0,
  133. RECTANGLE = 1,
  134. POLYGON=15
  135. }
  136. public enum OTS_MEASURE_FIELD_STOP_MODE
  137. {
  138. ParticlesPercentage = 0,
  139. Particles = 1,
  140. }
  141. public enum OTS_BGREMOVE_TYPE
  142. {
  143. //MIN = 0,
  144. AUTO = 0,
  145. MANUAL = 1,
  146. }
  147. public enum OTS_AUTOBGREMOVE_TYPE
  148. {
  149. MIDDLE = 0,
  150. DOWNWARD = 1,
  151. UPWARD = 2,
  152. }
  153. public enum OTS_GET_IMAGE_MODE
  154. {
  155. Spiral = 0,
  156. Snake = 1,
  157. Zshape = 2
  158. //RANDOM = 3
  159. }
  160. public enum OTS_IMAGE_SCANSPEED_OPTIONS
  161. {
  162. low = 0,//低
  163. meddium = 1,//中
  164. high = 2// 高
  165. }
  166. public enum OTS_IMAGE_RESULOTION_OPTIONS
  167. {
  168. _512_384 = 0,
  169. _1024_684 = 1,
  170. _1024_704 = 2,
  171. _1024_768 = 3,
  172. _1536_1024 = 4,
  173. _2048_1408 = 5,
  174. _2048_1416 = 6,
  175. _2048_1536 = 7,
  176. _3072_2048= 8,
  177. _4096_3072 = 9
  178. }
  179. public enum OTS_X_RAY_SCAN_MODE
  180. {
  181. PointMode = 0,
  182. FeatureMode = 1,
  183. }
  184. public enum OTS_MSR_THREAD_STATUS
  185. {
  186. READY = 0,
  187. //MIN = 0,
  188. INPROCESS = 1,
  189. PAUSED=2,
  190. STOPPED = 3,
  191. FAILED = 4,
  192. COMPLETED = 5,
  193. //MAX = 4
  194. }
  195. public enum OTS_THREAD_TIME_TYPE
  196. {
  197. //MIN = 0,
  198. START = 1,
  199. STOPPED = 2,
  200. COMPLT = 3,
  201. //MAX = 3
  202. }
  203. public enum STEEL_TECHNOLOGY
  204. {
  205. GeneralProcessMode = 0,
  206. CaProcessMode = 1,
  207. MgProcessMode = 2,
  208. RareEarthMode = 3
  209. }
  210. public enum MEMBRANE_TYPE
  211. {
  212. INVALID = -1,
  213. MIN = 0,
  214. Abrasive = 0,
  215. Metallic_Gold = 1,
  216. Metallic_Silver = 2,
  217. MAX = 2
  218. }
  219. public enum MEASURE_SHAPE
  220. {
  221. CIRCLE = 0,
  222. RECT = 1
  223. }
  224. // particle type
  225. public enum OTS_PARTICLE_TYPE
  226. {
  227. INVALID = -1,
  228. MIN = 0,
  229. UNCLASSIFY = 0,
  230. OVERSIZE = 1,
  231. AVE_GRAY_NOT_INRANRE = 2,
  232. SEARCH_X_RAY = 3,
  233. LOW_COUNT = 4,
  234. NO_INTEREST_ELEMENTS = 5,
  235. NO_ANALYSIS_X_RAY = 6,
  236. ISNOT_INCLUTION = 7,
  237. NOT_USE = 8,
  238. NOT_IDENTIFIED = 9,
  239. IDENTIFIED = 10,//当为可识别类型时,可以被进一步识别为用户类型(1000以上),系统预定义类型(10000以上),所以最终颗粒类型不会为8,但可能为7
  240. MAX = 10,
  241. }
  242. public enum OTS_USING_X_RAY
  243. {
  244. No = 0,
  245. Yes = 1
  246. }
  247. }
  248. }