creaImageIO_lib
creaImageIO::WxPACSConnectionPanel Class Reference

#include <creaImageIOWxPACSConnectionPanel.h>

Inheritance diagram for creaImageIO::WxPACSConnectionPanel:
Collaboration diagram for creaImageIO::WxPACSConnectionPanel:

Public Member Functions

 WxPACSConnectionPanel ()
 
 WxPACSConnectionPanel (wxWindow *parent, wxDialog *dial, WxGimmickView *view)
 
 ~WxPACSConnectionPanel ()
 Destructor. More...
 
void OnQueryPACS (wxCommandEvent &event)
 Queries the PACS. More...
 

Private Attributes

wxTextCtrl * aeTitle
 
wxTextCtrl * pNumber
 
wxTextCtrl * address
 
wxDialog * dialog
 
WxGimmickViewmView
 

Detailed Description

Definition at line 43 of file creaImageIOWxPACSConnectionPanel.h.

Constructor & Destructor Documentation

creaImageIO::WxPACSConnectionPanel::WxPACSConnectionPanel ( )
creaImageIO::WxPACSConnectionPanel::WxPACSConnectionPanel ( wxWindow *  parent,
wxDialog *  dial,
WxGimmickView view 
)

fix warning: unused variable dicId aet pn adv1 ad

Definition at line 37 of file creaImageIOWxPACSConnectionPanel.cpp.

References address, aeTitle, GimmickDebugMessage, OnQueryPACS(), and pNumber.

38  : wxPanel( parent,
39  -1, wxDefaultPosition,
40  wxDefaultSize,
41  wxRESIZE_BORDER |
42  wxSYSTEM_MENU |
43  wxCLOSE_BOX |
44  wxMAXIMIZE_BOX |
45  wxMINIMIZE_BOX |
46  wxCAPTION
47  ),
48  dialog(dial),
49  mView(view)
50  {
51  GimmickDebugMessage(1,"WxPACSConnectionPanel::WxPACSConnectionPanel"
52  <<std::endl);
54  wxStaticText * dicId=new wxStaticText(this,-1,_T(" DICOM Identification: "), wxPoint(5,5));
55  wxStaticText * aet=new wxStaticText(this,-1,_T(" AETitle: "), wxPoint(5,25));
56  aeTitle=new wxTextCtrl(this, wxID_ANY, _T("MyAeTitle"), wxPoint(75,25), wxSize(220,20));
57 
58  wxStaticText * pn=new wxStaticText(this,-1,_T(" Port Number: "), wxPoint(5,53));
59  pNumber=new wxTextCtrl(this, wxID_ANY, _T("3306"), wxPoint(75,50), wxSize(220,20));
60  wxStaticText * adv1=new wxStaticText(this,-1,_T(" (1 - 131072) "), wxPoint(300,53));
61 
62  wxStaticText * ad=new wxStaticText(this,-1,_T(" Address: "), wxPoint(5,80));
63  address=new wxTextCtrl(this, wxID_ANY, _T("localhost"), wxPoint(75,75), wxSize(220,20));
64 
65  wxButton *query = new wxButton(this,wxID_ANY,_T("Query PACS Server"), wxPoint(5,110) );
66  Connect( query->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxPACSConnectionPanel::OnQueryPACS );
67 
68  Layout();
69  }

Here is the call graph for this function:

creaImageIO::WxPACSConnectionPanel::~WxPACSConnectionPanel ( )

Destructor.

Definition at line 72 of file creaImageIOWxPACSConnectionPanel.cpp.

References GimmickDebugMessage.

73  {
74  GimmickDebugMessage(1,"WxPACSConnectionPanel::~WxPACSConnectionPanel"
75  <<std::endl);
76  }

Member Function Documentation

void creaImageIO::WxPACSConnectionPanel::OnQueryPACS ( wxCommandEvent &  event)

Queries the PACS.

Definition at line 78 of file creaImageIOWxPACSConnectionPanel.cpp.

References address, and aeTitle.

Referenced by WxPACSConnectionPanel().

79  {
80  #if defined (USE_GDCM2)
81  bool didItWork = gdcm::CompositeNetworkFunctions::CEcho( crea::wx2std(address->GetValue()).c_str(), 3600,
82  "CREATIS", crea::wx2std(aeTitle->GetValue()).c_str() );
83  gdcm::Tag tag;
84  tag.ReadFromCommaSeparatedString("10,10");
85  /* tag.SetElement(8);
86  tag.SetGroup(8);*/
87  std::vector< std::pair<gdcm::Tag, std::string> > keys;
88 
89  std::pair<gdcm::Tag, std::string> pa;
90  pa.first = tag;
91  pa.second = "";
92  keys.push_back(std::make_pair(tag, ""));
93  gdcm::EQueryLevel theLevel = gdcm::ePatient;
94  gdcm::ERootType theRoot = gdcm::ePatientRootType;
95  gdcm::SmartPointer<gdcm::BaseRootQuery> theQuery = gdcm::CompositeNetworkFunctions::ConstructQuery(theRoot, theLevel ,keys);
96 
97 
98  std::vector<gdcm::DataSet> theDataSet;
99  gdcm::CompositeNetworkFunctions::CFind(crea::wx2std(address->GetValue()).c_str(), 3600, theQuery, theDataSet,
100  "CREATIS", crea::wx2std(aeTitle->GetValue()).c_str());
101 #endif
102  }

Here is the caller graph for this function:

Member Data Documentation

wxTextCtrl* creaImageIO::WxPACSConnectionPanel::address
private

Definition at line 58 of file creaImageIOWxPACSConnectionPanel.h.

Referenced by OnQueryPACS(), and WxPACSConnectionPanel().

wxTextCtrl* creaImageIO::WxPACSConnectionPanel::aeTitle
private

Definition at line 56 of file creaImageIOWxPACSConnectionPanel.h.

Referenced by OnQueryPACS(), and WxPACSConnectionPanel().

wxDialog* creaImageIO::WxPACSConnectionPanel::dialog
private

Definition at line 59 of file creaImageIOWxPACSConnectionPanel.h.

WxGimmickView* creaImageIO::WxPACSConnectionPanel::mView
private

Definition at line 60 of file creaImageIOWxPACSConnectionPanel.h.

wxTextCtrl* creaImageIO::WxPACSConnectionPanel::pNumber
private

Definition at line 57 of file creaImageIOWxPACSConnectionPanel.h.

Referenced by WxPACSConnectionPanel().


The documentation for this class was generated from the following files: