|
@@ -114,7 +114,10 @@ namespace OTSModelSharp.ServiceInterface
|
|
|
|
|
|
List<COTSParticleClr> parts = new List<COTSParticleClr>();
|
|
|
List<COTSParticleClr> specialGreyparts = new List<COTSParticleClr>();
|
|
|
- RemoveBGAndGetParts(a_pImgIn, a_pImgProcessParam, a_pixelSize,ref parts);
|
|
|
+ if (!RemoveBGAndGetParts(a_pImgIn, a_pImgProcessParam, a_pixelSize, ref parts))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
if (a_pImgProcessParam.SpecialGreyRangeParam.GetIsToRun())
|
|
|
{
|
|
@@ -207,7 +210,10 @@ namespace OTSModelSharp.ServiceInterface
|
|
|
|
|
|
OTSCLRINTERFACE.COTSImgProcPrmClr prm = GetImageProcPrmClr(a_pImgProcessParam);
|
|
|
OTSCLRINTERFACE.COTSFieldDataClr flddataclr = new OTSCLRINTERFACE.COTSFieldDataClr();
|
|
|
- imgpro.GetFieldDataFromImage(img, prm, a_pixelSize, flddataclr);
|
|
|
+ if (!imgpro.GetFieldDataFromImage(img, prm, a_pixelSize, flddataclr))
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
parts = flddataclr.GetParticleList();
|
|
|
return true;
|