소스 검색

check if the key is exist before read it.especially when the key is altered or added after the first edit.

GSP 1 주 전
부모
커밋
71b117ee1b

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSProgMgrParam.pmf

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData RunMode="ProfessionalMode" SysType="IncA">
+<XMLData RunMode="ProfessionalMode" SysType="TCCleannessA">
   <Member RegName="BrightnessContrastRegulateParam" AutoRegulateType="EveryPeriod" BrightPhaseElement="Al" BrightPhaseValue="124" DarkPhaseElement="C" DarkPhaseValue="11" InitialBrightness="45.53382111" InitialContrast="60.21995716" mag="100" Period="5" StdMaterialOTSPos="41475,-4357" ToRun="false" />
   <Member RegName="GenParam" DefaultArea="1450" DefaultSampleName="Sample" DefaultShape="0" EngineType="1:ExpressionParse" MeasParamFileFolderName=".\Config\ProData\" MeasSwitch="true" PartSTDLibFolderName=".\Config\SysData\" PropertyDisplayMode="0" StdLibFileName="zz" SteelTechnology="0" />
   <Member RegName="ImageProcParam" AutoBGRemoveType="0:MIDDLE" BGRemoveType="1:MANUAL" MatrixStep="0" OverlapParam="0" ParticleSelectionCondition="">

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSReportMgrParam.rpf

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData systype="IncA">
+<XMLData systype="TCCleannessA">
   <Member RegName="Scale" strValue="1000" />
   <Member RegName="DefaultComputedColName" strValue="ParticleCoordinate,Area,EquivalentCircleDiameter,MaxDiameter,MinDiameter,DiameterRatio,FerretDiameter,PERP,PERI,INSCR,MEAN,ELONG,ASPECT_ELONG,Orientation,XRayDataCount" />
   <Member RegName="ElementsColName" strValue="C,O,Al,Fe,F,Ti,Na,Mn,Mg" />

+ 3 - 3
OTSCPP/OTSImagePro/OTSImageProcess.cpp

@@ -1856,10 +1856,10 @@ namespace OTSIMGPROC
 
 		a_pOTSPart->SetDInscr(r * 2 * a_PixelSize);
 		//---------------calculate the image other caracater: length/width  realArea/minRectangeArea etc. we can use these propertes to do forward process.
-		double minRectArea = D_MIN * D_MinRecLen*a_PixelSize*a_PixelSize;//��С��Ӿ������
-		double fillRatio = a_pOTSPart->GetActualArea() / minRectArea;//ʵ���������С��Ӿ��������,that's the fill rate.
+		double minRectArea = D_MIN * D_MinRecLen*a_PixelSize*a_PixelSize;
+		double fillRatio = a_pOTSPart->GetActualArea() / minRectArea;//that's the fill rate.
 		double lengthWidthRatio;
-		lengthWidthRatio = (double)D_MinRecLen / D_MIN;//�����
+		lengthWidthRatio = (double)D_MinRecLen / D_MIN;
 
 	
 		 //decide if this shape is a strip shape :if the lenthWidthRatio>2 then it is. if the lengthWidthRatio<2 and  the areaRatio<0.5 then it is.

+ 5 - 1
OTSIncAReportApp/1-UI/Control_Grids/ResultGrid.cs

@@ -166,7 +166,11 @@ namespace OTSIncAReportGrids
             keyValues.Add(table["col3"].ToString(), end.ToString("yyyy-MM-dd HH:mm:ss"));
             keyValues.Add(table["col4"].ToString(), Math.Round(timeSpan.TotalMinutes, 2).ToString() + "mins");
             keyValues.Add(table["col5"].ToString(), filedCount.ToString());
-            keyValues.Add(table["col20"].ToString(), Math.Round(filedsAreadetected/ 1000000, 1).ToString());
+            if (table.ContainsKey("col20"))
+            {
+                keyValues.Add(table["col20"].ToString(), Math.Round(filedsAreadetected / 1000000, 1).ToString());
+
+            }
             keyValues.Add(table["col12"].ToString(), Math.Round(Magnification, 2).ToString());
 			string LibraryName = "";