123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Drawing;
- namespace OTSDataType
- {
- public class otsdataconst
- {
- // minimum double enter
- public const double MIN_ENTER_VALUE = 0.000001;
- // minimum double value
- public const double MIN_DOUBLE_VALUE = 0.00000000001;
- // MolarRatio
- public const double MOLARRATIO_DEFAULT = 0.0;
- public const double MOLARRATIO_MIN = 0.0;
- public const double MOLARRATIO_MAX = 100.0;
- // percentage
- public const double PERCENTAGE_DEFAULT = 0.0;
- public const double PERCENTAGE_MIN = 0.0;
- public const double PERCENTAGE_MAX = 100.0;
- // atomic number
- public const long ATOMIC_NUMBER_INVALID = -1;
- public const long ATOMIC_NUMBER_MIN = 1;
- public const long ATOMIC_NUMBER_MAX = 103;
- // atomic weight
- public const double ATOMIC_WEIGHT_INVALID = -1.0;
- public const double ATOMIC_WEIGHT_MIN = 1.008;
- public const double ATOMIC_WEIGHT_MAX = 260.00;
- // energy value
- public const double ENERGY_VALUE_INVALID = -1.0;
- // density
- public const double DENSITY_DEFAULT = 0.0;
- // x-ray channel
- public const long GENERALXRAYCHANNELS = 2000;
- //invalid sample hole id
- public const int INVALID_HOLE_ID = -1;
- public const int MAX_PATH = 260;
- public const int IDS_OPEN_STAGE_FILE = 12404;
- public const int IDC_PIC_STAGE = 12018;
- public const String TEXTFILE_FILTER = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||";
- public const char FILE_VALUE_SPLIT = ',';
- public const String FILE_TITLE_SPLIT = ":";
- public const String LINE_END = "\r\n";
- public static int[] DWELLTIME_BRUKER_VALUES = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };
- // IMAGE_RESOLUTION of BRUKER
- public const int RESOLUTION_ID_MIN = 0;
- public const int RESOLUTION_ID_MAX = 7;
- public const int RESOLUTION_ID_DEFAULT = 4;
- public const int RESOLUTION_ID_FIRST_TIE = 0;
- // private 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) };*/
- // private 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" };
- //*/
- // image parameter
- public const int STOP_PARAM_PARTICLE_MIN = 0;
- public const int STOP_PARAM_PARTICLE_MAX = 100000;
- public const int STOP_PARAM_FIELD_MIN = 0;
- public const int STOP_PARAM_FIELD_MAX = 10000;
- public const int STOP_PARAM_MSR_TINE_MIN = 0;
- public const int STOP_PARAM_MSR_TINE_MAX = 10000;
- // image process
- public const int PARTICLE_AREA_MIN = 0;
- public const int PARTICLE_AREA_MAX = 500000;
- public const int GRAY_LEVEL_MIN = 0;
- public const int GRAY_LEVEL_MAX = 255;
- // x-ray parameters
- public const int COUNTS_MIN = 0;
- // magnification
- public const double MAGNIFICATION_MIN = 20.0;
- public const double MAGNIFICATION_MAX = 10000.0;
- // scan field
- public const double SCANFIELDSIZE_MIN = 0.00000001;
- // max pixel size
- public const double RESOLUTION_MIN = 0.1;
- public const double RESOLUTION_MAX = 100.0;
- // avaltomicweight(min avaz)
- public const double AVALTOMICWEIGHT_MIN = 1.0;
- // avaltomicweight(max avaz)
- public const double AVALTOMICWEIGHT_MAX = 272;
- // bulkmod
- public const double BULKMOD_DEFAULT = 1.0;
- // rigiditymod
- public const double RIGIDITYMOD_DEFAULT = 1.0;
- public const int INVALIDPART_GROUPID = -1;
- public const int USR_MODIFY_CLASSIFYID_BASE = 50000;//user modify classify id base, when user manually modify classify id of particles.
- public enum OTS_IMAGE_RESULOTION_OPTIONS
- {
- _512_384 = 0,
- _1024_684 = 1,
- _1024_704 = 2,
- _1024_768 = 3,
- _1536_1024 = 4,
- _2048_1408 = 5,
- _2048_1536 = 6,
- _3072_2048 = 7,
- _3072_2112 = 8,
- _3072_2304 = 9,
- _4096_2816 =10,
- _4096_3072 = 11,
- _1280_960 = 12
- }
- public static Size[] RESOLUTION_VALUE
- {
- get
- {
- var names = Enum.GetNames(typeof(OTS_IMAGE_RESULOTION_OPTIONS));
- var rESOLUTION_VALUE = new Size[names.Length];
- int i = 0;
- foreach (var itm in names)
- {
- Size s = new Size();
- s.Width =Convert.ToInt32( itm.TrimStart('_').Split('_')[0]);
- s.Height = Convert.ToInt32(itm.TrimStart('_').Split('_')[1]);
- rESOLUTION_VALUE[i] = s;
- i++;
- }
- return rESOLUTION_VALUE;
- }
- }
- public static string[] RESOLUTION_STRINGS
- {
- get
- {
- string[] names = Enum.GetNames(typeof(OTS_IMAGE_RESULOTION_OPTIONS));
- foreach (var itm in names)
- {
- itm.TrimStart('_');
- itm.Replace('_', 'X');
-
- }
- return names;
- }
- }
- public enum OTS_X_AXIS_DIRECTION
- {
- LEFT_TOWARD = 0,
- RIGHT_TOWARD = 1
- }
- public enum RunMode
- {
- ProfessionalMode = 0, //专家模式
- PlainMode = 1 //普通模式
- }
- public enum FrameEndMode
- {
- FieldParticlePercentage = 0, //颗粒百分比
- ParticleNumber = 1 //颗粒数量
- }
- public enum OTS_AUTOBGREMOVETYPE
- {
- AUTO = 0,
- MANUAL = 1
- }
- public enum OTS_IMAGE_MODE
- {
- MIDDLE = 0,
- DOWNWARD = 1,
- UPWARD = 2
- }
- public enum OTS_SysType_ID
- {
- IncA = 0,
- TCCleannessA = 1,
- BatteryCleannessA=2
- }
- public enum OTS_CLASSIFY_ENGINE_TYPE
- {
- InclustionEngine = 0,
- ExpressionParse = 1,
- InclutionPlusExpressionParse = 2,
- SpectrumMatch = 3
- }
-
- public enum OTS_Y_AXIS_DIRECTION
- {
- UP_TOWARD = 0,
- DOWN_TOWARD = 1,
- }
- public enum OTS_MEASURE_STOP_MODE
- {
- CoverMode = 0,
- ParticleMode = 1,
- FieldMode = 2,
- TimeMode = 3,
- AreaMode=4
- }
- public enum DOMAIN_SHAPE
- {
-
- ROUND = 0,
-
- RECTANGLE = 1,
- POLYGON=2
-
- }
- public enum OTS_MEASURE_FIELD_STOP_MODE
- {
-
-
- ParticlesPercentage = 0,
- Particles = 1,
-
- }
- public enum OTS_BGREMOVE_TYPE
- {
-
- //MIN = 0,
- AUTO = 0,
- MANUAL = 1,
- MATRIX=2,
- WaterShed = 3
- }
- public enum OTS_AUTOBGREMOVE_TYPE
- {
-
-
- MIDDLE = 0,
- DOWNWARD = 1,
- UPWARD = 2,
-
- }
- public enum OTS_GET_IMAGE_MODE
- {
- Spiral = 0,
- Snake = 1,
- Zshape = 2
- }
- public enum OTS_IMAGE_SCANSPEED_OPTIONS
- {
- low = 0,//低
- meddium = 1,//中
- high = 2// 高
- }
-
- public enum OTS_X_RAY_SCAN_MODE
- {
- PointMode = 0,
- FeatureMode = 1,
- ExpandMode=2
-
- }
- public enum OTS_X_RAY_QUANTIFY_MODE
- {
- Standard = 0,
- AutoId = 1,
- NoQuantify = 2
- }
- public enum OTS_MSR_THREAD_STATUS
- {
- READY = 0,
- //MIN = 0,
- INPROCESS = 1,
- PAUSED=2,
- STOPPED = 3,
- FAILED = 4,
- COMPLETED = 5,
- //MAX = 4
- }
-
- public enum OTS_THREAD_TIME_TYPE
- {
- //MIN = 0,
- START = 1,
- STOPPED = 2,
- COMPLT = 3,
- //MAX = 3
- }
- public enum STEEL_TECHNOLOGY
- {
- GeneralProcessMode = 0,
- CaProcessMode = 1,
- MgProcessMode = 2,
- RareEarthMode = 3
- }
- public enum MEMBRANE_TYPE
- {
- INVALID = -1,
- MIN = 0,
- Abrasive = 0,
- Metallic_Gold = 1,
- Metallic_Silver = 2,
- MAX = 2
- }
- public enum MEASURE_SHAPE
- {
- CIRCLE = 0,
- RECT = 1
- }
- // particle type
- public enum OTS_PARTICLE_TYPE
- {
- INVALID = -1,
- MIN = 0,
- UNCLASSIFY = 0,
- OVERSIZE = 1,
- AVE_GRAY_NOT_INRANRE = 2,
- SEARCH_X_RAY = 3,
- LOW_COUNT = 4,
- NO_INTEREST_ELEMENTS = 5,
- NO_ANALYSIS_X_RAY = 6,
- ISNOT_INCLUTION = 7,
- NOT_USE = 8,
- NOT_IDENTIFIED = 9,
- IDENTIFIED = 10,//当为可识别类型时,可以被进一步识别为用户类型(1000以上),系统预定义类型(10000以上),所以最终颗粒类型不会为8,但可能为7
- MAX = 10,
- }
-
- public enum OTS_USING_X_RAY
- {
- No = 0,
- Yes = 1
- }
- }
- }
|