|
@@ -1452,7 +1452,7 @@ BOOL COTSBrukerImpl::StartSpectrumMeasurement()
|
|
|
|
|
|
// call IsSpectrumMeterRunning
|
|
|
// return true if success
|
|
|
-BOOL COTSBrukerImpl::IsSpectrumMeterRunning(BOOL& a_bRunning)
|
|
|
+BOOL COTSBrukerImpl::IsSpectrumMeasureRunning(BOOL& a_bRunning)
|
|
|
{
|
|
|
|
|
|
double nState;
|
|
@@ -1579,20 +1579,20 @@ BOOL COTSBrukerImpl::QuantifyXrayPoint(CPosXray* a_pXRayPoint, CString a_strMeth
|
|
|
// ok, return true
|
|
|
return true;
|
|
|
}
|
|
|
-BOOL COTSBrukerImpl::QuantifyPosXrayPointsOnLine(std::vector<CPosXrayPtr>& a_vXRayParts)
|
|
|
-{
|
|
|
-
|
|
|
-
|
|
|
- if (!SetXRayPoints(a_vXRayParts))
|
|
|
- {
|
|
|
- // failed to call ReadXRayPoints method
|
|
|
- LogTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::CollectXRayPoints: failed to call ReadXRayPoints method."));
|
|
|
- return FALSE;
|
|
|
- }
|
|
|
-
|
|
|
- // ok, return true
|
|
|
- return true;
|
|
|
-}
|
|
|
+//BOOL COTSBrukerImpl::QuantifyPosXrayPointsOnLine(std::vector<CPosXrayPtr>& a_vXRayParts)
|
|
|
+//{
|
|
|
+//
|
|
|
+//
|
|
|
+// if (!QuantifyPosXrayPointsOnLine(a_vXRayParts))
|
|
|
+// {
|
|
|
+// // failed to call ReadXRayPoints method
|
|
|
+// LogTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::CollectXRayPoints: failed to call ReadXRayPoints method."));
|
|
|
+// return FALSE;
|
|
|
+// }
|
|
|
+//
|
|
|
+// // ok, return true
|
|
|
+// return true;
|
|
|
+//}
|
|
|
BOOL COTSBrukerImpl::QuantifyPosXrayPointOnLine(CPosXrayPtr a_vXRayPart)
|
|
|
{
|
|
|
char* pcMethod = "Default";//"Default";//"Automatic";
|
|
@@ -1943,7 +1943,7 @@ BOOL COTSBrukerImpl::SpectrumLifeTimeMeasurement(DWORD a_nLifeTime)
|
|
|
{
|
|
|
#pragma warning(suppress: 28159)
|
|
|
nEnd = GetTickCount();
|
|
|
- if (!IsSpectrumMeterRunning(bRunning))
|
|
|
+ if (!IsSpectrumMeasureRunning(bRunning))
|
|
|
{
|
|
|
// error, failed to call IsSpectrumMeterRunning method
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::SpectrumLifeTimeMeasurement: failed to call IsSpectrumMeterRunning method."));
|
|
@@ -1999,7 +1999,7 @@ BOOL COTSBrukerImpl::SpectrumRealTimeMeasurement(DWORD a_nRealTime)
|
|
|
{
|
|
|
#pragma warning(suppress: 28159)
|
|
|
nEnd = GetTickCount();
|
|
|
- if (!IsSpectrumMeterRunning(bRunning))
|
|
|
+ if (!IsSpectrumMeasureRunning(bRunning))
|
|
|
{
|
|
|
// error, failed to call IsSpectrumMeterRunning method
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::SpectrumRealTimeMeasurement: failed to call IsSpectrumMeterRunning method."));
|
|
@@ -2040,7 +2040,7 @@ BOOL COTSBrukerImpl::SpectrumCountsMeasurement(DWORD a_nTotalCounts, int a_nTime
|
|
|
BOOL bRunning = TRUE;
|
|
|
do
|
|
|
{
|
|
|
- if (!IsSpectrumMeterRunning(bRunning))
|
|
|
+ if (!IsSpectrumMeasureRunning(bRunning))
|
|
|
{
|
|
|
// error, failed to call IsSpectrumMeterRunning method
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::SpectrumCountsMeasurement: failed to call IsSpectrumMeterRunning method."));
|
|
@@ -2442,6 +2442,10 @@ BOOL COTSBrukerImpl::GetXRayByPoints(CPosXrayList& a_listXrayPois, DWORD a_nACTi
|
|
|
// set spectrum data for the x-ray point
|
|
|
a_listXrayPois[i]->SetXrayData(nChannelData);
|
|
|
}
|
|
|
+ if (m_bDoQuantification)
|
|
|
+ {
|
|
|
+ QuantifyPosXrayPointsOnLine(a_listXrayPois);
|
|
|
+ }
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
@@ -2456,7 +2460,7 @@ BOOL COTSBrukerImpl::GetXRayByPoints(CPosXrayList& a_listXrayPois, DWORD a_nACTi
|
|
|
return FALSE;
|
|
|
}
|
|
|
|
|
|
-BOOL COTSBrukerImpl::SetXRayPoints(CPosXrayList& a_listXrayPois/*, const DWORD a_nACTimeMS*/)
|
|
|
+BOOL COTSBrukerImpl::QuantifyPosXrayPointsOnLine(CPosXrayList& a_listXrayPois/*, const DWORD a_nACTimeMS*/)
|
|
|
{
|
|
|
// Fail a_vXPoints is empty
|
|
|
if (a_listXrayPois.empty())
|
|
@@ -2481,8 +2485,8 @@ BOOL COTSBrukerImpl::SetXRayPoints(CPosXrayList& a_listXrayPois/*, const DWORD a
|
|
|
char* pcParams = "ResultType=quantification";
|
|
|
char cResult[10000];
|
|
|
memset(cResult, 0, 10000);
|
|
|
-
|
|
|
- if (BrukerDll::QuantifyPointListSpectrum(m_nClientID, i, pcMethod, pcParams, cResult, 10000, (BrukerDll::PRTSpectrumHeaderRec)m_psRTSpectrumBuffer.get(), (int)BRUKER_PARAM::RT_SPECTRUM_BUFFER_SIZE) != 0)
|
|
|
+ int xraySequence = a_listXrayPois[i]->GetIndex();
|
|
|
+ if (BrukerDll::QuantifyPointListSpectrum(m_nClientID, xraySequence, pcMethod, pcParams, cResult, 10000, (BrukerDll::PRTSpectrumHeaderRec)m_psRTSpectrumBuffer.get(), (int)BRUKER_PARAM::RT_SPECTRUM_BUFFER_SIZE) != 0)
|
|
|
{
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::SetXRayPoints failed to call QuantifyPointListSpectrum method at index %d, error code %d"), i, -1);
|
|
|
|
|
@@ -2491,22 +2495,6 @@ BOOL COTSBrukerImpl::SetXRayPoints(CPosXrayList& a_listXrayPois/*, const DWORD a
|
|
|
a_listXrayPois[i]->SetElementQuantifyData(listElement);
|
|
|
|
|
|
|
|
|
- // get spectrum data of a point
|
|
|
- //bool success = GetPointListSpectrum(i, (long*)nChannelData);
|
|
|
- //if (!success)
|
|
|
- //{
|
|
|
- // // error
|
|
|
- // CPoint poi = a_listXrayPois[i]->GetPosition();
|
|
|
- // LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::SetXRayPoints:Call GetPointListSpectrum failed : index = %d(x : %d, y : %d)"),
|
|
|
- // i,
|
|
|
- // poi.x,
|
|
|
- // poi.y);
|
|
|
-
|
|
|
- // return FALSE;
|
|
|
- //}
|
|
|
-
|
|
|
- //// set spectrum data for the x-ray point
|
|
|
- //a_listXrayPois[i]->SetXrayData(nChannelData);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2631,8 +2619,9 @@ BOOL COTSBrukerImpl::SetXRayPointsByFeature(CPosXrayList& a_vXPoints, const DWOR
|
|
|
char* pcMethod = "Default";//"Default";// "Automatic";
|
|
|
char* pcParams = "ResultType=quantification";
|
|
|
char cResult[10000];
|
|
|
+ int index = a_vXPoints[i]->GetIndex();
|
|
|
memset(cResult, 0, 10000);
|
|
|
- if (BrukerDll::QuantifyFeatureListSpectrum(m_nClientID, i, pcMethod, pcParams, cResult, 10000, (BrukerDll::PRTSpectrumHeaderRec)m_psRTSpectrumBuffer.get(), (int)BRUKER_PARAM::RT_SPECTRUM_BUFFER_SIZE) != 0)
|
|
|
+ if (BrukerDll::QuantifyFeatureListSpectrum(m_nClientID, index, pcMethod, pcParams, cResult, 10000, (BrukerDll::PRTSpectrumHeaderRec)m_psRTSpectrumBuffer.get(), (int)BRUKER_PARAM::RT_SPECTRUM_BUFFER_SIZE) != 0)
|
|
|
{
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::SetXRayPoints failed to call QuantifyPointListSpectrum method, error code %d"), -1);
|
|
|
//return FALSE;
|