Procházet zdrojové kódy

optimize the RemoveBGAndGetParts method logic.

gsp před 1 rokem
rodič
revize
fad5e4f156

+ 7 - 4
OTSIncAMeasureApp/ServiceCenter/CImageHandler.cs

@@ -228,7 +228,9 @@ namespace OTSModelSharp.ServiceCenter
             {
                 return;
             }
-
+            tempFld.CalParticleImageProp(parts);
+            tempFld.SelectParticlesAccordingImgProp(a_pImgProcessParam);
+            parts = tempFld.GetListAnalysisParticles();
             if (a_pImgProcessParam.GetSpecialGreyRangeParam().GetIsToRun())
             {
                 var param = a_pImgProcessParam.GetSpecialGreyRangeParam();
@@ -309,7 +311,9 @@ namespace OTSModelSharp.ServiceCenter
             {
                 return;
             }
-
+            tempFld.CalParticleImageProp(parts);
+            tempFld.SelectParticlesAccordingImgProp(a_pImgProcessParam);
+            parts = tempFld.GetListAnalysisParticles();
             if (a_pImgProcessParam.GetSpecialGreyRangeParam().GetIsToRun())
             {
                 var param = a_pImgProcessParam.GetSpecialGreyRangeParam();
@@ -556,8 +560,7 @@ namespace OTSModelSharp.ServiceCenter
             //currentField.FilterParticles(m_Sample.GetMsrParams().GetXRayParam());//filter according to the xraylimit
            
             currentField.SetListAnalysisParticles(parts);
-            currentField.CalParticleImageProp(parts);
-            currentField.SelectParticlesAccordingImgProp(a_pImgProcessParam);
+          
             parts = currentField.GetListAnalysisParticles();
             return true;
 

+ 1 - 1
OTSIncAReportApp/1-UI/Control_Graph/Controls/OutPIC.cs

@@ -353,7 +353,7 @@ namespace OTSIncAReportApp._3_ServiceCenter
                 list_pano.Add(pano);
             }
 
-            for (int i = 0; i < list_pano.Count; i++)
+            for (int i = 0; i < list_mats.Length; i++)
             {
                 list_mats[i] = list_pano[i];
             }