ScanController.cs 1.2 KB

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