123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #include "stdafx.h"
- #include <map>
- #include "All.h"
- #include "MACHINE_DPC.h"
- #include "MACHINE_Logical.h"
- #include "DIOSDICOMInfo.h"
- CMACHINE_Logical::CMACHINE_Logical(void)
- {
- }
- CMACHINE_Logical::~CMACHINE_Logical(void)
- {
- }
- bool CMACHINE_Logical::DPCPoint(CMACHINE_DPC* pMACHINE_DPC)
- {
- m_pMACHINE_DPC = pMACHINE_DPC;
- return true;
- }
- RET_STATUS CMACHINE_Logical::SetTechParamsInfo(ResDataObject PARAM_IN& techParam)
- {
- return RET_SUCCEED;
- }
- RET_STATUS CMACHINE_Logical::SetupStitching(ResDataObject PARAM_IN& pParam)
- {
- STITCH_INFO m_stitchinfo;
- m_stitchinfo.SetVal(pParam.encode());
- int nInitalHeight = atoi(((string)m_stitchinfo.m_InitialHeight).c_str());
- int nDirection = atoi(((string)m_stitchinfo.m_Direction).c_str());
- int nImageCount = atoi(((string)m_stitchinfo.m_ImageCount).c_str());
- int nSID = atoi(((string)m_stitchinfo.m_SID).c_str());
- int nStepLength = atoi(((string)m_stitchinfo.m_StepLength).c_str());
- int nStitchLength = atoi(((string)m_stitchinfo.m_StitchLength).c_str());
- int nStitchType = atoi(((string)m_stitchinfo.m_StitchType).c_str());
- m_pMACHINE_DPC->SetupStitching(nImageCount, nDirection, nInitalHeight, nStitchLength, nStepLength, nSID, nStitchType);
- return RET_SUCCEED;
- }
- RET_STATUS CMACHINE_Logical::AcceptStitchingImage()
- {
- char strcommand[100]{"USA"};
- m_pMACHINE_DPC->SendCommandWithoutAck(strcommand);
- //if (m_pMACHINE_DPC->m_nImageCount == m_pMACHINE_DPC->m_nCurrentImage)
- // CompleteStitching();
- return RET_SUCCEED;
- }
- //notice the URS that the last acquired image is rejected by host. Keep current position.
- RET_STATUS CMACHINE_Logical::RejectStitchingImage()
- {
- char strcommand[100]{"USJ"};
- m_pMACHINE_DPC->SendCommandWithoutAck(strcommand);
- return RET_SUCCEED;
- }
- //Cancel stitching procedure.
- RET_STATUS CMACHINE_Logical::CancelStitching()
- {
- if (m_pMACHINE_DPC->m_bStitchingInProgress)
- {
- char strcommand[100]{"UCS"};
- m_pMACHINE_DPC->SendCommandWithoutAck(strcommand);
- }
- return RET_SUCCEED;
- }
- //Note the URS that stitching is finished.
- RET_STATUS CMACHINE_Logical::CompleteStitching()
- {
- if (m_pMACHINE_DPC->m_bStitchingInProgress)
- {
- char strcommand[100]{"USE"};
- m_pMACHINE_DPC->SendCommandWithoutAck(strcommand);
- }
- return RET_SUCCEED;
- }
- //New extra view, request the positioner to move to a position to take an extra image.
- RET_STATUS CMACHINE_Logical::NewExtraView()
- {
- if (m_pMACHINE_DPC->m_bStitchingInProgress)
- {
- char strcommand[100]{"UEX"};
- m_pMACHINE_DPC->SendCommandWithoutAck(strcommand);
- }
- return RET_SUCCEED;
- }
|