|
@@ -2028,14 +2028,14 @@ enum OxfordCommand
|
|
|
return true;
|
|
|
}
|
|
|
//面扫描
|
|
|
- public Boolean XrayAreaCollectiong( double dMilliSecondsTime, List<Segment> a_listChord, out long[] XrayData, out Dictionary<string, double> a_listElement)
|
|
|
+ public Boolean XrayAreaCollectiong(double dMilliSecondsTime, List<Segment> a_listChord, out long[] XrayData, out Dictionary<string, double> a_listElement)
|
|
|
{
|
|
|
XrayParamInit();
|
|
|
|
|
|
XrayData = new long[XRayChannelLength];
|
|
|
a_listElement = new Dictionary<string, double>();
|
|
|
- var edsAreaSpectrumSettings = AcquireFactory.CreateEdChordListSettings();
|
|
|
- SetAreaXrayAcquisitionParam(edsAreaSpectrumSettings, dMilliSecondsTime);
|
|
|
+
|
|
|
+ SetXrayAcquisitionParam(dMilliSecondsTime);
|
|
|
List<Chord> Chords = new List<Chord>();
|
|
|
|
|
|
foreach (Segment seg in a_listChord)
|
|
@@ -2043,14 +2043,10 @@ enum OxfordCommand
|
|
|
Chord chord = new Chord(seg.X, seg.Y, seg.Length);
|
|
|
Chords.Add(chord);
|
|
|
}
|
|
|
+ SetAreaAcquistionRegion(Chords);
|
|
|
|
|
|
- ChordList chordsList = null;
|
|
|
- chordsList = new ChordList(Chords, m_dImagePixelsize);
|
|
|
- EdSpectrumSettings.ScanSettings.AcquisitionRegion.CreateChordListRegion(chordsList);
|
|
|
- var edsSpectrumController = CreateChordlistController();
|
|
|
-
|
|
|
// IEdSpectrumSettings.EdCapabilities will validate settings and hardware availability.
|
|
|
- if (edsSpectrumController.IsEdHardwareReady(edsAreaSpectrumSettings))
|
|
|
+ if (EdSpectrumAcquisitionController.IsEdHardwareReady(EdSpectrumSettings))
|
|
|
{
|
|
|
// This only used for multiple acquisition:
|
|
|
// if this is the first acquisition, call BeginMultipleAcquisition
|
|
@@ -2062,9 +2058,8 @@ enum OxfordCommand
|
|
|
try
|
|
|
{
|
|
|
int lastingTime = 0;
|
|
|
- //IEdSpectrum edSpectrum =
|
|
|
- edsSpectrumController.StartAcquisition(edsAreaSpectrumSettings);
|
|
|
- //edSpectrum.Label = string.Format(@"chord");
|
|
|
+ IEdSpectrum edSpectrum = EdSpectrumAcquisitionController.StartAcquisition(EdSpectrumSettings);
|
|
|
+ edSpectrum.Label = string.Format(@"chord");
|
|
|
|
|
|
while (true)
|
|
|
{
|
|
@@ -2074,13 +2069,13 @@ enum OxfordCommand
|
|
|
a_listElement = listElement;
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
Thread.Sleep(100);
|
|
|
Application.DoEvents();
|
|
|
lastingTime += 100;
|
|
|
- if (lastingTime > EDSColletionTimeOut*8)
|
|
|
+ if (lastingTime > EDSColletionTimeOut * 8)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
return false;
|
|
|
}
|
|
|
}
|