// DICOMSRVDlg.h : header file // ///////////////////////////////////////////////////////////////////////////// // CDICOMSRVDlg dialog //{{AFX_INCLUDES() //}}AFX_INCLUDES #ifndef _SRVDLG_H_ #define _SRVDLG_H_ #ifndef MAKETAG #define MAKETAG(nGroup,nElement) ((unsigned long)((((unsigned long)nGroup) << 16) | nElement)) #define GETGROUP(nTag) ((unsigned short)(nTag >> 16)) #define GETELEMENT(nTag) ((unsigned short)(nTag & 0xFFFF)) #endif #include "server.h" #include "client.h" #define CLIENTS_TIMER_ID 1 #define MOVE_TIMER_ID 2 class CClientData { public: CNetClient* m_pClient; CString m_sAETitle; UINT m_uTimeout; UINT m_uSecondsElapsed; BOOL m_bEnableTimeout; CClientData() : m_pClient(NULL), m_uTimeout(0), m_uSecondsElapsed(0), m_bEnableTimeout(FALSE) { } ~CClientData() { if (m_pClient) delete m_pClient; } }; class CDICOMSRVDlg : public CDialog { // Construction public: CDICOMSRVDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDICOMSRVDlg) enum { IDD = IDD_DICOMSRV }; CButton m_ButtonImport; CButton m_ButtonDelete; CButton m_ButtonClose; CListCtrl m_EventLog; CListCtrl m_UserList; CTreeCtrl m_ConnectionList; CTreeCtrl m_KeyView; CTreeCtrl m_DicomDir; //}}AFX_DATA CNetServer m_LEADDICOMServer; CNetClient m_LEADDICOMClient; LBitmapWindow m_LEAD1; HWND m_LEAD1hWnd; LDicomDir m_SrvDicomDir; LDicomDS m_LEADDICOM1; LDicomDS m_LEADDICOM2; LDicomDS m_LEADTemp; CStatusBarCtrl m_StatusBar1; pDICOMELEMENT m_pDisplay; void RemoveUnsupportedUIDs(); void SetStatus(CString szStatus); void LogEvent(CString szUser, CString szEvent); BOOL Unload(); BOOL SaveClientsList(); void LoadClientsList(); BOOL SaveEventsLog(); void LoadEventsLog(); CImageList m_Image; BOOL FindClient(const CString& sIPAddress, const CString* psAETitle = NULL, int* piUserListIndex = NULL); void SetClientInfo(CNetClient* pClient, const CString& sIPAddress, const CString& sAETitle); BOOL GetClientInfo(CNetClient* pClient, CString& sAETitle); void DisplayAssociate(CNetClient *pClient, LDicomAssociate *pPDU); void LastClientAction(CNetClient *pClient, CString szAction, BOOL bMessage); void EnableClientTimeout(CNetClient* pClient, BOOL bEnable); void DisplayDICOMDir(); void DisplayDirDS(pDICOMELEMENT pElement, HTREEITEM hParent, BOOL bChild); HTREEITEM DisplayDSKey(pDICOMELEMENT pKey, HTREEITEM hParent, BOOL bChild); void InitializeSrvDicomDir(); BOOL m_bImport; L_INT InsertDataSet(LDicomDS *pSourceDS, CString szFile); L_BOOL IsValidDate(const pVALUEDATE pDate) const; L_BOOL IsValidTime(const pVALUETIME pTime) const; void DisplayKey(pDICOMELEMENT pElement, HTREEITEM hParent); void DisplayImageData(CString szFile); void DeletePatient(CString szPatientID); void DeleteStudy(CString szStudyUID); void DeleteSeries(CString szStudyUID, CString szSeriesUID); void DeleteImage(CString szStudyUID, CString szSeriesUID, CString szSOPUID); // For handling C-MOVE requests LDicomNet* m_pMoveNet; CString m_sMoveDstAE; CStringArray m_MoveMatches[3]; // m_MoveMatches[0]: SOPClassUID(s), // m_MoveMatches[1]: TransferSyntaxUID(s), // m_MoveMatches[2]: ReferencedFile(s) L_UCHAR m_nMovePresentationID; L_UINT16 m_uMoveMessageID; L_UINT16 m_uStoreMessageID; CString m_sMoveClass; int m_nSecondsElapsed; int m_nSuccessfulSubOperations; int m_nFailedSubOperations; int m_nWarningSubOperations; L_VOID MoveImages(LDicomDS* pReqIdentifier, CString& sMoveDstIP, L_UINT uMoveDstPort, int iQRLevel, BOOL bPatientRoot, CString& sUser); L_UINT32 m_Security; // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDICOMSRVDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CDICOMSRVDlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnServerExit(); afx_msg void OnServerConnections(); afx_msg void OnClose(); afx_msg void OnServerAdministration(); afx_msg void OnNetReceiveAbortLeaddicomnetctrl1(long hNet, short nSource, short nReason); afx_msg void OnNetReceiveReleaseResponseLeaddicomnetctrl1(long hNet); afx_msg void OnNetReceiveCEchoRequestLeaddicomnetctrl1(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass); afx_msg void OnNetReceiveCStoreRequestLeaddicomnetctrl1(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, short nPriority, LPCTSTR pszMoveAE, short nMoveMessageID, long hDS); afx_msg void OnSelchangedTree1(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnDblclkTree1(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnNetReceiveCFindRequestLeaddicomnetctrl1(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, short nPriority, long hDS); afx_msg void OnNetReceiveCMoveRequestLeaddicomnetctrl1(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, short nPriority, LPCTSTR pszMoveAE, long hDS); afx_msg void OnNetConnectLeaddicomnetctrl2(long hNet, short nStatus); afx_msg void OnNetReceiveAssociateAcceptLeaddicomnetctrl2(long hNet, long hPDU); afx_msg void OnNetReceiveAssociateRejectLeaddicomnetctrl2(long hNet, short nResult, short nSource, short nReason); afx_msg void OnNetReceiveCStoreResponseLeaddicomnetctrl2(long hNet, short nPresentationID, short nMessageID, LPCTSTR pszClass, LPCTSTR pszInstance, short nStatus); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnServerLogOptions(); afx_msg void OnButtonImport(); afx_msg void OnButtonDelete(); afx_msg void OnButtonClose(); afx_msg void OnCancel(); DECLARE_EVENTSINK_MAP() //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #endif _SRVDLG_H_