1 #ifndef __vvQPacsConnection_h_INCLUDED__
2 #define __vvQPacsConnection_h_INCLUDED__
4 #include <QTGUI/QWidget>
5 #include "ui_vvPacsConnection.h"
6 #include "gdcmCompositeNetworkFunctions.h"
7 #include <QtGui/QStandardItemModel.h>
8 #include <QtGui/QStringListModel.h>
10 #include "vvDicomServerQueryFactory.h"
15 //=====================================================================
16 //======================================================================
19 gdcm::ERootType theRoot;
20 gdcm::EQueryLevel theLevel;
21 std::vector< std::pair<gdcm::Tag, std::string> > keys;
24 class vvQPacsConnection : public QDialog
28 //vvQPacsConnection(){}
29 vvQPacsConnection(QWidget *parent=0);
31 ~vvQPacsConnection(){}
32 void refreshNetworks();
33 std::vector <std::string> getFileNames();
36 void selectStudies(const QModelIndex &index);
37 void selectSeries(const QModelIndex &index);
38 void selectImages(const QModelIndex &index);
40 void on_scanButton_clicked();
41 void on_clearButton_clicked();
42 void on_optionsButton_clicked();
43 void on_check_ModAll_clicked(bool state);
44 void on_importButton_clicked();
45 void chooseServer(int index);
51 vvQuery getQueryPatient(const std::string i_patname, const std::string i_patid);
54 Ui::vvPacsConnection ui;
55 std::vector< std::pair<gdcm::Tag, std::string> > getKeys();
56 std::vector< std::pair<gdcm::Tag, std::string> > getPatientKeys(const std::string , const std::string );
57 std::vector< std::pair<gdcm::Tag, std::string> > getStudyKeys(const std::string);
58 std::vector< std::pair<gdcm::Tag, std::string> > getSeriesKeys(const std::string patient_id, const std::string study_id, bool bdisplay);
60 std::vector< std::pair<gdcm::Tag, std::string> > getQueryKeysforImages(const std::string patient_id, const std::string study_id, const std::string series_id,bool bdisplay);
61 vvQuery getQueryforImages(const std::string patient_id, const std::string study_id, const std::string series_id,bool bdisplay);
62 void manageStudiesFilter(bool i_enable);
63 void createTreeView();
66 QStandardItemModel *Patientmodel;
67 QStandardItemModel *Studymodel;
68 QStandardItemModel *Seriesmodel;
69 QStandardItemModel *Imagesmodel;
70 void convertDataSet(std::vector<gdcm::DataSet> i_ds, QStandardItemModel *i_model, std::vector< std::pair<gdcm::Tag, std::string> > keys);
71 void manageSeriesFilter(bool i_enable);
72 std::vector< std::pair<gdcm::Tag, std::string> > fillMoveKeys();
73 std::string m_patient;
76 gdcm::EQueryLevel m_level;
78 std::string m_aetitle;
80 std::string m_nickname;
81 vvDicomServerQueryFactory mquery;
84 gdcm::Directory::FilenamesType m_files;
86 vvQuery getQueryforSeries(const std::string patient_id, const std::string study_id, bool bdisplay);
88 vvQuery getQueryforStudy(const std::string patient_id, bool bdisplay);
89 std::vector< std::pair<gdcm::Tag, std::string> > getQueryKeysforStudy(const std::string patient_id, bool bdisplay);
91 }; // class vvQPacsConnection
92 //=====================================================================
96 #endif // __vvQPacsConnection_h_INCLUDED__