|
@@ -359,7 +359,7 @@ void OxfordControllerWrapper::ControllerThreadFunction()
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- Thread::Sleep(1000);
|
|
|
+ Thread::Sleep(500);
|
|
|
|
|
|
m_endControllerEvent->Set();
|
|
|
}
|
|
@@ -1116,6 +1116,7 @@ bool OxfordControllerWrapper::StartXrayCollecting(const long a_nAcTimeMillisecon
|
|
|
auto edsSettings = GetEdsSpectrumSettings();
|
|
|
|
|
|
edsSettings->EdSettings->AcquisitionTime = TimeSpan::FromMilliseconds(a_nAcTimeMilliseconds);
|
|
|
+ edsSettings->EdSettings->ProcessTime = 4;
|
|
|
|
|
|
auto spectrum = edsController->StartAcquisition(edsSettings);
|
|
|
|
|
@@ -1147,6 +1148,8 @@ void OxfordControllerWrapper::XraySpectrumProcess(OINA::Extender::Data::Ed::IEd
|
|
|
|
|
|
// Use the autoIdSettings to define elements that are known or elements that you want to exclude. They also list elements that cannot be identified
|
|
|
IAutoIdSettings^ autoIdSettings = ProcessingFactory::CreateAutoIdSettings();
|
|
|
+
|
|
|
+
|
|
|
EdSpectrumProcessing->IdentifyElements(spectrum, autoIdSettings);
|
|
|
|
|
|
ISEMQuantSettings^ settings = ProcessingFactory::CreateSEMQuantSettings();
|
|
@@ -1262,6 +1265,9 @@ void OxfordControllerWrapper::OnXrayAcquisitionFinished(Object^ sender, OINA::Ex
|
|
|
|
|
|
// Use the autoIdSettings to define elements that are known or elements that you want to exclude. They also list elements that cannot be identified
|
|
|
IAutoIdSettings^ autoIdSettings = ProcessingFactory::CreateAutoIdSettings();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
EdSpectrumProcessing->IdentifyElements(e->Value, autoIdSettings);
|
|
|
|
|
|
ISEMQuantSettings^ settings = ProcessingFactory::CreateSEMQuantSettings();
|
|
@@ -1852,25 +1858,6 @@ bool OxfordControllerWrapper::StartImageCollecting()
|
|
|
|
|
|
auto images = imageAcqusitionController->StartAcquisition(imageAcqusitionSettings);
|
|
|
|
|
|
- /*for each (auto eleImage in images)
|
|
|
- {
|
|
|
- electronImageList->Add(eleImage);
|
|
|
- }
|
|
|
-
|
|
|
- if (electronImageList->Count == 0)
|
|
|
- {
|
|
|
- _oxfordControllerData.m_nState = OxfordControllerState::FAILED;
|
|
|
- }
|
|
|
- else if (!ReadImageData(electronImageList[0], _oxfordControllerData.m_pImageBits))
|
|
|
- {
|
|
|
- _oxfordControllerData.m_nState = OxfordControllerState::FAILED;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- _oxfordControllerData.m_nState = OxfordControllerState::SUCCEEDED;
|
|
|
- }
|
|
|
-
|
|
|
- m_endControllerEvent->Set();*/
|
|
|
|
|
|
|
|
|
return images != nullptr;
|
|
@@ -1890,24 +1877,32 @@ void OxfordControllerWrapper::OnImageAcquisitionFinished(Object^ /*sender*/, OIN
|
|
|
List<IElectronImage^>^ electronImageList = gcnew List<IElectronImage^>();
|
|
|
try
|
|
|
{
|
|
|
-
|
|
|
- for each (auto eleImage in e->Value)
|
|
|
+ if ((bool)e->Success)
|
|
|
{
|
|
|
- electronImageList->Add(eleImage);
|
|
|
- }
|
|
|
+ for each (auto eleImage in e->Value)
|
|
|
+ {
|
|
|
+ electronImageList->Add(eleImage);
|
|
|
+ }
|
|
|
|
|
|
- if (electronImageList->Count == 0)
|
|
|
- {
|
|
|
- _oxfordControllerData.m_nState = OxfordControllerState::FAILED;
|
|
|
- }
|
|
|
- else if (!ReadImageData(electronImageList[0], _oxfordControllerData.m_pImageBits))
|
|
|
- {
|
|
|
- _oxfordControllerData.m_nState = OxfordControllerState::FAILED;
|
|
|
+ if (electronImageList->Count == 0)
|
|
|
+ {
|
|
|
+ _oxfordControllerData.m_nState = OxfordControllerState::FAILED;
|
|
|
+ }
|
|
|
+ else if (!ReadImageData(electronImageList[0], _oxfordControllerData.m_pImageBits))
|
|
|
+ {
|
|
|
+ _oxfordControllerData.m_nState = OxfordControllerState::FAILED;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _oxfordControllerData.m_nState = OxfordControllerState::SUCCEEDED;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- _oxfordControllerData.m_nState = OxfordControllerState::SUCCEEDED;
|
|
|
+ CString sMessage(_T("OnImageAcquisitionFinished failed") );
|
|
|
+ LogErrorTrace(__FILE__, __LINE__, sMessage);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
catch (Exception^ ex)
|
|
|
{
|
|
@@ -2219,8 +2214,7 @@ IImageAcquisitionSettings^ OxfordControllerWrapper::GetImageAcqusitionSettings()
|
|
|
{
|
|
|
imageSettings->EnableInputSource(OINA::Extender::Data::Image::ImageInputSources::None, true);
|
|
|
}
|
|
|
- //Action<>
|
|
|
- //Enumerable::ToList(imageSettings->InputSources)->ForEach(imageSettings->EnableInputSource(i.Key, false));
|
|
|
+
|
|
|
_imageAcqusitionSettings->ImageSettings->DwellTimeMicroSeconds = 20;
|
|
|
_imageAcqusitionSettings->ScanSettings->AcquisitionRegion->CreateFullFieldRegion(1.0 / 1024.0);
|
|
|
|