]> Creatis software - clitk.git/blob - vv/vvQDicomSeriesSelector.h
remove antique RCS headers
[clitk.git] / vv / vvQDicomSeriesSelector.h
1 /*=========================================================================
2
3  Program:   vv
4  Language:  C++
5  Author :   Pierre Seroul (pierre.seroul@gmail.com)
6
7 Copyright (C) 2008
8 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
9 CREATIS-LRMN http://www.creatis.insa-lyon.fr
10
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation, version 3 of the License.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23 =========================================================================*/
24 #ifndef VVDICOMSERIESSELECTOR_H
25 #define VVDICOMSERIESSELECTOR_H
26
27 // vv include
28 #include "ui_vvDicomSeriesSelector.h"
29 #include "clitkCommon.h"
30 #include "vvQProgressDialogITKCommand.h"
31
32 namespace gdcm {class File;}
33
34 // qt include
35 #include <QSplitter>
36 #include <QFileDialog>
37
38 class vvDicomSeriesSelector : public QDialog {
39     Q_OBJECT
40
41 public:
42     vvDicomSeriesSelector(QWidget * parent=0);
43     virtual void show();
44     virtual void close();
45     std::vector<std::string> * GetFilenames() {
46         return mFilenames;
47     }
48
49 protected slots:
50     void BrowseButtonRelease();
51     void SearchButtonRelease();
52     void itemSelectionChanged();
53     void itemDetailsSelectionChanged();
54
55 protected:
56     QString mPreviousPath;
57     QString mFoldername;
58     void AddSerieToTheTable(int i, std::vector<std::string> & filenames);
59     QString MakeDicomInfo(std::string & s, gdcm::File *header);
60     QString AddInfo(gdcm::File *header, QString n, unsigned short group, unsigned short elem);
61     QString AddInfo(std::string n, std::string m);
62
63 private:
64     Ui::vvDicomSeriesSelector ui;
65     std::string mCurrentSerie;
66     std::map<std::string, std::vector<std::string>* > mListOfSeriesFilenames;
67     std::vector<std::string> * mFilenames;
68     std::map<std::string, QString> mDicomInfo;
69     std::map<std::string, gdcm::File*> mDicomHeader;
70     std::map<std::string, std::string> mDicomDetails;
71 };
72
73 #endif // VVDICOMSERIESSELECTOR_H