ScanController.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using OTSCLRINTERFACE;
  2. using OTSCLRINTERFACE;
  3. using OTSDataType;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace OTSModelSharp.ServiceInterface
  11. {
  12. public class ScanController : IScanController
  13. {
  14. private OTSCLRINTERFACE.COTSControlFunExport scan;
  15. public ScanController()
  16. {
  17. }
  18. public CBSEImgClr AcquireBSEImage(int matrixIndex, int reads, int dwell)
  19. {
  20. Init();
  21. CBSEImgClr bse = new CBSEImgClr();
  22. scan.AcquireBSEImage(matrixIndex, reads, dwell, ref bse);
  23. return bse;
  24. }
  25. public bool Init()
  26. {
  27. this.scan = SemController.hw;
  28. return scan.ScanInit();
  29. }
  30. public bool SetDwellTime(long val)
  31. {
  32. Init();
  33. return scan.SetDwellTime((int)val);
  34. }
  35. public bool SetImageSize(int width,int height)
  36. {
  37. Init();
  38. return scan.SetImageSize(width,height);
  39. }
  40. }
  41. }