MACHINE_StitchLogic.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #include "stdafx.h"
  2. #include "All.h"
  3. #include "MACHINE_DPC.h"
  4. #include "DIOSDICOMInfo.h"
  5. #include "MACHINE_StitchLogic.h"
  6. CMACHINE_StitchLogic::CMACHINE_StitchLogic()
  7. {
  8. }
  9. CMACHINE_StitchLogic::~CMACHINE_StitchLogic()
  10. {
  11. }
  12. bool CMACHINE_StitchLogic::DPCPoint(CMACHINE_DPC* pMACHINE_DPC)
  13. {
  14. m_pMACHINE_DPC = pMACHINE_DPC;
  15. return true;
  16. }
  17. RET_STATUS CMACHINE_StitchLogic::SetTechParamsInfo(ResDataObject PARAM_IN& techParam)
  18. {
  19. return RET_SUCCEED;
  20. }
  21. RET_STATUS CMACHINE_StitchLogic::SetupStitching(ResDataObject PARAM_IN& pParam)
  22. {
  23. STITCH_INFO m_stitchinfo;
  24. m_stitchinfo.SetVal(pParam.encode());
  25. int nInitalHeight = atoi(((string)m_stitchinfo.m_InitialHeight).c_str());
  26. int nDirection = atoi(((string)m_stitchinfo.m_Direction).c_str());
  27. int nImageCount = atoi(((string)m_stitchinfo.m_ImageCount).c_str());
  28. int nSID = atoi(((string)m_stitchinfo.m_SID).c_str());
  29. int nStepLength = atoi(((string)m_stitchinfo.m_StepLength).c_str());
  30. int nStitchLength = atoi(((string)m_stitchinfo.m_StitchLength).c_str());
  31. int nStitchType = atoi(((string)m_stitchinfo.m_StitchType).c_str());
  32. UpdateCurrentImage(1);
  33. UpdateImageCount(nImageCount);
  34. UpdateMachineryReady(1);
  35. return RET_SUCCEED;
  36. }
  37. RET_STATUS CMACHINE_StitchLogic::AcceptStitchingImage()
  38. {
  39. int nCurrentImage = (*m_pSyncData)["StitchCurrentImage"];
  40. nCurrentImage++;
  41. UpdateCurrentImage(nCurrentImage);
  42. return RET_SUCCEED;
  43. }
  44. //notice the URS that the last acquired image is rejected by host. Keep current position.
  45. RET_STATUS CMACHINE_StitchLogic::RejectStitchingImage()
  46. {
  47. return RET_SUCCEED;
  48. }
  49. //Cancel stitching procedure.
  50. RET_STATUS CMACHINE_StitchLogic::CancelStitching()
  51. {
  52. return RET_SUCCEED;
  53. }
  54. //Note the URS that stitching is finished.
  55. RET_STATUS CMACHINE_StitchLogic::CompleteStitching()
  56. {
  57. return RET_SUCCEED;
  58. }
  59. //New extra view, request the positioner to move to a position to take an extra image.
  60. RET_STATUS CMACHINE_StitchLogic::NewExtraView()
  61. {
  62. int nImageCount = (*m_pSyncData)["StitchImageCount"];
  63. nImageCount++;
  64. UpdateImageCount(nImageCount);
  65. return RET_SUCCEED;
  66. }