|
@@ -1365,18 +1365,23 @@ namespace OTSIMGPROC
|
|
|
}
|
|
|
COTSParticleList roiParts;
|
|
|
|
|
|
- GetOneParticleFromROI(rectMax.x, rectMax.y, rectMax.width, rectMax.height, imageROI.data, roiParts);
|
|
|
- if (roiParts.size()>0)
|
|
|
+ if (GetOneParticleFromROI(rectMax.x, rectMax.y, rectMax.width, rectMax.height, imageROI.data, roiParts))
|
|
|
{
|
|
|
- COTSParticlePtr roiPart = roiParts[0];//we will find only one part in the roi.
|
|
|
- roiPart->SetXRayPos(CPoint(center_x, center_y));
|
|
|
- CRect r = CRect(x, y, x + w, y + h);
|
|
|
- roiPart->SetParticleRect(r);
|
|
|
- roiPart->SetActualArea(actualArea);
|
|
|
- roiPart->SetPixelArea(area);
|
|
|
- listParticleOut.push_back(roiPart);
|
|
|
+ if (roiParts.size() > 0)
|
|
|
+ {
|
|
|
+ COTSParticlePtr roiPart = roiParts[0];//we will find only one part in the roi.
|
|
|
+ roiPart->SetXRayPos(CPoint(center_x, center_y));
|
|
|
+ CRect r = CRect(x, y, x + w, y + h);
|
|
|
+ roiPart->SetParticleRect(r);
|
|
|
+ roiPart->SetActualArea(actualArea);
|
|
|
+ roiPart->SetPixelArea(area);
|
|
|
+ listParticleOut.push_back(roiPart);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|