|
@@ -248,15 +248,15 @@ namespace OTSGBCalculate
|
|
|
for (auto pParticle : m_listParticles)
|
|
|
{ // compute length width ratio
|
|
|
|
|
|
- CRect rectParticle = pParticle->GetParticleRect();
|
|
|
- //check the denominator is zero or not
|
|
|
- if (rectParticle.Width() == 0)
|
|
|
+ auto w = pParticle->GetDMin();
|
|
|
+
|
|
|
+ if (w == 0)
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
//获取最大长度和最小宽度
|
|
|
double h = pParticle->GetDMax();
|
|
|
- double w = pParticle->GetDMin();
|
|
|
+
|
|
|
double dLengthWidthRatio = h / w;
|
|
|
if (dLengthWidthRatio < 1)
|
|
|
{
|
|
@@ -489,16 +489,16 @@ namespace OTSGBCalculate
|
|
|
for (auto pParticle : m_listParticles)
|
|
|
{
|
|
|
|
|
|
- //IdentifyPartChemicalType(pParticle);
|
|
|
//check the denominator is zero or not
|
|
|
- CRect rectParticle = pParticle->GetParticleRect();
|
|
|
- if (rectParticle.Width() == 0)
|
|
|
+ auto w = pParticle->GetDMin();
|
|
|
+
|
|
|
+ if (w == 0)
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
//获取最小外接矩形的宽和高
|
|
|
double h = pParticle->GetDMax();
|
|
|
- double w = pParticle->GetDMin();
|
|
|
+
|
|
|
double dLengthWidthRatio = h / w;
|
|
|
if (dLengthWidthRatio < 1)
|
|
|
{
|
|
@@ -654,15 +654,15 @@ namespace OTSGBCalculate
|
|
|
for (auto pParticle : m_listParticles)
|
|
|
{ // compute length width ratio
|
|
|
|
|
|
- CRect rectParticle = pParticle->GetParticleRect();
|
|
|
- //check the denominator is zero or not
|
|
|
- if (rectParticle.Width() == 0)
|
|
|
+ auto w = pParticle->GetDMin();
|
|
|
+
|
|
|
+ if (w == 0)
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
//获取最大长度和最小宽度
|
|
|
double h = pParticle->GetDMax();
|
|
|
- double w = pParticle->GetDMin();
|
|
|
+
|
|
|
double dLengthWidthRatio = h / w;
|
|
|
if (dLengthWidthRatio < 1)
|
|
|
{
|