]> Creatis software - clitk.git/blob - vv/vvQPacsConnection.h
Ensure compilation with VTK6/Qt5 and newer version of GDCM
[clitk.git] / vv / vvQPacsConnection.h
1 #ifndef __vvQPacsConnection_h_INCLUDED__
2 #define __vvQPacsConnection_h_INCLUDED__
3
4 #include <QWidget>
5 #include "ui_vvPacsConnection.h"
6 #include "gdcmCompositeNetworkFunctions.h"
7 #include <QStandardItemModel>
8 #include <QStringListModel>
9 #include <QFileDialog>
10 #include "vvDicomServerQueryFactory.h"
11
12   /**
13    * \ingroup GUI
14    */
15   //=====================================================================
16  //======================================================================
17
18
19
20 class vvQPacsConnection : public QDialog
21 {
22           Q_OBJECT
23 public:
24           //vvQPacsConnection(){}    
25           vvQPacsConnection(QWidget *parent=0);
26     
27           ~vvQPacsConnection(){}
28         void refreshNetworks();
29         std::vector <std::string> getFileNames(int i_series);
30         int getSeriesCount() { return m_fileseries.size();}
31         void clearMove();
32
33 public slots:
34         void selectStudies(const QModelIndex &index);
35         void selectSeries(const QModelIndex &index);
36         void selectImages(const QModelIndex &index);
37         void selectImage(const QModelIndex &index);
38   private slots:
39     void on_scanButton_clicked();
40         void on_clearButton_clicked();
41         void on_optionsButton_clicked();
42         void on_check_ModAll_clicked(bool state);
43         void on_importButton_clicked();
44  void chooseServer(int index);
45  void removeServer();
46  void modifyServer();
47
48   private :
49
50                 
51           Ui::vvPacsConnection ui;
52         std::vector< std::pair<gdcm::Tag, std::string> > getKeys();
53         std::vector< std::pair<gdcm::Tag, std::string> > getStudyKeys(const std::string);
54         std::vector<gdcm::DataSet> findQuery(vvQuery i_query);
55
56         void manageStudiesFilter(bool i_enable);
57         void createTreeView();
58         void cleanTree();
59         void setNewPacs();
60         QStandardItemModel *Patientmodel;
61         QStandardItemModel *Studymodel;
62         QStandardItemModel *Seriesmodel;
63         QStandardItemModel *Imagesmodel;
64         void convertDataSet(std::vector<gdcm::DataSet> i_ds, QStandardItemModel *i_model, std::vector< std::pair<gdcm::Tag, std::string> > keys);
65         void manageSeriesFilter(bool i_enable);
66         std::vector< std::pair<gdcm::Tag, std::string> > fillMoveKeys();
67         std::string m_patient;
68         std::string m_study;
69         std::string m_series;
70         gdcm::EQueryLevel m_level;
71         std::string m_port;
72         std::string m_aetitle;
73         std::string m_adress;
74         std::string m_nickname;
75         vvDicomServerQueryFactory mQFactory;
76         vvQuery m_query;
77         vvQuery f_query;
78          gdcm::Directory::FilenamesType m_files;
79          std::vector < gdcm::Directory::FilenamesType> m_fileseries;
80
81
82         
83   }; // class vvQPacsConnection
84   //=====================================================================
85
86   
87
88 #endif // __vvQPacsConnection_h_INCLUDED__
89
90