123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- #pragma once
- #include <string>
- #include "DIOS.Dev.IODevice.hpp"
- #include "DIOS.Dev.IODevice.Detail.hpp"
- #include "MECH.BasicMoulds.hpp"
- #include "DriverConfigInfo.tlh"
- #include "DriverConfigInfo.tli"
- #include "DIOSDICOMInfo.h"
- namespace nsDetail = DIOS::Dev::Detail;
- #ifndef DIOSDEVMECHDEVICEMOULD_EXPORTS
- #ifdef _WIN64
- #ifdef _DEBUG
- #pragma comment(lib, "DIOS.Dev.MECH.Mould64D.lib")
- #else
- #pragma comment(lib, "DIOS.Dev.MECH.Mould64.lib")
- #endif
- #else
- #ifdef _DEBUG
- #pragma comment(lib, "DIOS.Dev.MECH.MouldD.lib")
- #else
- #pragma comment(lib, "DIOS.Dev.MECH.MouldD.lib")
- #endif
- #endif
- #endif
- #ifdef DIOSDEVMECHDEVICEMOULD_EXPORTS
- #define _DIOSDEVMECHDEVICEMOULD_API __declspec(dllexport)
- #else
- #define _DIOSDEVMECHDEVICEMOULD_API __declspec(dllimport)
- #endif
- #pragma warning (disable:4251) // warning C4251: class “DIOS::Dev::Detail::Generator::DoseUnit”需要有 dll 接口由 class“DIOS::Dev::Detail::Generator::MECHMould”的客户端使用
- namespace DIOS::Dev::Detail::MECH
- {
- //获取日志配置路径
- _DIOSDEVMECHDEVICEMOULD_API string GetProcessDirectory();
- //获取配置文件中指定模块的版本号
- _DIOSDEVMECHDEVICEMOULD_API bool GetVersion(string& version, HMODULE hMyModule);
- _DIOSDEVMECHDEVICEMOULD_API bool GetVersion(string& version, ResDataObject& config);
- _DIOSDEVMECHDEVICEMOULD_API bool GetVersion(string& version);
- _DIOSDEVMECHDEVICEMOULD_API void TransJsonText(ResDataObject& config);
- //-----------------------------------------------------------------------------
- // MECHUnit
- //-----------------------------------------------------------------------------
- class _DIOSDEVMECHDEVICEMOULD_API MECHUnit : public IOLogicUnit
- {
- public:
- MECHUnit() {};
- virtual ~MECHUnit() {};
- public:
- //检查
- std::unique_ptr<PATIENTSIZEMould> m_PatientSize;
- std::unique_ptr<VIEWIDMould> m_ViewID;
- //Mechanical
- std::unique_ptr<MechStateMould> m_MechState;
- std::unique_ptr <POSITIONNUMBERMould> m_PostionNumber;
- std::unique_ptr<TubeAngleMould> m_TubeAngle;
- std::unique_ptr<TubeHeightMould> m_TubeHeight;
- std::unique_ptr<TIDMould> m_TID;
- std::unique_ptr<SIDMould> m_SID;
- std::unique_ptr<SEDMould> m_SED;
- std::unique_ptr<SODMould> m_SOD;
- std::unique_ptr<FIDMould> m_FID;
- std::unique_ptr<GRIDMould> m_GridState;//Grid
- string m_strInfo;//机架详细信息
- //遮光器
- std::unique_ptr<FILTERMould> m_Filter;
- //乳腺
- //std::unique_ptr<GRIDMould> m_Mammo_Grid;
- std::unique_ptr<MAMMOAEMould> m_Mammo_AE;
- std::unique_ptr<MAMMOTHICKNESSMould> m_Mammo_Thickness;
- //std::unique_ptr<FILTERMould> m_Mammo_FT;
- //std::unique_ptr<SIDMould> m_Mammo_SID;
- std::unique_ptr<MAMMOPRESSDECMould> m_Mammo_CompPressureDEC;
- std::unique_ptr<MAMMODEPRESSMould> m_Mammo_Depress;
- std::unique_ptr<MAMMOPRESSVALMould> m_Mammo_PressureValue;
- std::unique_ptr<MAMMOAGDMould> m_Mammo_AGD;
- std::unique_ptr<MAMMOMAGMould> m_Mammo_MAG;
- //TOMO
- //std::unique_ptr<MAMMOMAGMould> m_Tomo_TID;
- //std::unique_ptr<MAMMOMAGMould> m_Tomo_SID;
- std::unique_ptr<TOMOTypeMould> m_Tomo_Type;
- std::unique_ptr<TOMOScanDirectionMould> m_Tomo_ScanDirection;
- std::unique_ptr<TOMOFrameCountMould> m_Tomo_FrameCount;
- std::unique_ptr<TOMOFrameRateMould> m_Tomo_FrameRate;
- std::unique_ptr<TOMOScanAngleMould> m_Tomo_ScanAngle;
- std::unique_ptr<TOMOScanImageNumberMould> m_Tomo_ScanImageNumber;
- //拼接
- std::unique_ptr<StitchingStateMould> m_StitchingState;
- std::unique_ptr<StitchHeightMould> m_StitchHeight;
- std::unique_ptr<StitchLengthMould> m_StitchLength;
- std::unique_ptr<StitchOverLapMould> m_StitchOverLap;
- std::unique_ptr<StitchPIDMould> m_StitchPID;
- std::unique_ptr<StitchDirectionMould> m_StitchDirection;
- std::unique_ptr<StitchTypeMould> m_StitchType;
- std::unique_ptr<StitchStepLengthMould> m_StitchStepLength;
- std::unique_ptr<FPDPositionMould> m_FPDPosition;
- std::unique_ptr<TotalImageCountMould> m_TotalImageCount;
- std::unique_ptr<CurrentImageNumberMould> m_CurrentImageNumber;
- //牛头
- std::unique_ptr<KVMould> m_KV;
- std::unique_ptr<MAMould> m_MA;
- std::unique_ptr<MSMould> m_MS;
- std::unique_ptr<MASMould> m_MAS;
- std::unique_ptr<TECHMODEMould> m_Techmode;
- std::unique_ptr<FOCUSMould> m_Focus;
- std::unique_ptr<WORKSTATIONMould> m_WS;
- std::unique_ptr<AECDENSITYMould> m_AECDensity;
- std::unique_ptr<AECFIELDMould> m_AECField;
- };
- //-----------------------------------------------------------------------------
- // MECHMould
- //-----------------------------------------------------------------------------
- namespace nDev = DIOS::Dev;
- class _DIOSDEVMECHDEVICEMOULD_API MECHMould
- {
- public:
- MECHMould ();
- ~MECHMould ();
- protected:
- virtual void RegisterExamInfo(Dispatch* Dispatch);
- virtual void RegisterNormalControl(Dispatch* Dispatch);
- virtual void RegisterMammoControl(Dispatch* Dispatch);
- virtual void RegisterTOMOControl(Dispatch* Dispatch);
- virtual void RegisterCollimatorControl(Dispatch* Dispatch);
- virtual void RegisterStitchingControl(Dispatch* Dispatch);
- virtual void RegisterExtraScreenControl(Dispatch* Dispatch);
- protected:
- //检查信息接口
- virtual RET_STATUS SetStudyInfo(ResDataObject& pParam);
- virtual RET_STATUS SetViewInfo(ResDataObject& pParam);
- virtual RET_STATUS SetPatientInfo(ResDataObject& pParam);
- //机架通用接口
- virtual RET_STATUS Reset() { return RET_STATUS::RET_SUCCEED; };
- virtual RET_STATUS SetTechParamsInfo(ResDataObject& pParam);
- virtual RET_STATUS SetPositionNumber(int pn);
- virtual RET_STATUS SetSID(float value);
- virtual RET_STATUS SetSOD(float value);
- virtual RET_STATUS MoveToHome(string& value);
- virtual RET_STATUS MoveMech(string& value);
- virtual RET_STATUS StopMech(string& value);
- virtual RET_STATUS SetGrid(AttrKey::MECH_GRIDSTATE GridState);
- virtual RET_STATUS SetAutoTracking(int nAutoTracking);
- virtual RET_STATUS ActiveSyncMode(_tSyncModeArgs value) { return RET_STATUS::RET_SUCCEED; };
- //乳腺接口
- virtual RET_STATUS SetCollimatorSize(int xsize, int ysize);
- virtual RET_STATUS SetCollimatorSID(int sid);
- virtual RET_STATUS SetCollimatorFilter(int pParams);
- virtual RET_STATUS SetCollimatorAngle(int pParams);
- virtual RET_STATUS SetCollimatorLight(int pParams);
- //TOMO
- virtual RET_STATUS SetTomoEnable(bool state);
- virtual RET_STATUS SetTomoExpMode(string& vakue);
- virtual RET_STATUS SetTomoTechnical(string& value);
- virtual RET_STATUS GetTomoResults(string& result);
- //遮光器
- virtual RET_STATUS SetCollimator(ECOM_COLLIMATOR_INFO &curCollimator);
- virtual RET_STATUS SetFilter(int nFilter);
- //拼接相应接口
- virtual RET_STATUS BeginStitching();
- virtual RET_STATUS InitStitching();
- virtual RET_STATUS EndStitching();
- virtual RET_STATUS SetupStitching(string& value);
- virtual RET_STATUS AcceptStitchingImage();
- virtual RET_STATUS RejectStitchingImage();
- virtual RET_STATUS CancelStitching();
- virtual RET_STATUS CompleteStitching();
- virtual RET_STATUS NewExtraView();
- virtual RET_STATUS RepeatStitching();
- virtual RET_STATUS SetAutoPosiitonNo(int nPN);
- //牛头
- virtual RET_STATUS SetExpEnable(bool nExpEnabled);
- virtual RET_STATUS SetWS(int nWS);
- virtual RET_STATUS SetKV(int nKV);
- virtual RET_STATUS SetMA(float fMA);
- virtual RET_STATUS SetMS(float fMS);
- virtual RET_STATUS SetMAS(float fMAS);
- virtual RET_STATUS SetFO(int nFO);
- virtual RET_STATUS SetTechMode(int nET);
- virtual RET_STATUS SetAECField(int nAECFieldSel);
- virtual RET_STATUS SetDensity(float nAECDensity);
- virtual RET_STATUS SetBodySize(string strSize);
-
- public:
- MECHUnit m_MECHUnit;
- };
- }
- namespace DIOS::Dev::Detail::MECH
- {
- class _DIOSDEVMECHDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver
- {
- public:
- DriverMould ();
- ~DriverMould ();
- virtual std::string GetGUID () const;
- virtual string GetConnectDLL(string& ConfigFileName);
- virtual ResDataObject GetConnectParam(string& ConfigFileName);
- protected:
- std::list <ConfigInfo> m_ConfigInfo;
- };
- }
|