ScanController.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. 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. }