1 #include <creaImageIOWxPACSConnectionPanel.h>
2 #include <creaImageIOPACSConnection.h>
3 #include <creaImageIOSystem.h>
4 #if defined (USE_GDCM2)
5 #include "gdcmCompositeNetworkFunctions.h"
10 WxPACSConnectionPanel::WxPACSConnectionPanel(wxWindow *parent, wxDialog* dial, WxGimmickView* view)
12 -1, wxDefaultPosition,
24 GimmickDebugMessage(1,"WxPACSConnectionPanel::WxPACSConnectionPanel"
26 wxStaticText * dicId=new wxStaticText(this,-1,_T(" DICOM Identification: "), wxPoint(5,5));
27 wxStaticText * aet=new wxStaticText(this,-1,_T(" AETitle: "), wxPoint(5,25));
28 aeTitle=new wxTextCtrl(this, wxID_ANY, _T("MyAeTitle"), wxPoint(75,25), wxSize(220,20));
30 wxStaticText * pn=new wxStaticText(this,-1,_T(" Port Number: "), wxPoint(5,53));
31 pNumber=new wxTextCtrl(this, wxID_ANY, _T("3306"), wxPoint(75,50), wxSize(220,20));
32 wxStaticText * adv1=new wxStaticText(this,-1,_T(" (1 - 131072) "), wxPoint(300,53));
34 wxStaticText * ad=new wxStaticText(this,-1,_T(" Address: "), wxPoint(5,80));
35 address=new wxTextCtrl(this, wxID_ANY, _T("localhost"), wxPoint(75,75), wxSize(220,20));
37 wxButton *query = new wxButton(this,wxID_ANY,_T("Query PACS Server"), wxPoint(5,110) );
38 Connect( query->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxPACSConnectionPanel::OnQueryPACS );
44 WxPACSConnectionPanel::~WxPACSConnectionPanel()
46 GimmickDebugMessage(1,"WxPACSConnectionPanel::~WxPACSConnectionPanel"
50 void WxPACSConnectionPanel::OnQueryPACS(wxCommandEvent& event)
52 #if defined (USE_GDCM2)
53 bool didItWork = gdcm::CompositeNetworkFunctions::CEcho( crea::wx2std(address->GetValue()).c_str(), 3600,
54 "CREATIS", crea::wx2std(aeTitle->GetValue()).c_str() );
56 tag.ReadFromCommaSeparatedString("10,10");
59 std::vector< std::pair<gdcm::Tag, std::string> > keys;
61 std::pair<gdcm::Tag, std::string> pa;
64 keys.push_back(std::make_pair(tag, ""));
65 gdcm::EQueryLevel theLevel = gdcm::ePatient;
66 gdcm::ERootType theRoot = gdcm::ePatientRootType;
67 gdcm::SmartPointer<gdcm::BaseRootQuery> theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys);
70 std::vector<gdcm::DataSet> theDataSet;
71 gdcm::CompositeNetworkFunctions::CFind(crea::wx2std(address->GetValue()).c_str(), 3600, theQuery, theDataSet,
72 "CREATIS", crea::wx2std(aeTitle->GetValue()).c_str());
76 //======================================================================
78 //======================================================================
80 } // EO namespace creaImageIO