|
@@ -2172,7 +2172,7 @@ namespace OTSIMGPROC
|
|
auto newPart = COTSParticlePtr(new COTSParticle());
|
|
auto newPart = COTSParticlePtr(new COTSParticle());
|
|
COTSSegmentsList newSegs;
|
|
COTSSegmentsList newSegs;
|
|
auto p = pair.first;
|
|
auto p = pair.first;
|
|
-
|
|
|
|
|
|
+ newPart->SetAbsolutePos(p->GetAbsolutPos());
|
|
//firstly,we sum up all the merged particles's area and get the represent string.
|
|
//firstly,we sum up all the merged particles's area and get the represent string.
|
|
std::string partsStr = std::to_string(p->GetFieldId()) + ":" + std::to_string(p->GetAnalysisId());
|
|
std::string partsStr = std::to_string(p->GetFieldId()) + ":" + std::to_string(p->GetAnalysisId());
|
|
double allPartArea = p->GetArea();//Get the first particle's area.
|
|
double allPartArea = p->GetArea();//Get the first particle's area.
|
|
@@ -2204,12 +2204,12 @@ namespace OTSIMGPROC
|
|
}
|
|
}
|
|
int fldWidth = allFields[0]->Width;
|
|
int fldWidth = allFields[0]->Width;
|
|
int fldHeight = allFields[0]->Height;
|
|
int fldHeight = allFields[0]->Height;
|
|
- CPoint fldLeftUpPos = CPoint(myFldPos.x + fldWidth / 2 * pixelSize, myFldPos.y + fldHeight / 2 * pixelSize);
|
|
|
|
|
|
+ CPoint fldLeftUpPos = CPoint(myFldPos.x + fldWidth / 2 , myFldPos.y + fldHeight / 2 );
|
|
for (auto s : subp->GetFeature()->GetSegmentsList())
|
|
for (auto s : subp->GetFeature()->GetSegmentsList())
|
|
{
|
|
{
|
|
COTSSegmentPtr newseg = COTSSegmentPtr(new COTSSegment());
|
|
COTSSegmentPtr newseg = COTSSegmentPtr(new COTSSegment());
|
|
- newseg->SetStart(s->GetStart() * pixelSize + fldLeftUpPos.x);
|
|
|
|
- newseg->SetHeight((0 - s->GetHeight() * pixelSize) + fldLeftUpPos.y);//the coordinate system of segment in a field is different with the OTS coordinate system.OTS system's y axis is upward positive ,yet the field is downward positive.
|
|
|
|
|
|
+ newseg->SetStart(s->GetStart() + fldLeftUpPos.x);
|
|
|
|
+ newseg->SetHeight((0 - s->GetHeight()) + fldLeftUpPos.y);//the coordinate system of segment in a field is different with the OTS coordinate system.OTS system's y axis is upward positive ,yet the field is downward positive.
|
|
newseg->SetLength(s->GetLength());
|
|
newseg->SetLength(s->GetLength());
|
|
newSegs.push_back(newseg);
|
|
newSegs.push_back(newseg);
|
|
}
|
|
}
|