|
@@ -2637,19 +2637,27 @@ namespace OTSIMGPROC
|
|
|
std::map<std::string, std::vector<EleAreaPercentage>> mapEleData;
|
|
|
|
|
|
CPosXrayPtr pXray1 = p->GetXrayInfo();
|
|
|
- for (auto ele : pXray1->GetElementQuantifyData())
|
|
|
+ if (pXray1 != nullptr)
|
|
|
{
|
|
|
- mapEleData[ele->GetName().GetBuffer()].push_back(EleAreaPercentage(p->GetArea() / allPartArea, ele));
|
|
|
+ for (auto ele : pXray1->GetElementQuantifyData())
|
|
|
+ {
|
|
|
+ mapEleData[ele->GetName().GetBuffer()].push_back(EleAreaPercentage(p->GetArea() / allPartArea, ele));
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
|
|
|
for (auto other : pair.second)
|
|
|
{
|
|
|
auto otherXray = other->GetXrayInfo();
|
|
|
- for (auto eledata : otherXray->GetElementQuantifyData())
|
|
|
+ if (otherXray != nullptr)
|
|
|
{
|
|
|
- mapEleData[eledata->GetName().GetBuffer()].push_back(EleAreaPercentage(other->GetArea() / allPartArea, eledata));
|
|
|
+ for (auto eledata : otherXray->GetElementQuantifyData())
|
|
|
+ {
|
|
|
+ mapEleData[eledata->GetName().GetBuffer()].push_back(EleAreaPercentage(other->GetArea() / allPartArea, eledata));
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
// third,we calculate all the element's new percentage data and get a new element chemistry list.
|
|
|
|