]> Creatis software - clitk.git/blob - vv/vvQPacsConnection.h
add cmove for all levels
[clitk.git] / vv / vvQPacsConnection.h
1 #ifndef __vvQPacsConnection_h_INCLUDED__
2 #define __vvQPacsConnection_h_INCLUDED__
3
4 #include <QTGUI/QWidget>
5 #include "ui_vvPacsConnection.h"
6 #include "gdcmCompositeNetworkFunctions.h"
7 #include <QtGui/QStandardItemModel.h>
8 #include <QtGui/QStringListModel.h>
9 #include <QFileDialog>
10 #include "vvDicomServerQueryFactory.h"
11
12   /**
13    * \ingroup GUI
14    */
15   //=====================================================================
16  //======================================================================
17
18 struct vvQuery{
19         gdcm::ERootType theRoot;
20         gdcm::EQueryLevel theLevel;
21         std::vector< std::pair<gdcm::Tag, std::string> > keys;
22 };
23
24   class vvQPacsConnection : public QDialog 
25   {
26           Q_OBJECT
27   public:
28           //vvQPacsConnection(){}    
29           vvQPacsConnection(QWidget *parent=0);
30     
31           ~vvQPacsConnection(){}
32         void refreshNetworks();
33         std::vector <std::string> getFileNames();
34
35 public slots:
36         void selectStudies(const QModelIndex &index);
37         void selectSeries(const QModelIndex &index);
38         void selectImages(const QModelIndex &index);
39   private slots:
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);
46  void removeServer();
47  void modifyServer();
48
49   private :
50
51                  vvQuery getQueryPatient(const std::string i_patname, const std::string i_patid);
52
53
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);
59
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();
64         void cleanTree();
65         void setNewPacs();
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;
74         std::string m_study;
75         std::string m_series;
76         gdcm::EQueryLevel m_level;
77         std::string m_port;
78         std::string m_aetitle;
79         std::string m_adress;
80         std::string m_nickname;
81         vvDicomServerQueryFactory mquery;
82         vvQuery m_query;
83         vvQuery f_query;
84          gdcm::Directory::FilenamesType m_files;
85
86          vvQuery getQueryforSeries(const std::string patient_id, const std::string study_id, bool bdisplay);
87
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);
90         
91   }; // class vvQPacsConnection
92   //=====================================================================
93
94   
95
96 #endif // __vvQPacsConnection_h_INCLUDED__
97
98