#include "stdafx.h" #include "All.h" #include "MACHINE_DPC.h" #include "DIOSDICOMInfo.h" #include "MACHINE_StitchLogic.h" CMACHINE_StitchLogic::CMACHINE_StitchLogic() { } CMACHINE_StitchLogic::~CMACHINE_StitchLogic() { } bool CMACHINE_StitchLogic::DPCPoint(CMACHINE_DPC* pMACHINE_DPC) { m_pMACHINE_DPC = pMACHINE_DPC; return true; } RET_STATUS CMACHINE_StitchLogic::SetTechParamsInfo(ResDataObject PARAM_IN& techParam) { return RET_SUCCEED; } RET_STATUS CMACHINE_StitchLogic::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()); UpdateCurrentImage(1); UpdateImageCount(nImageCount); UpdateMachineryReady(1); return RET_SUCCEED; } RET_STATUS CMACHINE_StitchLogic::AcceptStitchingImage() { int nCurrentImage = (*m_pSyncData)["StitchCurrentImage"]; nCurrentImage++; UpdateCurrentImage(nCurrentImage); return RET_SUCCEED; } //notice the URS that the last acquired image is rejected by host. Keep current position. RET_STATUS CMACHINE_StitchLogic::RejectStitchingImage() { return RET_SUCCEED; } //Cancel stitching procedure. RET_STATUS CMACHINE_StitchLogic::CancelStitching() { return RET_SUCCEED; } //Note the URS that stitching is finished. RET_STATUS CMACHINE_StitchLogic::CompleteStitching() { return RET_SUCCEED; } //New extra view, request the positioner to move to a position to take an extra image. RET_STATUS CMACHINE_StitchLogic::NewExtraView() { int nImageCount = (*m_pSyncData)["StitchImageCount"]; nImageCount++; UpdateImageCount(nImageCount); return RET_SUCCEED; }