|
@@ -541,7 +541,8 @@ namespace OTSController {
|
|
|
}
|
|
|
|
|
|
// SEM info
|
|
|
- BrukerDll::PRTImageInfoEx oImageInfo=&BrukerDll::TRTImageInfoEx();
|
|
|
+ BrukerDll::TRTImageInfoEx imgInfo;
|
|
|
+ BrukerDll::PRTImageInfoEx oImageInfo=&imgInfo;
|
|
|
|
|
|
// the buffer returned is a bitmap stream, i.e. it contains the header information as well
|
|
|
int32_t nImageSize = nWidth * nHeight + 20000;
|
|
@@ -1377,9 +1378,9 @@ namespace OTSController {
|
|
|
// first attempt to open client
|
|
|
BOOL bStartNew = FALSE;
|
|
|
BOOL bGUI = FALSE;
|
|
|
- uint32_t clientId;
|
|
|
- BOOL bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), clientId);
|
|
|
- m_nClientID = clientId;
|
|
|
+
|
|
|
+ BOOL bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), m_nClientID);
|
|
|
+
|
|
|
if (!bRet)
|
|
|
{
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::OpenClient: call OpenClient failed at the first attempt."));
|
|
@@ -1404,9 +1405,9 @@ namespace OTSController {
|
|
|
if (!bConnected)
|
|
|
{
|
|
|
// second attempt to open client
|
|
|
- uint32_t clientId;
|
|
|
- bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), clientId);
|
|
|
- m_nClientID = clientId;
|
|
|
+
|
|
|
+ bRet = OpenClient(m_psServerName.get(), "edx", "edx", static_cast<BYTE>(bStartNew), static_cast<BYTE>(bGUI), m_nClientID);
|
|
|
+
|
|
|
if (!bRet)
|
|
|
{
|
|
|
LogErrorTrace(__FILE__, __LINE__, _T("COTSBrukerImpl::OpenClient: call OpenClient failed at the second attempt."));
|
|
@@ -2713,9 +2714,15 @@ BOOL COTSBrukerImpl::GetXRayByFeatures(CPosXraysList& a_vXPoints, std::vector<Br
|
|
|
features[i].SegmentCount = ofeature.SegmentCount;
|
|
|
if (ofeature.SegmentCount > 0)
|
|
|
{
|
|
|
- features->Segments[i].XStart = ofeature.pSegment[i].XStart;
|
|
|
- features->Segments[i].XCount = ofeature.pSegment[i].XCount;
|
|
|
- features->Segments[i].Y = ofeature.pSegment[i].Y;
|
|
|
+ int segCount = features[i].SegmentCount;
|
|
|
+ auto ofeature = a_vFeatures[i];
|
|
|
+ features->Segments = new BrukerDll::TSegment[segCount];
|
|
|
+ for (int j = 0; j < segCount; j++)
|
|
|
+ {
|
|
|
+ features->Segments[j].XStart = ofeature.pSegment[j].XStart;
|
|
|
+ features->Segments[j].XCount = ofeature.pSegment[j].XCount;
|
|
|
+ features->Segments[j].Y = ofeature.pSegment[j].Y;
|
|
|
+ }
|
|
|
|
|
|
// calculate pixel time
|
|
|
int nPixelCount = 0;
|