]> Creatis software - clitk.git/blob - vv/vvQPacsConnection.h
Debug RTStruct conversion with empty struc
[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  bool close();
47  void modifyServer();
48
49   private :
50
51                 
52           Ui::vvPacsConnection ui;
53         std::vector< std::pair<gdcm::Tag, std::string> > getKeys();
54         std::vector< std::pair<gdcm::Tag, std::string> > getStudyKeys(const std::string);
55         std::vector<gdcm::DataSet> findQuery(vvQuery i_query);
56
57         void manageStudiesFilter(bool i_enable);
58         void createTreeView();
59         void cleanTree();
60         void setNewPacs();
61         QStandardItemModel *Patientmodel;
62         QStandardItemModel *Studymodel;
63         QStandardItemModel *Seriesmodel;
64         QStandardItemModel *Imagesmodel;
65         void convertDataSet(std::vector<gdcm::DataSet> i_ds, QStandardItemModel *i_model, std::vector< std::pair<gdcm::Tag, std::string> > keys);
66         void manageSeriesFilter(bool i_enable);
67         std::vector< std::pair<gdcm::Tag, std::string> > fillMoveKeys();
68         std::string m_patient;
69         std::string m_study;
70         std::string m_series;
71         gdcm::EQueryLevel m_level;
72         std::string m_port;
73         std::string m_aetitle;
74         std::string m_adress;
75         std::string m_nickname;
76         vvDicomServerQueryFactory mQFactory;
77         vvQuery m_query;
78         vvQuery f_query;
79          gdcm::Directory::FilenamesType m_files;
80          std::vector < gdcm::Directory::FilenamesType> m_fileseries;
81
82
83         
84   }; // class vvQPacsConnection
85   //=====================================================================
86
87   
88
89 #endif // __vvQPacsConnection_h_INCLUDED__
90
91